Update index.html
authormarcelveldt <marcelvanderveldt@MacBook-Pro.local>
Thu, 16 May 2019 21:25:35 +0000 (23:25 +0200)
committermarcelveldt <marcelvanderveldt@MacBook-Pro.local>
Thu, 16 May 2019 21:25:35 +0000 (23:25 +0200)
music_assistant/web/index.html

index 3992e87c6c8f30002679593740dd3b592b706493..ed1448b2ce58298fda86031a891135487863631d 100755 (executable)
             watch: {},
             mounted() {
             },
+            created() {
+                // little hack to force refresh PWA on iOS by simple reloading it every hour
+                var d = new Date();
+                var cur_update = d.getDay() + d.getHours();
+                if (localStorage.getItem('last_update') != cur_update)
+                {
+                    localStorage.setItem('last_update', cur_update);
+                    window.location.reload(true);
+                }
+            },
             data: { },
             methods: {},
             router