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,24 +1,30 @@
<script setup lang="ts">
import type { DirectoryEntryType } from '~/types';
import type { FileType } from '~/types';
const route = useRoute();
const { name, entryType } = defineProps<{
const { name, entryType, disabled } = defineProps<{
name: string;
entryType: DirectoryEntryType;
entryType: FileType;
disabled: boolean,
}>();
const iconName = entryType === 'file' ? 'lucide:file' : 'lucide:folder';
</script>
<template>
<Button class="w-36 h-12" variant="outline" size="lg">
<NuxtLink
class="flex flex-row items-center gap-1.5"
:to="joinPaths(route.path, name)"
<NuxtLink
:to="joinPaths(route.path, name)"
:class="['select-none', { 'pointer-events-none': disabled }]"
>
<Button
class="w-44 h-12"
variant="outline"
size="lg"
:disabled="disabled"
>
<Icon :name="iconName" />
<span>{{ name }}</span>
</NuxtLink>
</Button>
<span class="truncate">{{ name }}</span>
</Button>
</NuxtLink>
</template>