mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-08-28 11:36:58 +08:00
Fixed: #116 || added proxy option
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<span v-if="item.ing" class="config-button ing">
|
||||
卸载中
|
||||
进行中
|
||||
</span>
|
||||
<template v-else>
|
||||
<i
|
||||
@@ -145,6 +145,16 @@ export default {
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$electron.ipcRenderer.on('updateSuccess', (evt, plugin) => {
|
||||
this.loading = false
|
||||
this.pluginList.forEach(item => {
|
||||
if (item.name === plugin) {
|
||||
item.ing = false
|
||||
item.hasInstall = true
|
||||
}
|
||||
})
|
||||
this.getPluginList()
|
||||
})
|
||||
this.$electron.ipcRenderer.on('uninstallSuccess', (evt, plugin) => {
|
||||
this.loading = false
|
||||
this.pluginList = this.pluginList.filter(item => {
|
||||
@@ -185,6 +195,11 @@ export default {
|
||||
click () {
|
||||
_this.uninstallPlugin(plugin.name)
|
||||
}
|
||||
}, {
|
||||
label: '更新插件',
|
||||
click () {
|
||||
_this.updatePlugin(plugin.name)
|
||||
}
|
||||
}]
|
||||
for (let i in plugin.config) {
|
||||
if (plugin.config[i].config.length > 0) {
|
||||
@@ -218,6 +233,14 @@ export default {
|
||||
})
|
||||
this.$electron.ipcRenderer.send('uninstallPlugin', val)
|
||||
},
|
||||
updatePlugin (val) {
|
||||
this.pluginList.forEach(item => {
|
||||
if (item.name === val) {
|
||||
item.ing = true
|
||||
}
|
||||
})
|
||||
this.$electron.ipcRenderer.send('updatePlugin', val)
|
||||
},
|
||||
reloadApp () {
|
||||
this.$electron.remote.app.relaunch()
|
||||
this.$electron.remote.app.exit(0)
|
||||
@@ -296,6 +319,7 @@ export default {
|
||||
this.$electron.ipcRenderer.removeAllListeners('pluginList')
|
||||
this.$electron.ipcRenderer.removeAllListeners('installSuccess')
|
||||
this.$electron.ipcRenderer.removeAllListeners('uninstallSuccess')
|
||||
this.$electron.ipcRenderer.removeAllListeners('updateSuccess')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user