mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 23:58:15 -05:00
playing with plugins
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<component :is="item.component" :="item" v-for="item in useNavigation().getUserNavigation()"></component>
|
||||
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getUserNavigation()"></component>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-avatar>
|
||||
@@ -79,7 +79,7 @@
|
||||
<v-list-item-subtitle>{{ useUserPreferenceStore().activeSpace.name }}</v-list-item-subtitle>
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<component :is="item.component" :="item" v-for="item in useNavigation().NAVIGATION_DRAWER"></component>
|
||||
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getNavigationDrawer()"></component>
|
||||
|
||||
<navigation-drawer-context-menu></navigation-drawer-context-menu>
|
||||
</v-list>
|
||||
@@ -113,7 +113,7 @@
|
||||
<v-icon icon="fa-fw fas fa-bars"></v-icon>
|
||||
<v-bottom-sheet activator="parent" close-on-content-click>
|
||||
<v-list nav>
|
||||
<component :is="item.component" :="item" v-for="item in useNavigation().BOTTOM_NAVIGATION"></component>
|
||||
<component :is="item.component" :="item" :key="item.title" v-for="item in useNavigation().getBottomNavigation()"></component>
|
||||
</v-list>
|
||||
</v-bottom-sheet>
|
||||
</v-btn>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { createRulesPlugin } from 'vuetify/labs/rules'
|
||||
|
||||
import {setupI18n} from "@/i18n";
|
||||
import MealPlanPage from "@/pages/MealPlanPage.vue";
|
||||
import {TandoorPlugin} from "@/types/Plugins.ts";
|
||||
import {TANDOOR_PLUGINS, TandoorPlugin} from "@/types/Plugins.ts";
|
||||
|
||||
let routes = [
|
||||
{path: '/', component: () => import("@/pages/StartPage.vue"), name: 'StartPage'},
|
||||
@@ -56,11 +56,9 @@ let routes = [
|
||||
{path: '/space-setup', component: () => import("@/pages/SpaceSetupPage.vue"), name: 'SpaceSetupPage'},
|
||||
]
|
||||
|
||||
const pluginModules = import.meta.glob('@/plugins/*/plugin.ts', { eager: true })
|
||||
const tandoorPlugins = [] as TandoorPlugin[]
|
||||
Object.values(pluginModules).forEach(module => {
|
||||
tandoorPlugins.push(module.plugin)
|
||||
routes = routes.concat(module.plugin.routes)
|
||||
// load plugin routes into routing table
|
||||
TANDOOR_PLUGINS.forEach(plugin => {
|
||||
routes = routes.concat(plugin.routes)
|
||||
})
|
||||
|
||||
const router = createRouter({
|
||||
|
||||
Reference in New Issue
Block a user