added install from github url to settings
This commit is contained in:
parent
0aaa40f4e5
commit
e3555b7b01
3 changed files with 38 additions and 19 deletions
|
@ -132,6 +132,7 @@
|
|||
<option value="dark.less">{{$root.getLz('settings.option.visual.theme.dark')}}</option>
|
||||
<option v-for="theme in themes" :value="theme">{{ theme.replace(".less", "") }}</option>
|
||||
</select>
|
||||
<button class="md-btn md-btn-small md-btn-block" @click="installTheme()" style="margin-top: 8px">Install from GitHub URL</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-option-line">
|
||||
|
@ -771,6 +772,22 @@
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
installTheme() {
|
||||
let self = this
|
||||
bootbox.prompt("Enter the URL of the theme you want to install", (result) => {
|
||||
if (result) {
|
||||
ipcRenderer.once("theme-installed", (event, arg) => {
|
||||
if (arg.success) {
|
||||
self.themes = ipcRenderer.sendSync("get-themes")
|
||||
notyf.success("Theme installed successfully");
|
||||
} else {
|
||||
notyf.error("Theme installation failed");
|
||||
}
|
||||
});
|
||||
ipcRenderer.invoke("get-github-theme", result)
|
||||
}
|
||||
});
|
||||
},
|
||||
copyLogs() {
|
||||
ipcRenderer.send('fetch-log')
|
||||
notyf.success(app.getLz('term.share.success'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue