Local backups status message, beta 4

This commit is contained in:
Mo Bitar
2019-01-16 15:27:32 -06:00
parent 537151c1c5
commit 1446de4ec4
6 changed files with 37 additions and 5 deletions

View File

@@ -34,6 +34,26 @@ angular.module('app')
this.securityUpdateAvailable = authManager.securityUpdateAvailable;
})
$rootScope.$on("did-begin-local-backup", () => {
$timeout(() => {
this.arbitraryStatusMessage = "Saving local backup...";
})
});
$rootScope.$on("did-finish-local-backup", (event, data) => {
$timeout(() => {
if(data.success) {
this.arbitraryStatusMessage = "Successfully saved backup.";
} else {
this.arbitraryStatusMessage = "Unable to save local backup.";
}
$timeout(() => {
this.arbitraryStatusMessage = null;
}, 2000)
})
});
this.openSecurityUpdate = function() {
authManager.presentPasswordWizard("upgrade-security");
}

View File

@@ -182,6 +182,13 @@ class DesktopManager {
this.majorDataChangeHandler = handler;
}
desktop_didBeginBackup() {
this.$rootScope.$broadcast("did-begin-local-backup");
}
desktop_didFinishBackup(success) {
this.$rootScope.$broadcast("did-finish-local-backup", {success: success});
}
}
angular.module('app').service('desktopManager', DesktopManager);

View File

@@ -36,6 +36,6 @@
Note that when your application is unlocked, your data exists in temporary memory in an unencrypted state.
Privileges are meant to protect against unwanted access in the event of an unlocked application, but do not affect data encryption state.
%p.sk-p
Privileges sync across your other devices (not including mobile); however, note that if you require
Privileges sync across your other devices; however, note that if you require
a "Local Passcode" privilege, and another device does not have a local passcode set up, the local passcode
requirement will be ignored on that device.

View File

@@ -21,12 +21,17 @@
%component-modal{"ng-if" => "room.showRoom", "component" => "room", "on-dismiss" => "ctrl.onRoomDismiss"}
.center
.sk-app-bar-item{"ng-show" => "ctrl.arbitraryStatusMessage"}
.sk-app-bar-item-column
%span.neutral.sk-label {{ctrl.arbitraryStatusMessage}}
.right
.sk-app-bar-item{"ng-if" => "ctrl.securityUpdateAvailable", "ng-click" => "ctrl.openSecurityUpdate()"}
.sk-app-bar-item{"ng-show" => "ctrl.securityUpdateAvailable", "ng-click" => "ctrl.openSecurityUpdate()"}
%span.success.sk-label Security update available.
.sk-app-bar-item{"ng-if" => "ctrl.newUpdateAvailable == true", "ng-click" => "ctrl.clickedNewUpdateAnnouncement()"}
.sk-app-bar-item{"ng-show" => "ctrl.newUpdateAvailable == true", "ng-click" => "ctrl.clickedNewUpdateAnnouncement()"}
%span.info.sk-label New update available.
.sk-app-bar-item.no-pointer{"ng-if" => "ctrl.lastSyncDate && !ctrl.isRefreshing"}

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "standard-notes-web",
"version": "3.0.3-beta3",
"version": "3.0.3-beta4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "standard-notes-web",
"version": "3.0.3-beta3",
"version": "3.0.3-beta4",
"license": "AGPL-3.0-or-later",
"repository": {
"type": "git",