From 33fdb16dedecde4d1c6a877f76c12883663e7dae Mon Sep 17 00:00:00 2001 From: PiEgg Date: Sat, 19 Dec 2020 20:52:01 +0800 Subject: [PATCH] :bug: Fix: disabled plugin won't be shown in plugin page --- package.json | 2 +- src/main/apis/app/shortKey/shortKeyHandler.ts | 1 + src/main/events/picgoCoreIPC.ts | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 6687fd5..384d2e0 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "keycode": "^2.2.0", "lodash-id": "^0.14.0", "lowdb": "^1.0.0", - "picgo": "^1.4.12", + "picgo": "^1.4.14", "qrcode.vue": "^1.7.0", "vue": "^2.6.10", "vue-gallery": "^2.0.1", diff --git a/src/main/apis/app/shortKey/shortKeyHandler.ts b/src/main/apis/app/shortKey/shortKeyHandler.ts index a9ff5f1..f3edd98 100644 --- a/src/main/apis/app/shortKey/shortKeyHandler.ts +++ b/src/main/apis/app/shortKey/shortKeyHandler.ts @@ -35,6 +35,7 @@ class ShortKeyHandler { }) } private initPluginsShortKey () { + // get enabled plugin const pluginList = picgo.pluginLoader.getList() for (let item of pluginList) { const plugin = picgo.pluginLoader.getPlugin(item) diff --git a/src/main/events/picgoCoreIPC.ts b/src/main/events/picgoCoreIPC.ts index 63eb200..87623ea 100644 --- a/src/main/events/picgoCoreIPC.ts +++ b/src/main/events/picgoCoreIPC.ts @@ -58,7 +58,7 @@ const handleConfigWithFunction = (config: any[]) => { const handleGetPluginList = () => { ipcMain.on('getPluginList', (event: IpcMainEvent) => { - const pluginList = picgo.pluginLoader.getList() + const pluginList = picgo.pluginLoader.getFullList() const list = [] for (let i in pluginList) { const plugin = picgo.pluginLoader.getPlugin(pluginList[i]) diff --git a/yarn.lock b/yarn.lock index e956f08..cf3a868 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8289,10 +8289,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picgo@^1.4.12: - version "1.4.12" - resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.12.tgz#c8d1e496cba03795d41d94255fd8dc7567854e66" - integrity sha512-vPopTG66D97o/NmkLxx64oUNwCVWPuOoEaKYQa501VjKbWfmi63S0kLxXbIsoDNIM8rkU11VQinLnouL1Ufv/A== +picgo@^1.4.14: + version "1.4.14" + resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.14.tgz#312a1814d35eb8e326587d5cd99316b09a2882cc" + integrity sha512-r2i/Ox85xG5oskI4nemhdCU0SC/pxUzJ9np53qGC9qfQ2WumTLN5Ro09pDwFctxtI4Pl0jO03LAQ7hzVSX4rfA== dependencies: chalk "^2.4.1" commander "^2.17.0"