summaryrefslogtreecommitdiffstats
path: root/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/app.js')
-rw-r--r--js/app.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/app.js b/js/app.js
index f5e9d50..f7c423f 100644
--- a/js/app.js
+++ b/js/app.js
@@ -24,3 +24,16 @@ async function UIAlert(usermsg, devmsg) {
}
}
+function gsecErrorHandlerUI(err) {
+ console.log("gsecErrorHanderUI: handling "+err);
+ if(err == GSEC_ERR_NET || err == GSEC_ERR_NET_POSTBACK_GET || err == GSEC_ERR_NET_POSTBACK_POST) {
+ UIAlert( D("gsecErrNet") );
+ } else if(err == GSEC_ERR_LOGIN) {
+ UIAlert( D("gsecErrLogin") );
+ localforage.setItem("logged_in", false).then( () => {
+ window.location.replace("/index.html");
+ });
+ } else {
+ UIAlert( D("gsecErrOther") );
+ }
+}