summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2021-03-25 20:22:29 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2021-03-25 20:22:29 +0100
commitc9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885 (patch)
tree93ee0c21226fa260e51b0ec451e3f62d1b4672b8 /assets
parentMerge pull request 'dev' (#1) from dev into master (diff)
parentMerge branch 'master' into dev (diff)
downloadbeziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar.gz
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar.bz2
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar.lz
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar.xz
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.tar.zst
beziapp-c9a6ddd6e1c0c7434a95d670fddf3f5b7da4c885.zip
Diffstat (limited to 'assets')
-rw-r--r--assets/js/app.js.bvr4
-rw-r--r--assets/js/initialize.js6
-rw-r--r--assets/root/index.html34
3 files changed, 43 insertions, 1 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index c99124b..17d7555 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -4,6 +4,10 @@ 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(() => { })
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..90a1a95 100644
--- a/assets/root/index.html
+++ b/assets/root/index.html
@@ -22,6 +22,40 @@
</head>
<body>
+ <noscript>
+ <h1>
+ BežiApp za delovanje potrebuje Javascript, trenutno pa ni omogočen. Preglejte nastavitve brskalnika in omogočite Javascript.
+ </h1>
+ <h1>
+ BežiApp needs Javascript to operate, but it's currently not accessible. Check your browser's settings and enable Javascript.
+ </h1>
+ </noscript>
+ <div id=nepodpira hidden=hidden>
+ <h1>
+ BežiApp se ni mogel zagnati ):
+ </h1>
+ <h2>
+ Mogoče gre za napako, pišite nam na Instagram (@beziapp).
+ </h2>
+ <h3>
+ Bolj verjetno pa je, da vaša naprava ni podprta. To velja predvsem za stare iPhone telefone, saj Apple ne posodablja brskalnikov.
+ </h3>
+ <hr>
+ <h1>
+ BežiApp could not start ):
+ </h1>
+ <h2>
+ This may happen due to an error, write to us on Instagram (@beziapp).
+ </h2>
+ <h3>
+ 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.
+ </h3>
+ <hr>
+ <i>BežiApp ver. <span id=beziappver></span><br>BežiApp previous commit: <span id=beziappcommit></span></i>
+ </div>
+ <script>
+ setTimeout(function() {document.getElementsByTagName("div")[0].hidden=false}, 1000);
+ </script>
</body>
</html>