48 lines
1.0 KiB
Svelte
48 lines
1.0 KiB
Svelte
<script lang="ts">
|
|||
|
|
import type { Snippet } from 'svelte';
|
||
|
|
import type { AboutLink } from '../types';
|
||
|
|
import Dialog from './Dialog.svelte';
|
||
|
|
|
||
|
|
let {
|
||
|
|
brand = 'Application',
|
||
|
|
children,
|
||
|
|
description = '',
|
||
|
|
links = [],
|
||
|
|
open = $bindable(false),
|
||
|
|
version = ''
|
||
|
|
}: {
|
||
|
|
brand?: string;
|
||
|
|
children?: Snippet;
|
||
|
|
description?: string;
|
||
|
|
links?: AboutLink[];
|
||
|
|
open?: boolean;
|
||
|
|
version?: string;
|
||
|
|
} = $props();
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<Dialog bind:open title={`About ${brand}`}>
|
||
|
|
<div class="sc-auth-brand">
|
||
|
|
<span aria-hidden="true" class="sc-brand-mark">{brand.slice(0, 1).toUpperCase()}</span>
|
||
|
|
<strong>{brand}</strong>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
{#if version}
|
||
|
|
<p class="sc-muted">Version {version}</p>
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
{#if description}
|
||
|
|
<p class="sc-muted">{description}</p>
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
{#if children}
|
||
|
|
{@render children()}
|
||
|
|
{/if}
|
||
|
|
|
||
|
|
{#if links.length > 0}
|
||
|
|
<div class="sc-about-links">
|
||
|
|
{#each links as link}
|
||
|
|
<a href={link.href} rel="noreferrer" target="_blank">{link.label}</a>
|
||
|
|
{/each}
|
||
|
|
</div>
|
||
|
|
{/if}
|
||
|
|
</Dialog>
|