mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-31 17:57:43 +01:00
timeout for digest on sync and cipher view
This commit is contained in:
parent
64e2debb77
commit
00b2c47aae
@ -8,7 +8,7 @@ export class SyncController {
|
|||||||
loading = false;
|
loading = false;
|
||||||
|
|
||||||
constructor(private syncService: SyncService, private toastr: any, private $analytics: any,
|
constructor(private syncService: SyncService, private toastr: any, private $analytics: any,
|
||||||
private i18nService: any) {
|
private i18nService: any, private $timeout: ng.ITimeoutService) {
|
||||||
this.i18n = i18nService;
|
this.i18n = i18nService;
|
||||||
this.setLastSync();
|
this.setLastSync();
|
||||||
}
|
}
|
||||||
@ -20,21 +20,23 @@ export class SyncController {
|
|||||||
if (success) {
|
if (success) {
|
||||||
this.setLastSync();
|
this.setLastSync();
|
||||||
this.$analytics.eventTrack('Synced Full');
|
this.$analytics.eventTrack('Synced Full');
|
||||||
this.toastr.success(this.i18nService.syncingComplete);
|
this.toastr.success(this.i18n.syncingComplete);
|
||||||
} else {
|
} else {
|
||||||
this.toastr.error(this.i18nService.syncingFailed);
|
this.toastr.error(this.i18n.syncingFailed);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setLastSync() {
|
setLastSync() {
|
||||||
this.syncService.getLastSync().then((lastSync: any) => {
|
this.syncService.getLastSync().then((last: Date) => {
|
||||||
if (lastSync) {
|
this.$timeout(() => {
|
||||||
this.lastSync = lastSync.toLocaleDateString() + ' ' + lastSync.toLocaleTimeString();
|
if (last) {
|
||||||
|
this.lastSync = last.toLocaleDateString() + ' ' + last.toLocaleTimeString();
|
||||||
} else {
|
} else {
|
||||||
this.lastSync = this.i18nService.never;
|
this.lastSync = this.i18n.never;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ angular
|
|||||||
cipherObj = cipher;
|
cipherObj = cipher;
|
||||||
return cipher.decrypt();
|
return cipher.decrypt();
|
||||||
}).then(function (model) {
|
}).then(function (model) {
|
||||||
|
$timeout(function() {
|
||||||
$scope.cipher = model;
|
$scope.cipher = model;
|
||||||
|
|
||||||
if (model.type == constantsService.cipherType.login && model.login) {
|
if (model.type == constantsService.cipherType.login && model.login) {
|
||||||
@ -56,6 +57,7 @@ angular
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$scope.edit = function (cipher) {
|
$scope.edit = function (cipher) {
|
||||||
$state.go('editCipher', {
|
$state.go('editCipher', {
|
||||||
|
Loading…
Reference in New Issue
Block a user