From 5d949d52002e7ba11861aec7b99e79eaefaec25c Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Thu, 4 Apr 2019 16:16:43 -0500 Subject: [PATCH] Alert on failed action --- app/assets/javascripts/app/services/actionsManager.js | 8 +++++++- app/assets/templates/directives/password-wizard.html.haml | 7 ++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/app/services/actionsManager.js b/app/assets/javascripts/app/services/actionsManager.js index 3c474119e..1443d8b06 100644 --- a/app/assets/javascripts/app/services/actionsManager.js +++ b/app/assets/javascripts/app/services/actionsManager.js @@ -127,6 +127,9 @@ class ActionsManager { action.error = false; handleResponseDecryption(response, await this.authManager.keys(), true); }, (response) => { + if(response && response.error) { + alert("An issue occurred while processing this action. Please try again."); + } action.error = true; customCallback(null); }) @@ -159,7 +162,10 @@ class ActionsManager { items: [itemParams] // Wrap it in an array } - this.performPost(action, extension, params, function(response){ + this.performPost(action, extension, params, (response) => { + if(response && response.error) { + alert("An issue occurred while processing this action. Please try again."); + } customCallback(response); }); }) diff --git a/app/assets/templates/directives/password-wizard.html.haml b/app/assets/templates/directives/password-wizard.html.haml index b51f3cff3..616e8144d 100644 --- a/app/assets/templates/directives/password-wizard.html.haml +++ b/app/assets/templates/directives/password-wizard.html.haml @@ -19,9 +19,10 @@ %p.sk-p.sk-panel-row A new update is available for your account. Updates address improvements and enhancements to our security specification. This process will guide you through the update, and perform the steps necessary with your supervision. - %p.sk-p.sk-panel-row - For more information about security updates, please visit - %a.sk-a.info{"href" => "https://standardnotes.org/help/security", "target" => "_blank"} standardnotes.org/help/security. + .sk-panel-row + .sk-panel-column + %p.sk-p For more information about security updates, please visit + %a.sk-a.info{"href" => "https://standardnotes.org/help/security", "target" => "_blank"} standardnotes.org/help/security. %p.sk-panel-row.sk-p .info Press Continue to proceed.