Merge branch 'mealie-recipes:mealie-next' into postgres-url-feature

This commit is contained in:
tba-code 2024-04-01 06:32:17 -05:00 committed by GitHub
commit 945810c47a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 48 deletions

View File

@ -6,8 +6,6 @@
v-model="sidebar" v-model="sidebar"
absolute absolute
:top-link="topLinks" :top-link="topLinks"
:secondary-header="cookbookLinks.length ? $tc('sidebar.cookbooks') : undefined"
:secondary-header-link="isOwnGroup && cookbookLinks.length ? `/g/${groupSlug}/cookbooks` : undefined"
:secondary-links="cookbookLinks || []" :secondary-links="cookbookLinks || []"
:bottom-links="isAdmin ? bottomLinks : []" :bottom-links="isAdmin ? bottomLinks : []"
> >
@ -146,14 +144,6 @@
to: `/g/${groupSlug.value}/r/create/new`, to: `/g/${groupSlug.value}/r/create/new`,
restricted: true, restricted: true,
}, },
{
insertDivider: true,
icon: $globals.icons.pages,
title: i18n.tc("sidebar.cookbook"),
subtitle: i18n.tc("sidebar.create-cookbook"),
to: `/g/${groupSlug.value}/cookbooks`,
restricted: true,
},
]); ]);
const bottomLinks = computed<SidebarLinks>(() => [ const bottomLinks = computed<SidebarLinks>(() => [
@ -191,22 +181,35 @@
restricted: true, restricted: true,
}, },
{ {
icon: $globals.icons.categories, icon: $globals.icons.book,
to: `/g/${groupSlug.value}/recipes/categories`, to: `/g/${groupSlug.value}/cookbooks`,
title: i18n.tc("sidebar.categories"), title: i18n.tc("cookbook.cookbooks"),
restricted: true, restricted: true,
}, },
{ {
icon: $globals.icons.tags, icon: $globals.icons.organizers,
to: `/g/${groupSlug.value}/recipes/tags`, title: "Organizers",
title: i18n.tc("sidebar.tags"),
restricted: true,
},
{
icon: $globals.icons.potSteam,
to: `/g/${groupSlug.value}/recipes/tools`,
title: i18n.tc("tool.tools"),
restricted: true, restricted: true,
children: [
{
icon: $globals.icons.categories,
to: `/g/${groupSlug.value}/recipes/categories`,
title: i18n.tc("sidebar.categories"),
restricted: true,
},
{
icon: $globals.icons.tags,
to: `/g/${groupSlug.value}/recipes/tags`,
title: i18n.tc("sidebar.tags"),
restricted: true,
},
{
icon: $globals.icons.potSteam,
to: `/g/${groupSlug.value}/recipes/tools`,
title: i18n.tc("tool.tools"),
restricted: true,
},
],
}, },
]); ]);

View File

@ -39,13 +39,12 @@
<v-list-item-title>{{ nav.title }}</v-list-item-title> <v-list-item-title>{{ nav.title }}</v-list-item-title>
</template> </template>
<v-list-item v-for="child in nav.children" :key="child.title" exact :to="child.to"> <v-list-item v-for="child in nav.children" :key="child.title" exact :to="child.to" class="ml-2">
<v-list-item-icon> <v-list-item-icon>
<v-icon>{{ child.icon }}</v-icon> <v-icon>{{ child.icon }}</v-icon>
</v-list-item-icon> </v-list-item-icon>
<v-list-item-title>{{ child.title }}</v-list-item-title> <v-list-item-title>{{ child.title }}</v-list-item-title>
</v-list-item> </v-list-item>
<v-divider class="mb-4"></v-divider>
</v-list-group> </v-list-group>
<!-- Single Item --> <!-- Single Item -->
@ -68,18 +67,8 @@
</template> </template>
<!-- Secondary Links --> <!-- Secondary Links -->
<template v-if="secondaryLinks"> <template v-if="secondaryLinks.length > 0">
<router-link v-if="secondaryHeader && secondaryHeaderLink" :to="secondaryHeaderLink" style="text-decoration: none;"> <v-divider class="mt-2"></v-divider>
<v-subheader :to="secondaryHeaderLink" class="pb-0">
{{ secondaryHeader }}
</v-subheader>
</router-link>
<div v-else-if="secondaryHeader">
<v-subheader :to="secondaryHeaderLink" class="pb-0">
{{ secondaryHeader }}
</v-subheader>
</div>
<v-divider v-if="secondaryHeader"></v-divider>
<v-list nav dense exact> <v-list nav dense exact>
<template v-for="nav in secondaryLinks"> <template v-for="nav in secondaryLinks">
<div v-if="!nav.restricted || isOwnGroup" :key="nav.title"> <div v-if="!nav.restricted || isOwnGroup" :key="nav.title">
@ -179,14 +168,6 @@ export default defineComponent({
required: false, required: false,
default: null, default: null,
}, },
secondaryHeader: {
type: String,
default: null,
},
secondaryHeaderLink: {
type: String,
default: null,
},
}, },
setup(props, context) { setup(props, context) {
// V-Model Support // V-Model Support

View File

@ -422,7 +422,7 @@
"carbohydrate-content": "Kohlenhydrate", "carbohydrate-content": "Kohlenhydrate",
"categories": "Kategorien", "categories": "Kategorien",
"comment-action": "Kommentieren", "comment-action": "Kommentieren",
"comment": "Kommentieren", "comment": "Kommentar",
"comments": "Kommentare", "comments": "Kommentare",
"delete-confirmation": "Bist du dir sicher, dass du dieses Rezept löschen möchtest?", "delete-confirmation": "Bist du dir sicher, dass du dieses Rezept löschen möchtest?",
"delete-recipe": "Rezept löschen", "delete-recipe": "Rezept löschen",

View File

@ -146,6 +146,8 @@ import {
mdiFlipVertical, mdiFlipVertical,
mdiRotateLeft, mdiRotateLeft,
mdiRotateRight, mdiRotateRight,
mdiBookOpenPageVariant,
mdiFileCabinet,
} from "@mdi/js"; } from "@mdi/js";
export const icons = { export const icons = {
@ -293,6 +295,8 @@ export const icons = {
tagArrowUp: mdiTagArrowUpOutline, tagArrowUp: mdiTagArrowUpOutline,
categories: mdiShapeOutline, categories: mdiShapeOutline,
pages: mdiBookOutline, pages: mdiBookOutline,
book: mdiBookOpenPageVariant,
organizers: mdiFileCabinet,
// Admin // Admin
user: mdiAccount, user: mdiAccount,

6
poetry.lock generated
View File

@ -1353,13 +1353,13 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp
[[package]] [[package]]
name = "mkdocs-material" name = "mkdocs-material"
version = "9.5.15" version = "9.5.16"
description = "Documentation that simply works" description = "Documentation that simply works"
optional = false optional = false
python-versions = ">=3.8" python-versions = ">=3.8"
files = [ files = [
{file = "mkdocs_material-9.5.15-py3-none-any.whl", hash = "sha256:e5c96dec3d19491de49ca643fc1dbb92b278e43cdb816c775bc47db77d9b62fb"}, {file = "mkdocs_material-9.5.16-py3-none-any.whl", hash = "sha256:32fce3cd8ecbd5dca6e5887cc0cf5bc78707a36f7d0f6f1bbbe9edaf428b8055"},
{file = "mkdocs_material-9.5.15.tar.gz", hash = "sha256:39f03cca45e82bf54eb7456b5a18bd252eabfdd67f237a229471484a0a4d4635"}, {file = "mkdocs_material-9.5.16.tar.gz", hash = "sha256:8b89b639592660f24657bb058de4aff0060cd0383148f8f51711201730f17503"},
] ]
[package.dependencies] [package.dependencies]