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

@@ -1,3 +1,9 @@
<script setup lang="ts">
import { getWarrenDirectory } from '~/lib/api/warrens';
const route = useRoute();
const entries = await getWarrenDirectory(route.path.split('/warrens/')[1]);
</script>
<template>
<DirectoryList />
<DirectoryList :entries="entries" />
</template>

View File

@@ -1,28 +1,22 @@
<script setup lang="ts">
import { ScrollArea } from '@/components/ui/scroll-area';
const warrens = ['Thyr', 'Serc'];
const store = useWarrenStore();
</script>
<template>
<ScrollArea class="w-full h-full">
<div class="flex flex-row gap-2">
<Button
v-for="(warren, i) in warrens"
:key="i"
class="w-36 h-12"
variant="outline"
size="lg"
as-child
<NuxtLink
v-for="(warren, uuid) in store.warrens"
:key="uuid"
:to="`/warrens/${uuid}`"
>
<NuxtLink
class="flex flex-row items-center gap-1.5"
:to="`/warrens/${warren}`"
>
<Button class="w-44 h-12" variant="outline" size="lg">
<Icon name="lucide:folder-root" />
{{ warren }}
</NuxtLink>
</Button>
<span clas="truncate">{{ warren.name }}</span>
</Button>
</NuxtLink>
</div>
</ScrollArea>
</template>