chore: Prettified Code
[ci skip]
This commit is contained in:
parent
97cc718dc0
commit
6a67cd8a54
1 changed files with 14 additions and 16 deletions
|
@ -302,8 +302,7 @@ const app = new Vue({
|
||||||
} else {
|
} else {
|
||||||
return fetch(url, opts);
|
return fetch(url, opts);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
,
|
|
||||||
setWindowHash(route = "") {
|
setWindowHash(route = "") {
|
||||||
this.setPagePos();
|
this.setPagePos();
|
||||||
window.location.hash = `#${route}`;
|
window.location.hash = `#${route}`;
|
||||||
|
@ -1304,20 +1303,19 @@ const app = new Vue({
|
||||||
const themes = ipcRenderer.sendSync("get-themes");
|
const themes = ipcRenderer.sendSync("get-themes");
|
||||||
await asyncForEach(themes, async (theme) => {
|
await asyncForEach(themes, async (theme) => {
|
||||||
if (theme.commit != "") {
|
if (theme.commit != "") {
|
||||||
await app._fetch(`https://api.github.com/repos/${theme.github_repo}/commits`)
|
await app._fetch(`https://api.github.com/repos/${theme.github_repo}/commits`).then((res) => res.json());
|
||||||
.then((res) => res.json())
|
if (res[0].sha != theme.commit) {
|
||||||
if (res[0].sha != theme.commit) {
|
const notify = notyf.open({
|
||||||
const notify = notyf.open({
|
className: "notyf-info",
|
||||||
className: "notyf-info",
|
type: "info",
|
||||||
type: "info",
|
message: app.stringTemplateParser(app.getLz("settings.notyf.visual.theme.updateAvailable"), { theme: theme.name }),
|
||||||
message: app.stringTemplateParser(app.getLz("settings.notyf.visual.theme.updateAvailable"), { theme: theme.name }),
|
});
|
||||||
});
|
notify.on("click", () => {
|
||||||
notify.on("click", () => {
|
app.openSettingsPage("github-themes");
|
||||||
app.openSettingsPage("github-themes");
|
notyf.dismiss(notify);
|
||||||
notyf.dismiss(notify);
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async setTheme(theme = "", onlyPrefs = false) {
|
async setTheme(theme = "", onlyPrefs = false) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue