feat: sub-pages for integrity reports

This commit is contained in:
izzy
2025-11-28 11:40:53 +00:00
parent d3abed3414
commit ca358f4dae
23 changed files with 785 additions and 179 deletions

View File

@@ -1,15 +1,17 @@
<script lang="ts">
import { ByteUnit } from '$lib/utils/byte-units';
import { Code, Icon, Text } from '@immich/ui';
import type { Snippet } from 'svelte';
interface Props {
icon: string;
icon?: string;
title: string;
value: number;
unit?: ByteUnit | undefined;
footer?: Snippet<[]>;
}
let { icon, title, value, unit = undefined }: Props = $props();
let { icon, title, value, unit = undefined, footer }: Props = $props();
const zeros = $derived(() => {
const maxLength = 13;
@@ -22,7 +24,9 @@
<div class="flex h-35 w-full flex-col justify-between rounded-3xl bg-subtle text-primary p-5">
<div class="flex place-items-center gap-4">
<Icon {icon} size="40" />
{#if icon}
<Icon {icon} size="40" />
{/if}
<Text size="large" fontWeight="bold" class="uppercase">{title}</Text>
</div>
@@ -32,4 +36,6 @@
<Code color="muted" class="absolute -top-5 end-1 font-light p-0">{unit}</Code>
{/if}
</div>
{@render footer?.()}
</div>