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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user