mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
add ability to disable frontend plugins
This commit is contained in:
@@ -16,6 +16,8 @@ export const plugin: TandoorPlugin = {
|
|||||||
userNavigation: [
|
userNavigation: [
|
||||||
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: 'OpenData', to: {name: 'OpenDataPage', params: {}}},
|
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: 'OpenData', to: {name: 'OpenDataPage', params: {}}},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
disabled: true,
|
||||||
} as TandoorPlugin
|
} as TandoorPlugin
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,10 +10,14 @@ export type TandoorPlugin = {
|
|||||||
navigationDrawer: any[],
|
navigationDrawer: any[],
|
||||||
bottomNavigation: any[],
|
bottomNavigation: any[],
|
||||||
userNavigation: any[],
|
userNavigation: any[],
|
||||||
|
|
||||||
|
disabled?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const pluginModules = import.meta.glob('@/plugins/*/plugin.ts', { eager: true })
|
const pluginModules = import.meta.glob('@/plugins/*/plugin.ts', { eager: true })
|
||||||
export let TANDOOR_PLUGINS = [] as TandoorPlugin[]
|
export let TANDOOR_PLUGINS = [] as TandoorPlugin[]
|
||||||
Object.values(pluginModules).forEach(module => {
|
Object.values(pluginModules).forEach(module => {
|
||||||
TANDOOR_PLUGINS.push(module.plugin)
|
if(!module.plugin.disabled){
|
||||||
|
TANDOOR_PLUGINS.push(module.plugin)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user