mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-24 15:49:42 +02:00
refactor(frontend): 🚧 Add group/user CRUD support for admins
This commit is contained in:
parent
917177da5b
commit
695d7e96ae
46 changed files with 2015 additions and 102 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<v-navigation-drawer :value="value" clipped app width="200px">
|
||||
<v-navigation-drawer :value="value" clipped app>
|
||||
<!-- User Profile -->
|
||||
<template v-if="$auth.user">
|
||||
<v-list-item two-line to="/user/profile">
|
||||
|
@ -14,11 +14,11 @@
|
|||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
</template>
|
||||
|
||||
|
||||
<!-- Primary Links -->
|
||||
<v-list nav dense>
|
||||
<v-list-item-group v-model="topSelected" color="primary">
|
||||
<v-list-item v-for="nav in topLink" :key="nav.title" link :to="nav.to">
|
||||
<v-list-item v-for="nav in topLink" :key="nav.title" exact link :to="nav.to">
|
||||
<v-list-item-icon>
|
||||
<v-icon>{{ nav.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
|
@ -29,16 +29,40 @@
|
|||
|
||||
<!-- Secondary Links -->
|
||||
<template v-if="secondaryLinks">
|
||||
<v-subheader v-if="secondaryHeader" class="pb-0">{{ secondaryHeader }}</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-list nav dense>
|
||||
<v-list-item-group v-model="secondarySelected" color="primary">
|
||||
<v-list-item v-for="nav in secondaryLinks" :key="nav.title" link :to="nav.to">
|
||||
<v-list-item-icon>
|
||||
<v-icon>{{ nav.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ nav.title }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list-item-group>
|
||||
<template v-for="nav in secondaryLinks">
|
||||
<!-- Multi Items -->
|
||||
<v-list-group
|
||||
v-if="nav.children"
|
||||
:key="nav.title + 'multi-item'"
|
||||
v-model="dropDowns[nav.title]"
|
||||
color="primary"
|
||||
:prepend-icon="nav.icon"
|
||||
>
|
||||
<template #activator>
|
||||
<v-list-item-title>{{ nav.title }}</v-list-item-title>
|
||||
</template>
|
||||
|
||||
<v-list-item v-for="child in nav.children" :key="child.title" :to="child.to">
|
||||
<v-list-item-icon>
|
||||
<v-icon>{{ child.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ child.title }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list-group>
|
||||
|
||||
<!-- Single Item -->
|
||||
<v-list-item-group v-else :key="nav.title + 'single-item'" v-model="secondarySelected" color="primary">
|
||||
<v-list-item link :to="nav.to">
|
||||
<v-list-item-icon>
|
||||
<v-icon>{{ nav.icon }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>{{ nav.title }}</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list-item-group>
|
||||
</template>
|
||||
</v-list>
|
||||
</template>
|
||||
|
||||
|
@ -93,12 +117,17 @@ export default defineComponent({
|
|||
required: false,
|
||||
default: null,
|
||||
},
|
||||
secondaryHeader: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dropDowns: {},
|
||||
topSelected: null,
|
||||
secondarySelected: null,
|
||||
bottomSelected: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue