mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
27 lines
813 B
Svelte
27 lines
813 B
Svelte
<script lang="ts">
|
|
import { ActionEntryButton } from "#lib/components/atoms/index.js";
|
|
import { DirectoryEntryLabel } from "#lib/components/molecules/index.js";
|
|
import { getFileThumbnail } from "#lib/client/cache/index.js";
|
|
import type { SummarizedFileInfo } from "#lib/modules/filesystem/index.js";
|
|
import { formatDateTime } from "#lib/utils/index.js";
|
|
|
|
interface Props {
|
|
info: SummarizedFileInfo;
|
|
onclick: () => void;
|
|
}
|
|
|
|
let { info, onclick }: Props = $props();
|
|
|
|
let thumbnail = $derived(getFileThumbnail(info));
|
|
</script>
|
|
|
|
<ActionEntryButton class="h-14" {onclick}>
|
|
<DirectoryEntryLabel
|
|
type="file"
|
|
thumbnail={thumbnail?.url}
|
|
name={info.name}
|
|
subtext={formatDateTime(info.createdAt ?? info.lastModifiedAt)}
|
|
isFavorite={info.isFavorite}
|
|
/>
|
|
</ActionEntryButton>
|