Update error text and style
This commit is contained in:
@@ -229,15 +229,11 @@ angular.module('app')
|
||||
if(success) {
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
statusTimeout = $timeout(function(){
|
||||
this.saveError = false;
|
||||
this.syncTakingTooLong = false;
|
||||
this.showAllChangesSavedStatus();
|
||||
}.bind(this), 200)
|
||||
} else {
|
||||
if(statusTimeout) $timeout.cancel(statusTimeout);
|
||||
statusTimeout = $timeout(function(){
|
||||
this.saveError = true;
|
||||
this.syncTakingTooLong = false;
|
||||
this.showErrorStatus();
|
||||
}.bind(this), 200)
|
||||
}
|
||||
@@ -277,6 +273,9 @@ angular.module('app')
|
||||
}
|
||||
|
||||
this.showAllChangesSavedStatus = function() {
|
||||
this.saveError = false;
|
||||
this.syncTakingTooLong = false;
|
||||
|
||||
var status = "All changes saved";
|
||||
if(authManager.offline()) {
|
||||
status += " (offline)";
|
||||
@@ -285,7 +284,9 @@ angular.module('app')
|
||||
}
|
||||
|
||||
this.showErrorStatus = function() {
|
||||
this.noteStatus = $sce.trustAsHtml("Error syncing<br>(changes saved offline)")
|
||||
this.saveError = true;
|
||||
this.syncTakingTooLong = false;
|
||||
this.noteStatus = $sce.trustAsHtml("<span class='error bold'>Sync Unreachable</span><br>All changes saved offline")
|
||||
}
|
||||
|
||||
this.contentChanged = function() {
|
||||
|
||||
@@ -61,6 +61,10 @@ $heading-height: 75px;
|
||||
margin-top: 4px;
|
||||
text-align: right;
|
||||
color: rgba(black, 0.23);
|
||||
|
||||
.error {
|
||||
color: #f6a200;
|
||||
}
|
||||
}
|
||||
|
||||
.editor-tags {
|
||||
|
||||
@@ -68,6 +68,11 @@
|
||||
|
||||
%div{"ng-if" => "!formData.showLogin && !formData.showRegister && !formData.mfa"}
|
||||
.panel-section{"ng-if" => "user"}
|
||||
.notification.danger{"ng-if" => "syncStatus.error"}
|
||||
%h2.title Sync Unreachable
|
||||
.text Hmm...we can't seem to sync your account. The reason: {{syncStatus.error.message}}
|
||||
%p
|
||||
%a{"href" => "https://standardnotes.org/help", "target" => "_blank"} Need help?
|
||||
.panel-row
|
||||
%h2.title.wrap {{user.email}}
|
||||
.horizontal-group{"delay-hide" => "true", "show" => "syncStatus.syncOpInProgress || syncStatus.needsMoreSync", "delay" => "1000"}
|
||||
@@ -76,8 +81,6 @@
|
||||
{{"Syncing" + (syncStatus.total > 0 ? ":" : "")}}
|
||||
%span{"ng-if" => "syncStatus.total > 0"} {{syncStatus.current}}/{{syncStatus.total}}
|
||||
|
||||
.subtitle.danger.panel-row{"ng-if" => "syncStatus.error"} Error syncing: {{syncStatus.error.message}}
|
||||
|
||||
.subtitle.subtle.normal {{server}}
|
||||
|
||||
.panel-row
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"ng-change" => "ctrl.nameChanged()", "ng-focus" => "ctrl.onNameFocus()", "ng-blur" => "ctrl.onNameBlur()",
|
||||
"select-on-click" => "true", "ng-disabled" => "ctrl.note.locked"}
|
||||
|
||||
#save-status{"ng-class" => "{'red bold': ctrl.saveError, 'warning bold': ctrl.syncTakingTooLong}", "ng-bind-html" => "ctrl.noteStatus"}
|
||||
#save-status{"ng-class" => "{'error bold': ctrl.syncTakingTooLong}", "ng-bind-html" => "ctrl.noteStatus"}
|
||||
|
||||
.editor-tags
|
||||
#note-tags-component-container{"ng-if" => "ctrl.tagsComponent"}
|
||||
@@ -26,7 +26,7 @@
|
||||
.app-bar.no-edges
|
||||
.left
|
||||
.item{"ng-click" => "ctrl.showMenu = !ctrl.showMenu; ctrl.showExtensions = false; ctrl.showEditorMenu = false;", "ng-class" => "{'selected' : ctrl.showMenu}", "click-outside" => "ctrl.showMenu = false;", "is-open" => "ctrl.showMenu"}
|
||||
.label Menu
|
||||
.label Options
|
||||
.menu-panel.dropdown-menu{"ng-if" => "ctrl.showMenu"}
|
||||
.section
|
||||
.header
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
%panel-resizer{"panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "hoverable" => "true", "property" => "'right'"}
|
||||
|
||||
%section.section{"ng-if" => "ctrl.note.errorDecrypting"}
|
||||
.section{"ng-if" => "ctrl.note.errorDecrypting"}
|
||||
%p.medium-padding{"style" => "padding-top: 0 !important;"} There was an error decrypting this item. Ensure you are running the latest version of this app, then sign out and sign back in to try again.
|
||||
|
||||
#editor-pane-component-stack
|
||||
|
||||
Reference in New Issue
Block a user