Skip to content

Modern Docker Management, Designed for Everyone

refactor: simplify version info dialog

Kyle Mendelldbad48459bce
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 03858f1a4..f569f32d9 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -1883,7 +1883,6 @@
"sidebar_update_available_tooltip": "Update available: {version}",
"_comment_version_info": "=== VERSION INFO DIALOG ===",
"version_info_title": "About Arcane",
- "version_info_description": "Application version and build information",
"version_info_version": "Version",
"version_info_tag": "Image Tag",
"version_info_full_commit": "Full Commit Hash",
diff --git a/frontend/src/lib/components/dialogs/version-info-dialog.svelte b/frontend/src/lib/components/dialogs/version-info-dialog.svelte
index ffb61b186..93b8c678b 100644
--- a/frontend/src/lib/components/dialogs/version-info-dialog.svelte
+++ b/frontend/src/lib/components/dialogs/version-info-dialog.svelte
@@ -12,57 +12,71 @@
open: boolean;
onOpenChange: (open: boolean) => void;
versionInfo: AppVersionInformation;
+ debugMode?: boolean;
}
- let { open = $bindable(false), onOpenChange, versionInfo }: Props = $props();
+ let { open = $bindable(false), onOpenChange, versionInfo, debugMode = false }: Props = $props();
- const shortCommit = $derived(versionInfo.shortRevision || versionInfo.revision?.slice(0, 8) || '-');
- const shortDigest = $derived(versionInfo.currentDigest?.slice(0, 19) || '-');
- const enabledFeatures = $derived((versionInfo.enabledFeatures ?? []).filter(Boolean).join(', '));
+ const mockVersionInfo = {
+ displayVersion: 'v1.2.4-preview',
+ currentVersion: 'v1.2.4-preview',
+ currentTag: 'edge',
+ revision: 'b9c2a1240c83a54b73b5cf2e5d3f23a9b102837f',
+ goVersion: 'go1.22.1',
+ buildTime: '2026-04-15T12:00:00Z',
+ enabledFeatures: ['autologin'],
+ currentDigest: 'sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
+ releaseUrl: 'https://github.com/getarcaneapp/arcane/releases/tag/v1.2.4'
+ } as AppVersionInformation;
+
+ const displayInfo = $derived(debugMode ? mockVersionInfo : versionInfo);
+
+ const enabledFeatures = $derived((displayInfo.enabledFeatures ?? []).filter(Boolean).join(', '));
const accentColor = $derived($accentColorPreviewStore);
const logoUrl = $derived(getApplicationLogo(false, accentColor, accentColor));
</script>
-<ResponsiveDialog {open} {onOpenChange} description={m.version_info_description()} contentClass="sm:max-w-md">
+<ResponsiveDialog {open} {onOpenChange} contentClass="sm:max-w-md">
{#snippet title()}
- <div class="flex items-center gap-2">
- <img src={logoUrl} alt="Arcane" class="size-6" />
- {m.version_info_title()}
+ <div class="flex items-center gap-3">
+ <img src={logoUrl} alt="Arcane" class="size-7" />
+ <div class="flex flex-col gap-0.5">
+ <span class="text-xl leading-none">{m.version_info_title()}</span>
+ <span class="text-muted-foreground text-sm font-normal"
+ >{(displayInfo.displayVersion || displayInfo.currentVersion).replace(/^v/, '')}</span
+ >
+ </div>
</div>
{/snippet}
- <div class="flex flex-col gap-6 pt-4">
- <div class="space-y-1.5 rounded-lg border p-3">
- {@render infoRow(m.version_info_version(), versionInfo.displayVersion || versionInfo.currentVersion)}
+ <div class="flex flex-col gap-0 py-2">
+ {#if displayInfo.currentTag}
+ {@render infoRow(m.version_info_tag(), displayInfo.currentTag)}
+ {/if}
- {#if versionInfo.currentTag}
- {@render infoRow(m.version_info_tag(), versionInfo.currentTag)}
- {/if}
+ {@render infoRowWithCopy(m.version_info_full_commit(), displayInfo.revision, displayInfo.revision)}
- {@render infoRowWithCopy(m.version_info_full_commit(), shortCommit, versionInfo.revision)}
+ {@render infoRow(m.version_info_go_version(), displayInfo.goVersion || '-')}
- {@render infoRow(m.version_info_go_version(), versionInfo.goVersion || '-')}
+ {#if displayInfo.buildTime && displayInfo.buildTime !== 'unknown'}
+ {@render infoRow(m.version_info_build_time(), displayInfo.buildTime, false)}
+ {/if}
- {@render infoRow(m.version_info_build_features(), enabledFeatures)}
+ {@render infoRow(m.version_info_build_features(), enabledFeatures || '-')}
- {#if versionInfo.buildTime && versionInfo.buildTime !== 'unknown'}
- {@render infoRow(m.version_info_build_time(), versionInfo.buildTime, false)}
- {/if}
-
- {#if versionInfo.currentDigest}
- {@render infoRowWithCopy(m.version_info_digest(), shortDigest, versionInfo.currentDigest)}
- {/if}
- </div>
+ {#if displayInfo.currentDigest}
+ {@render infoRowWithCopy(m.version_info_digest(), displayInfo.currentDigest, displayInfo.currentDigest)}
+ {/if}
</div>
{#snippet footer()}
<div class="flex w-full flex-col gap-2 sm:flex-row sm:justify-end">
- {#if versionInfo.releaseUrl}
+ {#if displayInfo.releaseUrl}
<ArcaneButton
action="base"
tone="outline"
class="gap-2"
- onclick={() => window.open(versionInfo.releaseUrl, '_blank')}
+ onclick={() => window.open(displayInfo.releaseUrl, '_blank')}
icon={ExternalLinkIcon}
customLabel={m.version_info_view_release()}
/>
@@ -88,19 +102,24 @@
</ResponsiveDialog>
{#snippet infoRow(label: string, value: string | undefined | null, mono: boolean = true)}
- <div class="flex items-center justify-between gap-4">
- <span class="text-muted-foreground shrink-0 text-xs tracking-tight uppercase">{label}</span>
- <span class="text-sm {mono ? 'font-mono' : ''}" title={value ?? ''}>{value || '-'}</span>
+ <div class="border-border/50 flex flex-col items-start gap-1 border-b py-3 last:border-0">
+ <span class="text-foreground text-sm font-medium">{label}</span>
+ <span
+ class="text-sm break-all {mono ? 'text-muted-foreground font-mono text-xs' : 'text-muted-foreground'}"
+ title={value ?? ''}>{value || '-'}</span
+ >
</div>
{/snippet}
{#snippet infoRowWithCopy(label: string, displayValue: string, fullValue: string | undefined | null)}
- <div class="flex items-center justify-between gap-4">
- <span class="text-muted-foreground shrink-0 text-xs tracking-tight uppercase">{label}</span>
- <div class="flex items-center gap-2">
- <span class="font-mono text-sm" title={fullValue ?? ''}>{displayValue}</span>
+ <div class="border-border/50 flex flex-col items-start gap-1 border-b py-3 last:border-0">
+ <span class="text-foreground text-sm font-medium">{label}</span>
+ <div class="flex w-full items-start justify-between gap-2">
+ <span class="text-muted-foreground mt-0.5 font-mono text-xs break-all" title={fullValue ?? ''}
+ >{fullValue || displayValue}</span
+ >
{#if fullValue && fullValue !== 'unknown'}
- <CopyButton text={fullValue} size="icon" class="size-6" />
+ <CopyButton text={fullValue} size="icon" class="-mt-0.5 size-6 shrink-0" />
{/if}
</div>
</div>
diff --git a/frontend/src/lib/components/sidebar/sidebar.svelte b/frontend/src/lib/components/sidebar/sidebar.svelte
index 51abc4ce5..83de0b245 100644
--- a/frontend/src/lib/components/sidebar/sidebar.svelte
+++ b/frontend/src/lib/components/sidebar/sidebar.svelte
@@ -73,6 +73,7 @@
bind:open={showVersionDialog}
onOpenChange={(open) => (showVersionDialog = open)}
versionInfo={versionInformation}
+ debugMode={false}
/>
<EnvironmentSwitcherDialog bind:open={envSwitcherOpen} {isAdmin} />