aboutsummaryrefslogtreecommitdiffhomepage
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/app.js b/app.js
index def0be7..40830da 100644
--- a/app.js
+++ b/app.js
@@ -9,14 +9,14 @@ const app = new Vue({
9 }, 9 },
10 created: function () { 10 created: function () {
11 let that = this; 11 let that = this;
12 12
13 this.isDark = 'overrideDark' in localStorage ? 13 this.isDark = 'overrideDark' in localStorage ?
14 JSON.parse(localStorage.overrideDark) : matchMedia("(prefers-color-scheme: dark)").matches; 14 JSON.parse(localStorage.overrideDark) : matchMedia("(prefers-color-scheme: dark)").matches;
15 15
16 if ('vlayout' in localStorage) { 16 if ('vlayout' in localStorage) {
17 this.vlayout = JSON.parse(localStorage.vlayout) 17 this.vlayout = JSON.parse(localStorage.vlayout)
18 } 18 }
19 19
20 this.checkOffline(); 20 this.checkOffline();
21 that.getConfig().then(function (config) { 21 that.getConfig().then(function (config) {
22 that.config = config; 22 that.config = config;
@@ -58,8 +58,8 @@ const app = new Vue({
58 }, 58 },
59 toggleLayout: function() { 59 toggleLayout: function() {
60 this.vlayout = !this.vlayout; 60 this.vlayout = !this.vlayout;
61 localStorage.vlayout = this.vlayout; 61 localStorage.vlayout = this.vlayout;
62 }, 62 },
63 } 63 }
64}); 64});
65 65
@@ -95,6 +95,6 @@ Vue.component('service', {
95 95
96if ('serviceWorker' in navigator) { 96if ('serviceWorker' in navigator) {
97 window.addEventListener('load', function () { 97 window.addEventListener('load', function () {
98 navigator.serviceWorker.register('/worker.js'); 98 navigator.serviceWorker.register('worker.js');
99 }); 99 });
100} 100}