diff options
author | Bastien Wirtz <bastien.wirtz@gmail.com> | 2019-12-27 10:39:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 10:39:44 -0800 |
commit | db409f74e016b35421c2aaa2a5ade1e42553664e (patch) | |
tree | 8bb5434679911ad2302fedbea14d3853cd6b169b /app.js | |
parent | 7fd9dc6f10a30748cf63caf61ee71f602407d6ac (diff) | |
parent | 5738264ea00221c0ca128d5e7f74d31a8ec0490c (diff) | |
download | homer-db409f74e016b35421c2aaa2a5ade1e42553664e.tar.gz homer-db409f74e016b35421c2aaa2a5ade1e42553664e.tar.zst homer-db409f74e016b35421c2aaa2a5ade1e42553664e.zip |
Merge branch 'master' into dynamic-message
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 | ||
116 | if ('serviceWorker' in navigator) { | 116 | if ('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 | } |