1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 23:03:32 +00:00

show loading while syncing on vault list

This commit is contained in:
Kyle Spearrin
2016-09-22 19:26:20 -04:00
parent 3f95c3a7ea
commit c3d1d4101e
4 changed files with 16 additions and 12 deletions

View File

@@ -14,15 +14,17 @@ function initSyncService() {
throw 'callback function required';
}
syncStarted();
var self = this;
self.userService.isAuthenticated(function (isAuthenticated) {
if (!isAuthenticated) {
syncCompleted(false);
callback(false);
return;
}
self.userService.getUserId(function (userId) {
syncStarted();
var now = new Date();
var ciphers = self.apiService.getCiphers(function (response) {
var sites = {};
@@ -178,6 +180,7 @@ function initSyncService() {
}
function handleError() {
syncCompleted(false);
// TODO: check for unauth or forbidden and logout
}
};