list warrens + explore nested folders

This commit is contained in:
2025-07-12 06:39:43 +02:00
parent f9f55895ed
commit 4d0765c53b
38 changed files with 1877 additions and 93 deletions

View File

@@ -14,18 +14,7 @@ import {
const route = useRoute();
const warrens = [
{
title: 'Thyr',
url: '/warrens/Thyr',
icon: h(Icon, { name: 'lucide:folder-root' }),
},
{
title: 'Serc',
url: '/warrens/Serc',
icon: h(Icon, { name: 'lucide:folder-root' }),
},
];
const store = useWarrenStore();
</script>
<template>
@@ -57,22 +46,24 @@ const warrens = [
<CollapsibleContent>
<SidebarMenuSub>
<SidebarMenuSubItem
v-for="warren in warrens"
:key="warren.title"
v-for="(warren, uuid) in store.warrens"
:key="uuid"
>
<SidebarMenuSubButton
as-child
:tooltip="warren.title"
:tooltip="warren.name"
:is-active="
warren.url === route.path
route.path.startsWith(
`/warrens/${uuid}`
)
"
class="transition-all"
>
<NuxtLink :to="warren.url">
<component
:is="warren.icon"
></component>
<span>{{ warren.title }}</span>
<NuxtLink :to="`/warrens/${uuid}`">
<Icon
name="lucide:folder-root"
/>
<span>{{ warren.name }}</span>
</NuxtLink>
</SidebarMenuSubButton>
</SidebarMenuSubItem>