From a19570c20586cc101ecdfb93536fd75ccf911d42 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Tue, 30 Jan 2018 19:12:13 +0200 Subject: [PATCH] PluginCard --- client/src/ui/components/bd/PluginCard.vue | 76 +++++++++++++++++++++- 1 file changed, 73 insertions(+), 3 deletions(-) diff --git a/client/src/ui/components/bd/PluginCard.vue b/client/src/ui/components/bd/PluginCard.vue index d54a7567..e387b6af 100644 --- a/client/src/ui/components/bd/PluginCard.vue +++ b/client/src/ui/components/bd/PluginCard.vue @@ -1,6 +1,76 @@ +/** + * BetterDiscord Plugin Card Component + * Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks + * All rights reserved. + * https://betterdiscord.net + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. +*/ + \ No newline at end of file + // Imports + import { shell } from 'electron'; + import { Button, ButtonGroup, SettingSwitch } from '../common'; + import MiSettings from 'vue-material-design-icons/settings.vue'; + import MiReload from 'vue-material-design-icons/refresh.vue'; + import MiEdit from 'vue-material-design-icons/pencil.vue'; + import MiDelete from 'vue-material-design-icons/delete.vue'; + + export default { + data() { + return { + settingsOpen: false + } + }, + props: ['plugin', 'togglePlugin', 'reloadPlugin', 'showSettings'], + components: { + Button, ButtonGroup, SettingSwitch, + MiSettings, MiReload, MiEdit, MiDelete + }, + methods: { + editPlugin() { + try { + shell.openItem(this.plugin.pluginPath); + } catch (err) { + console.log(err); + } + } + } + + } +