mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
fix remember bug and auto-focus on lock screen
This commit is contained in:
parent
6fa5582883
commit
3ce2fb484a
@ -40,7 +40,7 @@ var TokenRequest = function (email, masterPasswordHash, provider, token, remembe
|
|||||||
this.masterPasswordHash = masterPasswordHash;
|
this.masterPasswordHash = masterPasswordHash;
|
||||||
this.token = token;
|
this.token = token;
|
||||||
this.provider = provider;
|
this.provider = provider;
|
||||||
this.remember = remember || remember !== false;
|
this.remember = remember === true;
|
||||||
this.device = null;
|
this.device = null;
|
||||||
if (device) {
|
if (device) {
|
||||||
this.device = device;
|
this.device = device;
|
||||||
|
@ -2,9 +2,12 @@
|
|||||||
.module('bit.lock')
|
.module('bit.lock')
|
||||||
|
|
||||||
.controller('lockController', function ($scope, $state, $analytics, i18nService, cryptoService, toastr,
|
.controller('lockController', function ($scope, $state, $analytics, i18nService, cryptoService, toastr,
|
||||||
userService, SweetAlert) {
|
userService, SweetAlert, $timeout) {
|
||||||
$scope.i18n = i18nService;
|
$scope.i18n = i18nService;
|
||||||
|
|
||||||
|
$timeout(function () {
|
||||||
$('#master-password').focus();
|
$('#master-password').focus();
|
||||||
|
});
|
||||||
|
|
||||||
$scope.logOut = function () {
|
$scope.logOut = function () {
|
||||||
SweetAlert.swal({
|
SweetAlert.swal({
|
||||||
|
@ -57,7 +57,7 @@ function initApiService() {
|
|||||||
|
|
||||||
// Hack for Edge. For some reason tokenRequest loses proto. Rebuild it here.
|
// Hack for Edge. For some reason tokenRequest loses proto. Rebuild it here.
|
||||||
tokenRequest = new TokenRequest(tokenRequest.email, tokenRequest.masterPasswordHash, tokenRequest.provider,
|
tokenRequest = new TokenRequest(tokenRequest.email, tokenRequest.masterPasswordHash, tokenRequest.provider,
|
||||||
tokenRequest.token, tokenRequest.remeber, tokenRequest.device);
|
tokenRequest.token, tokenRequest.remember, tokenRequest.device);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
|
Loading…
Reference in New Issue
Block a user