diff options
author | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-07-10 16:03:26 +0200 |
---|---|---|
committer | Minteck <46352972+Minteck@users.noreply.github.com> | 2021-07-10 16:03:26 +0200 |
commit | c3b756f987ffd8ca981c1e6f23435c74aad36aea (patch) | |
tree | be6b4923dd4a3bbfc147e29421873028c39c9af3 /views/script/loader_global.js | |
parent | b9e7ec33542bb8041857eb997d17b29ffeae40c8 (diff) | |
download | kartik-client-c3b756f987ffd8ca981c1e6f23435c74aad36aea.tar.gz kartik-client-c3b756f987ffd8ca981c1e6f23435c74aad36aea.tar.bz2 kartik-client-c3b756f987ffd8ca981c1e6f23435c74aad36aea.zip |
Fixes
Diffstat (limited to 'views/script/loader_global.js')
-rw-r--r-- | views/script/loader_global.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 7c89d0f..db70d3b 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -9,13 +9,13 @@ window.addEventListener('load', () => { window.fetch("https://kartik.hopto.org/latest.php?v=" + require('@electron/remote').getCurrentWindow().update).then((data) => { data.blob().then((a) => { a.text().then((b) => { - if (require('@electron/remote').getCurrentWindow().update == "git") { + if (require('@electron/remote').getCurrentWindow().update === "git") { document.getElementById('updates').style.backgroundColor = "lightsalmon"; document.getElementById('updates').innerText = lang.updates.git; } else { console.log(b); console.log(require('../package.json').version); - if (b == require('../package.json').version) { + if (b === require('../package.json').version) { document.getElementById('updates').style.backgroundColor = "lightgreen"; document.getElementById('updates').innerText = lang.updates.ok; } else { @@ -42,6 +42,7 @@ window.addEventListener('load', () => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; + require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.updateError[0], message: lang.polymer.updateError[1]}); setTimeout(() => { document.getElementById('banner').style.width = "380px"; document.getElementById('banner').style.height = "auto"; @@ -61,6 +62,7 @@ window.addEventListener('load', () => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; + require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.updateError[0], message: lang.polymer.updateError[1]}); setTimeout(() => { document.getElementById('banner').style.width = "380px"; document.getElementById('banner').style.height = "auto"; @@ -80,6 +82,7 @@ window.addEventListener('load', () => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; + require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.updateError[0], message: lang.polymer.updateError[1]}); setTimeout(() => { document.getElementById('banner').style.width = "380px"; document.getElementById('banner').style.height = "auto"; |