summaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-06-08 23:04:24 +0200
committersijanec <sijanecantonluka@gmail.com>2020-06-08 23:04:24 +0200
commit0d4d63927cb2b608c65641859bfe43ba6b17b204 (patch)
treefa69159702a706907357893e20ce46f0c71de7a6 /dist
parentDNM+in case you haven't read the prev. commit (diff)
downloadbeziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar.gz
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar.bz2
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar.lz
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar.xz
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.tar.zst
beziapp-0d4d63927cb2b608c65641859bfe43ba6b17b204.zip
Diffstat (limited to 'dist')
-rw-r--r--dist/cache_name.txt2
-rwxr-xr-xdist/js/app.js2
-rwxr-xr-xdist/pages/about.html2
-rwxr-xr-xdist/sw.js50
4 files changed, 30 insertions, 26 deletions
diff --git a/dist/cache_name.txt b/dist/cache_name.txt
index 7fd0531..6f7f338 100644
--- a/dist/cache_name.txt
+++ b/dist/cache_name.txt
@@ -2,4 +2,4 @@
-///site-static-1.0.14.3-beta-571c27a|||
+///site-static-1.0.14.3-beta-f1e3fea|||
diff --git a/dist/js/app.js b/dist/js/app.js
index 3ebf360..8825438 100755
--- a/dist/js/app.js
+++ b/dist/js/app.js
@@ -3,7 +3,7 @@
const app_version = "1.0.14.3-beta";
-const previous_commit = "571c27a64e8452a58a05d85bf40e1d7885d2dd1b";
+const previous_commit = "f1e3feaf44adb79aec054fce431b0a235a929466";
const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund
if ("serviceWorker" in navigator) {
diff --git a/dist/pages/about.html b/dist/pages/about.html
index 35a4b94..f4efcf4 100755
--- a/dist/pages/about.html
+++ b/dist/pages/about.html
@@ -161,7 +161,7 @@
<div class="row">
<p>
<small>
- ^HEAD 571c27a64e8452a58a05d85bf40e1d7885d2dd1b
+ ^HEAD f1e3feaf44adb79aec054fce431b0a235a929466
</small>
</p>
</div>
diff --git a/dist/sw.js b/dist/sw.js
index d26146f..f8aaaf5 100755
--- a/dist/sw.js
+++ b/dist/sw.js
@@ -3,8 +3,8 @@
// Change version to cause cache refresh
-const static_cache_name = "site-static-1.0.14.3-beta-571c27a";
-// commit before the latest is 571c27a64e8452a58a05d85bf40e1d7885d2dd1b
+const static_cache_name = "site-static-1.0.14.3-beta-f1e3fea";
+// commit before the latest is f1e3feaf44adb79aec054fce431b0a235a929466
// Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js
// sw.js NE SME BITI CACHAN, ker vsebuje verzijo!
@@ -121,6 +121,30 @@ self.addEventListener("activate", evt => {
);
});
+async function sw_asynclycheckversion (data) {
+ try {
+ var names = await caches.keys();
+ console.log("[sw.js] checkversion: ***** checkversion v0 for BežiApp ***** hello, world!");
+ if(!(data.valid_cache_name == undefined || data.valid_cache_name == null || data.valid_cache_name == "")) {
+ var valid_cache_name = data.valid_cache_name;
+ console.log("[sw.js] checkversion: requested version (cachename) " + valid_cache_name);
+ } else {
+ var valid_cache_name = static_cache_name;
+ console.log("[sw.js] checkversion: no version to keep specified, using current "+valid_cache_name+", but that makes no sense to me.");
+ }
+ console.log("[sw.js] checkversion: deleting caches that don't match that cache name ...");
+ for (let name of names) {
+ if(valid_cache_name != name) {
+ caches.delete(name);
+ console.log("[sw.js] checkversion: done requesting delete of cache " + name);
+ }
+ }
+ console.log("[sw.js] checkversion: done, exiting!");
+ } catch (e) {
+ console.log("[sw.js] checkversion: !!! ERRORS! (caught)");
+ }
+}
+
self.addEventListener("message", event => {
if (event.data) {
@@ -144,27 +168,7 @@ self.addEventListener("message", event => {
}
});
} else if (data.action.startsWith("checkversion")) {
- try {
- var names = await caches.keys();
- console.log("[sw.js] checkversion: ***** checkversion v0 for BežiApp ***** hello, world!");
- if(!(data.valid_cache_name == undefined || data.valid_cache_name == null || data.valid_cache_name == "")) {
- var valid_cache_name = data.valid_cache_name;
- console.log("[sw.js] checkversion: requested version (cachename) " + valid_cache_name);
- } else {
- var valid_cache_name = static_cache_name;
- console.log("[sw.js] checkversion: no version to keep specified, using current "+valid_cache_name+", but that makes no sense to me.");
- }
- console.log("[sw.js] checkversion: deleting caches that don't match that cache name ...");
- for (let name of names) {
- if(valid_cache_name != name) {
- caches.delete(name);
- console.log("[sw.js] checkversion: done requesting delete of cache " + name);
- }
- }
- console.log("[sw.js] checkversion: done, exiting!");
- } catch (e) {
- console.log("[sw.js] checkversion: !!! ERRORS! (caught)");
- }
+ sw_asynclycheckversion(data);
}
}
});