Mercurial > gemma
changeset 3627:67984bf6dba6 configuration
client: configuration: added info popup when saving settings
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Sun, 09 Jun 2019 12:33:47 +0200 |
parents | 73fd4dd9e569 |
children | 6693be57b7a2 |
files | client/src/store/application.js |
diffstat | 1 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/application.js Fri Jun 07 14:17:01 2019 +0200 +++ b/client/src/store/application.js Sun Jun 09 12:33:47 2019 +0200 @@ -15,7 +15,7 @@ */ import { HTTP } from "@/lib/http"; -import { displayError } from "@/lib/errors"; +import { displayError, displayInfo } from "@/lib/errors"; import { version } from "../../package.json"; // initial state @@ -155,13 +155,19 @@ "X-Gemma-Auth": localStorage.getItem("token"), "Content-type": "application/json" } - }).catch(error => { - const { status, data } = error.response; - displayError({ - title: "Backend Error", - message: `${status}: ${data.message || data}` + }) + .then(() => { + displayInfo({ + message: "Configuration saved!" + }); + }) + .catch(error => { + const { status, data } = error.response; + displayError({ + title: "Backend Error", + message: `${status}: ${data.message || data}` + }); }); - }); } } };