fix for confirm

This commit is contained in:
booploops 2022-02-13 23:12:55 -08:00
parent 9a3274ff67
commit 2d9ca47f26

View file

@ -49,16 +49,18 @@
let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), { let msg = app.stringTemplateParser(app.getLz('settings.option.visual.theme.github.install.confirm'), {
repo: repo.full_name repo: repo.full_name
}); });
bootbox.confirm(msg, ()=>{ bootbox.confirm(msg, (res)=>{
ipcRenderer.once("theme-installed", (event, arg) => { if(res) {
if (arg.success) { ipcRenderer.once("theme-installed", (event, arg) => {
self.themes = ipcRenderer.sendSync("get-themes") if (arg.success) {
notyf.success(app.getLz('settings.notyf.visual.theme.install.success')); self.themes = ipcRenderer.sendSync("get-themes")
} else { notyf.success(app.getLz('settings.notyf.visual.theme.install.success'));
notyf.error(app.getLz('settings.notyf.visual.theme.install.error')); } else {
} notyf.error(app.getLz('settings.notyf.visual.theme.install.error'));
}); }
ipcRenderer.invoke("get-github-theme", repo.html_url) });
ipcRenderer.invoke("get-github-theme", repo.html_url)
}
}) })
}, },
installThemeURL() { installThemeURL() {