From 01afa232c40aa7e68d212f82adc40f1ee66bd6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Wed, 14 Oct 2020 22:41:50 +0200 Subject: [PATCH] Zeigt jetzt auch die ShortCuts an. About-Page wurde noch ein bisschen angepasst. --- src/boot/plugins.ts | 13 +++++++++---- src/layouts/OutLayout.vue | 12 +++++++++++- src/pages/about/About.vue | 2 +- src/plugins/plugin-example/plugin.ts | 6 +++--- src/plugins/user-plugin/plugin.ts | 6 +++--- src/plugins/user/plugin.ts | 4 ++-- 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/src/boot/plugins.ts b/src/boot/plugins.ts index 9a9dd7c..fc0ed43 100644 --- a/src/boot/plugins.ts +++ b/src/boot/plugins.ts @@ -22,8 +22,8 @@ interface Plugin { store?: Module[]; mainLink: PluginMainLink; requiredModules: string[]; - shortCuts: ShortCutLink[]; - shortCutsOut: ShortCutLink[]; + shortcuts: ShortCutLink[]; + shortcutsOut: ShortCutLink[]; version: string; } @@ -156,8 +156,12 @@ function loadPlugin( loadedPlugins.mainLinks, plugin.mainLink ); - loadedPlugins.shortcuts.concat(plugin.shortCuts); - loadedPlugins.shortcutsOut.concat(plugin.shortCutsOut); + loadedPlugins.shortcuts = loadedPlugins.shortcuts.concat( + plugin.shortcuts + ); + loadedPlugins.shortcutsOut = loadedPlugins.shortcutsOut.concat( + plugin.shortcutsOut + ); loadedPlugins.plugins.push({ name: plugin.name, version: plugin.version @@ -206,4 +210,5 @@ export default boot(({ Vue, router, store }) => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access Vue.prototype.$flaschengeistPlugins = loadedPlugins; console.log(loadedPlugins); + console.log(Vue.prototype.$flaschengeistPlugins); }); diff --git a/src/layouts/OutLayout.vue b/src/layouts/OutLayout.vue index 9c4807e..858735e 100644 --- a/src/layouts/OutLayout.vue +++ b/src/layouts/OutLayout.vue @@ -13,6 +13,14 @@ Flaschengeist +
+ +
import { defineComponent } from '@vue/composition-api'; +import ShortCutLink from 'components/navigation/ShortCutLink.vue'; export default defineComponent({ - name: 'OutLayout' + name: 'OutLayout', + components: { ShortCutLink } }); diff --git a/src/pages/about/About.vue b/src/pages/about/About.vue index e6e5c63..24cf4b7 100644 --- a/src/pages/about/About.vue +++ b/src/pages/about/About.vue @@ -4,7 +4,7 @@ class="fit row justify-center content-center items-center" v-if="$route.name == 'about' || $route.name == 'about_out'" > - + diff --git a/src/plugins/plugin-example/plugin.ts b/src/plugins/plugin-example/plugin.ts index ce84cc2..ff47cdd 100644 --- a/src/plugins/plugin-example/plugin.ts +++ b/src/plugins/plugin-example/plugin.ts @@ -1,4 +1,4 @@ -import { Plugin, PluginMainLink } from 'boot/plugins'; +import { Plugin, PluginMainLink, ShortCutLink } from 'boot/plugins'; import routes from 'src/plugins/plugin-example/routes'; const mainLink: PluginMainLink = { @@ -27,8 +27,8 @@ const plugin: Plugin = { mainLink, name: mainLink.name, requiredModules: [], - shortCuts: [], - shortCutsOut: [], + shortcuts: [], + shortcutsOut: [], version: '1.0.2' }; diff --git a/src/plugins/user-plugin/plugin.ts b/src/plugins/user-plugin/plugin.ts index beeb0a9..45e5641 100644 --- a/src/plugins/user-plugin/plugin.ts +++ b/src/plugins/user-plugin/plugin.ts @@ -22,7 +22,7 @@ const mainLink: PluginMainLink = { ] }; -const shortCuts: ShortCutLink[] = [ +const shortcuts: ShortCutLink[] = [ { link: 'user-plugin2', icon: 'mdi-account-minus' @@ -34,8 +34,8 @@ const plugin: Plugin = { mainLink, name: mainLink.name, requiredModules: ['user'], - shortCuts, - shortCutsOut: [], + shortcuts, + shortcutsOut: [], version: '0.1.0' }; diff --git a/src/plugins/user/plugin.ts b/src/plugins/user/plugin.ts index d977e55..3bef5f6 100644 --- a/src/plugins/user/plugin.ts +++ b/src/plugins/user/plugin.ts @@ -14,8 +14,8 @@ const plugin: Plugin = { mainLink, name: mainLink.name, requiredModules: [], - shortCutsOut: [], - shortCuts: [], + shortcutsOut: [], + shortcuts: [], version: '0.0.1' };