From 6a67cd8a547fddf99dfa35229d26eaa05d26d84d Mon Sep 17 00:00:00 2001 From: maikirakiwi Date: Mon, 17 Oct 2022 01:49:54 +0000 Subject: [PATCH] chore: Prettified Code [ci skip] --- src/renderer/main/vueapp.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/renderer/main/vueapp.js b/src/renderer/main/vueapp.js index 0627b90f..2b3b5f9f 100644 --- a/src/renderer/main/vueapp.js +++ b/src/renderer/main/vueapp.js @@ -302,8 +302,7 @@ const app = new Vue({ } else { return fetch(url, opts); } - } - , + }, setWindowHash(route = "") { this.setPagePos(); window.location.hash = `#${route}`; @@ -1304,20 +1303,19 @@ const app = new Vue({ const themes = ipcRenderer.sendSync("get-themes"); await asyncForEach(themes, async (theme) => { if (theme.commit != "") { - await app._fetch(`https://api.github.com/repos/${theme.github_repo}/commits`) - .then((res) => res.json()) - if (res[0].sha != theme.commit) { - const notify = notyf.open({ - className: "notyf-info", - type: "info", - message: app.stringTemplateParser(app.getLz("settings.notyf.visual.theme.updateAvailable"), { theme: theme.name }), - }); - notify.on("click", () => { - app.openSettingsPage("github-themes"); - notyf.dismiss(notify); - }); - } - }; + await app._fetch(`https://api.github.com/repos/${theme.github_repo}/commits`).then((res) => res.json()); + if (res[0].sha != theme.commit) { + const notify = notyf.open({ + className: "notyf-info", + type: "info", + message: app.stringTemplateParser(app.getLz("settings.notyf.visual.theme.updateAvailable"), { theme: theme.name }), + }); + notify.on("click", () => { + app.openSettingsPage("github-themes"); + notyf.dismiss(notify); + }); + } + } }); }, async setTheme(theme = "", onlyPrefs = false) {