1
0
Fork 0
forked from lthn/blockchain

GUI: fixed master passwork lock timer issue

This commit is contained in:
arthurest 2020-07-06 14:15:18 +04:00 committed by GitHub
parent 93407a038e
commit 5903cc36aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 11 deletions

View file

@ -5430,7 +5430,9 @@ var LoginComponent = /** @class */ (function () {
_this.backend.storeSecureAppData({ pass: _this.variablesService.appPass });
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.ngZone.run(function () {
_this.router.navigate(['/']);
});
@ -5465,7 +5467,9 @@ var LoginComponent = /** @class */ (function () {
this.backend.checkMasterPassword({ pass: this.variablesService.appPass }, function (status, data) {
if (status) {
_this.variablesService.appLogin = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.ngZone.run(function () {
_this.router.navigate(['/']);
});
@ -5483,7 +5487,9 @@ var LoginComponent = /** @class */ (function () {
if (!data.error_code) {
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
_this.variablesService.appPass = appPass;
var isEmptyObject = Object.keys(data).length === 0 && data.constructor === Object;
if (_this.variablesService.wallets.length) {
@ -7608,7 +7614,9 @@ var SettingsComponent = /** @class */ (function () {
_this.backend.storeSecureAppData({ pass: _this.variablesService.appPass });
_this.variablesService.appLogin = true;
_this.variablesService.dataIsLoaded = true;
_this.variablesService.startCountdown();
if (_this.variablesService.settings.appLockTime) {
_this.variablesService.startCountdown();
}
}
else {
console.log(data['error_code']);
@ -7622,7 +7630,7 @@ var SettingsComponent = /** @class */ (function () {
}
};
SettingsComponent.prototype.onLockChange = function () {
if (this.variablesService.appLogin) {
if (this.variablesService.appLogin && this.variablesService.settings.appLockTime) {
this.variablesService.restartCountdown();
}
this.backend.storeAppData();

File diff suppressed because one or more lines are too long

View file

@ -60,7 +60,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backend.storeSecureAppData({pass: this.variablesService.appPass});
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.ngZone.run(() => {
this.router.navigate(['/']);
});
@ -95,7 +97,9 @@ export class LoginComponent implements OnInit, OnDestroy {
this.backend.checkMasterPassword({pass: this.variablesService.appPass}, (status, data) => {
if (status) {
this.variablesService.appLogin = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.ngZone.run(() => {
this.router.navigate(['/']);
});
@ -112,7 +116,9 @@ export class LoginComponent implements OnInit, OnDestroy {
if (!data.error_code) {
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
this.variablesService.appPass = appPass;
const isEmptyObject = Object.keys(data).length === 0 && data.constructor === Object;

View file

@ -153,7 +153,9 @@ export class SettingsComponent implements OnInit {
this.backend.storeSecureAppData({pass: this.variablesService.appPass});
this.variablesService.appLogin = true;
this.variablesService.dataIsLoaded = true;
this.variablesService.startCountdown();
if (this.variablesService.settings.appLockTime) {
this.variablesService.startCountdown();
}
} else {
console.log(data['error_code']);
}
@ -166,7 +168,7 @@ export class SettingsComponent implements OnInit {
}
onLockChange() {
if (this.variablesService.appLogin) {
if (this.variablesService.appLogin && this.variablesService.settings.appLockTime) {
this.variablesService.restartCountdown();
}
this.backend.storeAppData();