diff --git a/server/plugins-manager.js b/server/plugins-manager.js index a1b13a4c..d0d9452c 100644 --- a/server/plugins-manager.js +++ b/server/plugins-manager.js @@ -43,6 +43,32 @@ class PluginsManager { } } } + + /** + * Install a Plugin + * @param {string} tarGzFileURL The url of tar.gz file + * @param {number} userID User ID - Used for streaming installing progress + */ + installPlugin(tarGzFileURL, userID = undefined) { + + } + + /** + * Remove a plugin + * @param pluginID + */ + removePlugin(pluginID) { + + } + + /** + * Update a plugin + * Only available for plugins which were downloaded from the official list + * @param pluginID + */ + updatePlugin(pluginID) { + + } } class Plugin { diff --git a/src/components/PluginItem.vue b/src/components/PluginItem.vue index bfd5bd2d..a3ad9d8a 100644 --- a/src/components/PluginItem.vue +++ b/src/components/PluginItem.vue @@ -2,7 +2,10 @@
{{ plugin.name }}
-

{{ plugin.description }}

+

+ {{ plugin.description }} +

+ {{ $t("Version") }}: {{ plugin.version }}
@@ -35,5 +38,8 @@ export default { margin-bottom: 0; } + .version { + font-size: 13px; + } } diff --git a/src/components/settings/Plugins.vue b/src/components/settings/Plugins.vue index 7446dd13..c214d737 100644 --- a/src/components/settings/Plugins.vue +++ b/src/components/settings/Plugins.vue @@ -1,7 +1,7 @@ @@ -15,12 +15,15 @@ export default { data() { return { - pluginList: [], - pluginListMsg: "", + remotePluginList: [], + remotePluginListMsg: "", }; }, computed: { + pluginList() { + return this.$parent.$parent.$parent.pluginList; + }, settings() { return this.$parent.$parent.$parent.settings; }, @@ -33,14 +36,14 @@ export default { }, async mounted() { - this.pluginListMsg = this.$t("Loading") + "..."; + this.remotePluginListMsg = this.$t("Loading") + "..."; this.$root.getSocket().emit("getPluginList", (res) => { if (res.ok) { - this.pluginList = res.pluginList; - this.pluginListMsg = ""; + this.remotePluginList = res.pluginList; + this.remotePluginListMsg = ""; } else { - this.pluginListMsg = this.$t("loadingError") + " " + res.message; + this.remotePluginListMsg = this.$t("loadingError") + " " + res.message; } }); },