From 1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd Mon Sep 17 00:00:00 2001 From: sijanec Date: Thu, 25 Mar 2021 18:09:50 +0100 Subject: added not supported text --- assets/js/app.js.bvr | 6 ++++++ assets/js/initialize.js | 6 +++++- assets/root/index.html | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) (limited to 'assets') diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr index c99124b..7375b61 100644 --- a/assets/js/app.js.bvr +++ b/assets/js/app.js.bvr @@ -4,10 +4,16 @@ const app_version = "<@?g app_version@>"; const previous_commit = "<@?g latest_commit@>"; const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund +if (location.protocol !== 'https:') { + location.replace(`https:${location.href.substring(location.protocol.length)}`); +} + if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js") .then(() => { }) .catch((err) => console.log("Service worker registration failed", err)); +} else { + alert("Vaša naprava ne podpira BežiAppa. Your device does not support BežiApp."); } // Listen to messages from service workers. diff --git a/assets/js/initialize.js b/assets/js/initialize.js index cb5d210..219bc57 100644 --- a/assets/js/initialize.js +++ b/assets/js/initialize.js @@ -4,7 +4,11 @@ function getUrlParameter(sParam) { return found_param === null ? "" : found_param; } - +try { + localforage.getItem("logged_in").then(console.log); +} catch { + alert("Vaša naprava ne podpira BežiAppa. Your device does not support BežiApp."); +} localforage.getItem("logged_in") .then( function (value) { diff --git a/assets/root/index.html b/assets/root/index.html index 2a861a1..f2309ad 100644 --- a/assets/root/index.html +++ b/assets/root/index.html @@ -22,6 +22,41 @@ + +
+

+ BežiApp se ni mogel zagnati ): +

+

+ Mogoče gre za napako, pišite nam na Instagram (@beziapp). +

+

+ Bolj verjetno pa je, da vaša naprava ni podprta. To velja predvsem za stare iPhone telefone, saj Apple ne posodablja brskalnikov. +

+
+

+ BežiApp could not start ): +

+

+ This may happen due to an error, write to us on Instagram (@beziapp). +

+

+ There's a higher chance that your device is not supported. This applies in particular to old iPhone phones, as Apple does not upgrade browsers. +

+
+ BežiApp ver.
BežiApp previous commit:
+
+ -- cgit v1.2.3