aboutsummaryrefslogtreecommitdiffhomepage
path: root/app.js
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2019-12-27 10:39:44 -0800
committerGitHub <noreply@github.com>2019-12-27 10:39:44 -0800
commitdb409f74e016b35421c2aaa2a5ade1e42553664e (patch)
tree8bb5434679911ad2302fedbea14d3853cd6b169b /app.js
parent7fd9dc6f10a30748cf63caf61ee71f602407d6ac (diff)
parent5738264ea00221c0ca128d5e7f74d31a8ec0490c (diff)
downloadhomer-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.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}