aboutsummaryrefslogtreecommitdiffhomepage
path: root/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'app.js')
-rw-r--r--app.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app.js b/app.js
index 93902d8..6c2ba90 100644
--- a/app.js
+++ b/app.js
@@ -10,13 +10,13 @@ const app = new Vue({
10 created: async function () { 10 created: async 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 try { 21 try {
22 this.config = await this.getConfig(); 22 this.config = await this.getConfig();
@@ -78,8 +78,8 @@ const app = new Vue({
78 }, 78 },
79 toggleLayout: function() { 79 toggleLayout: function() {
80 this.vlayout = !this.vlayout; 80 this.vlayout = !this.vlayout;
81 localStorage.vlayout = this.vlayout; 81 localStorage.vlayout = this.vlayout;
82 }, 82 },
83 } 83 }
84}); 84});
85 85
@@ -115,6 +115,6 @@ Vue.component('service', {
115 115
116if ('serviceWorker' in navigator) { 116if ('serviceWorker' in navigator) {
117 window.addEventListener('load', function () { 117 window.addEventListener('load', function () {
118 navigator.serviceWorker.register('/worker.js'); 118 navigator.serviceWorker.register('worker.js');
119 }); 119 });
120} 120}