1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

convert sync service to ts

This commit is contained in:
Kyle Spearrin
2017-11-06 11:55:17 -05:00
parent b05426f953
commit 942d98d798
10 changed files with 199 additions and 243 deletions

View File

@@ -1,4 +1,4 @@
angular
angular
.module('bit.settings')
.controller('settingsSyncController', function ($scope, syncService, toastr, $analytics, i18nService) {
@@ -9,7 +9,7 @@
$scope.sync = function () {
$scope.loading = true;
syncService.fullSync(true, function (success) {
syncService.fullSync(true).then(function (success) {
$scope.loading = false;
setLastSync();
if (success) {
@@ -23,7 +23,7 @@
};
function setLastSync() {
syncService.getLastSync(function (lastSync) {
syncService.getLastSync().then(function (lastSync) {
if (lastSync) {
$scope.lastSync = lastSync.toLocaleDateString() + ' ' + lastSync.toLocaleTimeString();
}

View File

@@ -1,4 +1,4 @@
angular
angular
.module('bit.vault')
.controller('vaultController', function ($scope, $rootScope, cipherService, folderService, $q, $state, $stateParams, toastr,
@@ -15,7 +15,7 @@
if (syncOnLoad) {
$scope.$on('$viewContentLoaded', function () {
$timeout(function () {
syncService.fullSync(true, function () { });
syncService.fullSync(true);
}, 0);
});
}