Files
AdventureLog/frontend/src/lib/components/shared/AppVersionDisplay.svelte
Sean Morley 7063eb77bf Enhance AboutModal and AppVersionDisplay components
- Added functionality to copy the app version to clipboard with user feedback via toasts.
- Improved layout and styling of the AboutModal for better user experience.
- Updated AppVersionDisplay to support different display variants.
- Added new translations for the "Copy version" feature in the localization files.
2026-06-26 21:34:11 -04:00

23 lines
858 B
Svelte

<script lang="ts">
import { appTitle, appVersion, appCodename } from '$lib/config';
export let size: 'sm' | 'md' = 'md';
export let variant: 'default' | 'inverse' = 'default';
$: titleClass = variant === 'inverse' ? 'text-primary-content' : 'text-primary';
$: versionClass = variant === 'inverse' ? 'text-primary-content/80' : 'text-base-content/70';
$: codenameClass = variant === 'inverse' ? 'text-primary-content/90' : 'text-secondary';
</script>
<p
class="flex flex-wrap items-baseline gap-x-1.5 gap-y-0.5 leading-snug m-0 w-full
{size === 'sm' ? 'text-sm' : 'text-lg'}"
>
<span class="font-bold {titleClass}">{appTitle}</span>
<span
class="font-mono tabular-nums tracking-tight {versionClass}
{size === 'sm' ? 'text-xs' : 'text-sm'}">{appVersion}</span
>
<span class="font-semibold italic {codenameClass}">{appCodename}</span>
</p>