directory entries show created at date

This commit is contained in:
2025-07-16 04:14:26 +02:00
parent ee6a1bc25c
commit a683f44ecb
5 changed files with 41 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ import {
} from '@/components/ui/context-menu';
import { deleteWarrenDirectory, deleteWarrenFile } from '~/lib/api/warrens';
import type { DirectoryEntry } from '~/types';
import { buttonVariants } from '@/components/ui/button';
const route = useRoute();
const warrenRoute = useWarrenRoute();
@@ -37,22 +38,27 @@ async function submitDelete(force: boolean = false) {
<NuxtLink
:to="joinPaths(route.path, entry.name)"
:class="[
'select-none',
'flex flex-row gap-4 bg-accent/30 border-1 border-border px-4 py-2 rounded-md select-none w-52',
{
'pointer-events-none':
disabled || entry.fileType === 'file',
},
]"
>
<Button
class="w-44 h-12"
variant="outline"
size="lg"
:disabled="disabled"
<div class="flex flex-row items-center">
<Icon class="size-6" :name="getFileIcon(entry.mimeType)" />
</div>
<div
class="flex flex-col gap-0 leading-6 overflow-hidden truncate"
>
<Icon :name="getFileIcon(entry.mimeType)" />
<span class="truncate">{{ entry.name }}</span>
</Button>
<span>{{ entry.name }}</span>
<NuxtTime
:datetime="entry.createdAt * 1000"
class="text-muted-foreground text-sm"
relative
></NuxtTime>
</div>
</NuxtLink>
</ContextMenuTrigger>
<ContextMenuContent>