show file sizes (basic version)

This commit is contained in:
2025-09-06 15:49:51 +02:00
parent cef77e86b7
commit 8c0d80d7fb
6 changed files with 71 additions and 37 deletions

View File

@@ -1,4 +1,5 @@
<script setup lang="ts">
import byteSize from 'byte-size';
import type { DirectoryEntry } from '~/shared/types';
const { entry } = defineProps<{ entry: DirectoryEntry }>();
@@ -28,12 +29,9 @@ const onDrop = onDirectoryEntryDrop(entry, true);
>({{ entry.name }})</span
></span
>
<NuxtTime
v-if="entry.createdAt != null"
:datetime="entry.createdAt * 1000"
class="text-muted-foreground w-full truncate text-sm"
relative
></NuxtTime>
<span class="text-muted-foreground w-full truncate text-sm">{{
byteSize(entry.size)
}}</span>
</div>
</button>
</template>