From: Adam Dullage Date: Tue, 28 Jun 2022 19:39:51 +0000 (+0100) Subject: Implemented incorrect username/password message. Resolves #7. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=201a137d2da4d1f96cdfb4195e6a4c94a9dafa1c;p=flatnotes.git Implemented incorrect username/password message. Resolves #7. --- diff --git a/flatnotes/src/components/App.js b/flatnotes/src/components/App.js index 96347fb..57b969c 100644 --- a/flatnotes/src/components/App.js +++ b/flatnotes/src/components/App.js @@ -95,6 +95,14 @@ export default { let redirectPath = helpers.getSearchParam(constants.params.redirect); parent.navigate(redirectPath || "/"); }) + .catch(function(error) { + if ([400, 422].includes(error.response.status)) { + parent.$bvToast.toast("Incorrect Username or Password ✘", { + variant: "danger", + noCloseButton: true, + }); + } + }) .finally(function() { parent.usernameInput = null; parent.passwordInput = null;