From 61a679dfb1c78ae070ecaa5a114019fb6cfe3c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Tue, 13 Oct 2020 23:13:42 +0200 Subject: [PATCH] =?UTF-8?q?About-Page=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit kwt --- src/boot/plugins.ts | 4 +- src/components/about/Developer.vue | 52 ++++++++++ src/layouts/MainLayout.vue | 39 +++---- src/layouts/OutLayout.vue | 16 +++ src/pages/about/About.vue | 106 +++++++++++++++++++- src/pages/about/NewAbout.vue | 14 --- src/pages/about/OldAbout.vue | 14 --- src/plugins/plugin-example/pages/Plugin.vue | 2 +- src/plugins/user-plugin/pages/Plugin.vue | 2 +- src/plugins/user/pages/User.vue | 2 +- src/router/routes.ts | 19 ++-- 11 files changed, 196 insertions(+), 74 deletions(-) create mode 100644 src/components/about/Developer.vue delete mode 100644 src/pages/about/NewAbout.vue delete mode 100644 src/pages/about/OldAbout.vue diff --git a/src/boot/plugins.ts b/src/boot/plugins.ts index f70c55b..f4eeede 100644 --- a/src/boot/plugins.ts +++ b/src/boot/plugins.ts @@ -161,6 +161,8 @@ export default boot(({ Vue, router, store }) => { console.log(routes); router.addRoutes(routes); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - Vue.prototype.$flaschengeist_plugins = pluginMainLinks; + Vue.prototype.$flaschengeistPluginsMainLinks = pluginMainLinks; + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + Vue.prototype.$flaschengeistPlugins = plugins; console.log(pluginMainLinks); }); diff --git a/src/components/about/Developer.vue b/src/components/about/Developer.vue new file mode 100644 index 0000000..70cd302 --- /dev/null +++ b/src/components/about/Developer.vue @@ -0,0 +1,52 @@ + + + diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index a336a9c..e5d2370 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -47,14 +47,7 @@ - + + + + @@ -105,27 +108,15 @@ import { defineComponent, ref, computed } from '@vue/composition-api'; const links = [ { name: 'about', - title: 'about', + title: 'Über Flaschengeist', link: 'about', - icon: 'mdi-information', - children: [ - { - title: 'Neues About', - link: 'newAbout', - icon: 'mdi-information-outline' - }, - { - title: 'Altes About', - link: 'oldAbout', - icon: 'mdi-information-variant' - } - ] + icon: 'mdi-information' } ]; declare module 'vue/types/vue' { interface Vue { - $flaschengeist_plugins: PluginMainLink[]; + $flaschengeistPluginsMainLinks: PluginMainLink[]; } } @@ -151,7 +142,7 @@ export default defineComponent({ const pluginChildLinks = computed(() => { const test: | PluginMainLink - | undefined = ctx.root.$flaschengeist_plugins.find( + | undefined = ctx.root.$flaschengeistPluginsMainLinks.find( (plugin: PluginMainLink) => { if (ctx.root.$route.matched.length > 1) { return plugin.name == ctx.root.$route.matched[1].name; diff --git a/src/layouts/OutLayout.vue b/src/layouts/OutLayout.vue index 1857789..9c4807e 100644 --- a/src/layouts/OutLayout.vue +++ b/src/layouts/OutLayout.vue @@ -13,6 +13,22 @@ Flaschengeist + + diff --git a/src/pages/about/About.vue b/src/pages/about/About.vue index 622af68..231ef63 100644 --- a/src/pages/about/About.vue +++ b/src/pages/about/About.vue @@ -1,17 +1,113 @@ diff --git a/src/pages/about/NewAbout.vue b/src/pages/about/NewAbout.vue deleted file mode 100644 index 8bda575..0000000 --- a/src/pages/about/NewAbout.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/src/pages/about/OldAbout.vue b/src/pages/about/OldAbout.vue deleted file mode 100644 index 99333f4..0000000 --- a/src/pages/about/OldAbout.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/src/plugins/plugin-example/pages/Plugin.vue b/src/plugins/plugin-example/pages/Plugin.vue index e17f683..0beeb75 100644 --- a/src/plugins/plugin-example/pages/Plugin.vue +++ b/src/plugins/plugin-example/pages/Plugin.vue @@ -15,7 +15,7 @@ import { mainLink } from '../plugin'; export default defineComponent({ // name: 'PageName' setup(_, ctx) { - const a = ctx.root.$flaschengeist_plugins; + const a = ctx.root.$flaschengeistPluginsMainLinks; return { a, mainLink }; } }); diff --git a/src/plugins/user-plugin/pages/Plugin.vue b/src/plugins/user-plugin/pages/Plugin.vue index e17f683..0beeb75 100644 --- a/src/plugins/user-plugin/pages/Plugin.vue +++ b/src/plugins/user-plugin/pages/Plugin.vue @@ -15,7 +15,7 @@ import { mainLink } from '../plugin'; export default defineComponent({ // name: 'PageName' setup(_, ctx) { - const a = ctx.root.$flaschengeist_plugins; + const a = ctx.root.$flaschengeistPluginsMainLinks; return { a, mainLink }; } }); diff --git a/src/plugins/user/pages/User.vue b/src/plugins/user/pages/User.vue index 4ff0feb..7ac07fd 100644 --- a/src/plugins/user/pages/User.vue +++ b/src/plugins/user/pages/User.vue @@ -21,7 +21,7 @@ import { mainLink } from '../plugin'; export default defineComponent({ // name: 'PageName' setup(_, ctx) { - const a = ctx.root.$flaschengeist_plugins; + const a = ctx.root.$flaschengeistPluginsMainLinks; return { a, mainLink }; } }); diff --git a/src/router/routes.ts b/src/router/routes.ts index 774aac9..ca5c399 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -10,6 +10,11 @@ const routes: RouteConfig[] = [ name: 'login', path: 'login', component: () => import('pages/Login.vue') + }, + { + name: 'about_out', + path: 'about', + component: () => import('pages/about/About.vue') } ] }, @@ -21,19 +26,7 @@ const routes: RouteConfig[] = [ { name: 'about', path: 'about', - component: () => import('pages/about/About.vue'), - children: [ - { - name: 'newAbout', - path: 'newAbout', - component: () => import('pages/about/NewAbout.vue') - }, - { - name: 'oldAbout', - path: 'oldAbout', - component: () => import('pages/about/OldAbout.vue') - } - ] + component: () => import('pages/about/About.vue') } ] },