Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
refactor: ui tweaks and consistent styling across pages (#1210)
Chase Baucomc349492d0310
diff --git a/frontend/messages/en.json b/frontend/messages/en.jsonindex f48e27728..20cb2d0ea 100644--- a/frontend/messages/en.json+++ b/frontend/messages/en.json@@ -125,6 +125,8 @@"common_search": "Search…","common_usage": "Usage","common_reset": "Reset",+ "common_unsaved_changes": "Unsaved changes",+ "common_all_changes_saved": "All changes saved","common_remove_selected_count": "Remove Selected ({count})","common_toggle_columns": "Toggle columns","common_select_all": "Select all",@@ -299,6 +301,8 @@"dashboard_meter_gpu": "GPU Usage","dashboard_meter_gpu_device": "device","dashboard_meter_gpu_devices": "devices",+ "dashboard_meter_usage": "Usage",+ "dashboard_meter_capacity": "Capacity","_comment_containers": "=== CONTAINERS ===","containers_title": "Containers","containers_subtitle": "View and Manage your Containers",diff --git a/frontend/src/app.css b/frontend/src/app.cssindex 09d7ce1f5..8e7527c68 100644--- a/frontend/src/app.css+++ b/frontend/src/app.css@@ -417,6 +417,14 @@ main {overflow-x: hidden;}-html {- scrollbar-gutter: stable;+@media (max-width: 768px) {+ .mobile-centered-popover {+ position: fixed !important;+ top: 50% !important;+ left: 50% !important;+ transform: translate(-50%, -50%) !important;+ width: 90vw !important;+ max-width: 24rem !important;+ margin: 0 !important;+ }}diff --git a/frontend/src/lib/components/action-button-group/action-button-group.svelte b/frontend/src/lib/components/action-button-group/action-button-group.sveltenew file mode 100644index 000000000..29cb699fd--- /dev/null+++ b/frontend/src/lib/components/action-button-group/action-button-group.svelte@@ -0,0 +1,220 @@+<script lang="ts">+ import { ArcaneButton } from '$lib/components/arcane-button/index.js';+ import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';+ import type { Action, ArcaneButtonSize } from '$lib/components/arcane-button/index.js';+ import { EllipsisIcon } from '$lib/icons';+ import { cn } from '$lib/utils';++ export interface ActionButton {+ id: string;+ action: Action;+ label: string;+ loadingLabel?: string;+ loading?: boolean;+ disabled?: boolean;+ onclick: () => void;+ showOnMobile?: boolean;+ badge?: string | number;+ }++ interface Props {+ buttons?: ActionButton[];+ size?: ArcaneButtonSize;+ class?: string;+ }++ let { buttons = [], size = 'default', class: className = '' }: Props = $props();++ const DROPDOWN_WIDTH = $derived(size === 'sm' ? 44 : 48);+ const GAP = 8;++ let containerWidth = $state(0);+ let buttonWidths = $state<number[]>([]);+ let measurementNode: HTMLElement | null = null;++ const visibleCount = $derived.by(() => {+ const total = buttons.length;+ if (total === 0 || buttonWidths.length === 0 || containerWidth === 0) {+ return total;+ }++ const totalWidth = buttonWidths.reduce((sum, w, i) => sum + w + (i > 0 ? GAP : 0), 0);+ if (totalWidth <= containerWidth) {+ return total;+ }++ let usedWidth = DROPDOWN_WIDTH;+ for (let i = 0; i < total; i++) {+ const needed = buttonWidths[i] + (i > 0 ? GAP : 0);+ if (usedWidth + needed > containerWidth) {+ return i;+ }+ usedWidth += needed;+ }+ return total;+ });++ const visibleButtons = $derived(buttons.slice(0, visibleCount));+ const overflowButtons = $derived(buttons.slice(visibleCount));++ function measureButtons(node: HTMLElement) {+ measurementNode = node;+ return {+ destroy: () => {+ measurementNode = null;+ }+ };+ }++ $effect(() => {+ const actionButtons = buttons;+ if (!measurementNode || actionButtons.length === 0) return;++ const timeoutId = setTimeout(() => {+ requestAnimationFrame(() => {+ if (!measurementNode) return;+ const widths: number[] = [];+ for (const child of measurementNode.children) {+ widths.push((child as HTMLElement).offsetWidth);+ }+ if (widths.length > 0 && widths.length === actionButtons.length) {+ buttonWidths = widths;+ }+ });+ }, 0);++ return () => clearTimeout(timeoutId);+ });++ function observeWidth(node: HTMLElement) {+ let rafId: number | null = null;+ const ro = new ResizeObserver((entries) => {+ if (rafId) cancelAnimationFrame(rafId);+ rafId = requestAnimationFrame(() => {+ const width = entries[0]?.contentRect.width ?? 0;+ if (width > 0 && width !== containerWidth) {+ containerWidth = width;+ }+ });+ });+ ro.observe(node);+ return {+ destroy: () => {+ if (rafId) cancelAnimationFrame(rafId);+ ro.disconnect();+ }+ };+ }+</script>++{#if buttons.length > 0}+ <div class={cn('flex min-w-0 flex-1 items-center justify-end gap-2', className)} use:observeWidth>+ <div use:measureButtons class="pointer-events-none invisible fixed -left-[9999px] flex items-center gap-2" aria-hidden="true">+ {#each buttons as button (button.id)}+ <ArcaneButton+ action={button.action}+ customLabel={button.label}+ loadingLabel={button.loadingLabel}+ loading={button.loading}+ disabled={button.disabled}+ onclick={() => {}}+ {size}+ >+ {#if button.badge !== undefined}+ <span class="text-muted-foreground rounded-full border px-1 py-0.5 text-[10px]">+ {button.badge}+ </span>+ {/if}+ </ArcaneButton>+ {/each}+ </div>++ <div class="hidden items-center gap-2 lg:flex">+ {#each visibleButtons as button (button.id)}+ <ArcaneButton+ action={button.action}+ customLabel={button.label}+ loadingLabel={button.loadingLabel}+ loading={button.loading}+ disabled={button.disabled}+ onclick={button.onclick}+ {size}+ >+ {#if button.badge !== undefined}+ <span class="text-muted-foreground rounded-full border px-1 py-0.5 text-[10px]">+ {button.badge}+ </span>+ {/if}+ </ArcaneButton>+ {/each}++ {#if overflowButtons.length > 0}+ <DropdownMenu.Root>+ <DropdownMenu.Trigger>+ {#snippet child({ props })}+ <ArcaneButton+ {...props}+ action="base"+ tone="outline"+ size="icon"+ class={cn('shrink-0', size === 'sm' ? 'size-8' : 'size-9')}+ >+ <span class="sr-only">More actions</span>+ <EllipsisIcon class="size-4" />+ </ArcaneButton>+ {/snippet}+ </DropdownMenu.Trigger>++ <DropdownMenu.Content align="end" class="min-w-[160px]">+ <DropdownMenu.Group>+ {#each overflowButtons as button (button.id)}+ <DropdownMenu.Item onclick={button.onclick} disabled={button.disabled || button.loading}>+ <div class="flex w-full items-center justify-between gap-2">+ <span>{button.loading ? button.loadingLabel || button.label : button.label}</span>+ {#if button.badge !== undefined}+ <span class="text-muted-foreground text-[10px]">({button.badge})</span>+ {/if}+ </div>+ </DropdownMenu.Item>+ {/each}+ </DropdownMenu.Group>+ </DropdownMenu.Content>+ </DropdownMenu.Root>+ {/if}+ </div>++ <div class="flex items-center gap-2 lg:hidden">+ <DropdownMenu.Root>+ <DropdownMenu.Trigger>+ {#snippet child({ props })}+ <ArcaneButton+ {...props}+ action="base"+ tone="outline"+ size="icon"+ class={cn('shrink-0', size === 'sm' ? 'size-8' : 'size-9')}+ >+ <span class="sr-only">More actions</span>+ <EllipsisIcon class="size-4" />+ </ArcaneButton>+ {/snippet}+ </DropdownMenu.Trigger>++ <DropdownMenu.Content align="end" class="min-w-[160px]">+ <DropdownMenu.Group>+ {#each buttons as button (button.id)}+ <DropdownMenu.Item onclick={button.onclick} disabled={button.disabled || button.loading}>+ <div class="flex w-full items-center justify-between gap-2">+ <span>{button.loading ? button.loadingLabel || button.label : button.label}</span>+ {#if button.badge !== undefined}+ <span class="text-muted-foreground text-[10px]">({button.badge})</span>+ {/if}+ </div>+ </DropdownMenu.Item>+ {/each}+ </DropdownMenu.Group>+ </DropdownMenu.Content>+ </DropdownMenu.Root>+ </div>+ </div>+{/if}diff --git a/frontend/src/lib/components/action-button-group/index.ts b/frontend/src/lib/components/action-button-group/index.tsnew file mode 100644index 000000000..ddeae025c--- /dev/null+++ b/frontend/src/lib/components/action-button-group/index.ts@@ -0,0 +1,2 @@+export { default as ActionButtonGroup } from './action-button-group.svelte';+export type { ActionButton } from './action-button-group.svelte';diff --git a/frontend/src/lib/components/action-buttons.svelte b/frontend/src/lib/components/action-buttons.svelteindex 7dca62aa8..b6827f241 100644--- a/frontend/src/lib/components/action-buttons.svelte+++ b/frontend/src/lib/components/action-buttons.svelte@@ -1,4 +1,5 @@<script lang="ts">+ import { onMount } from 'svelte';import { openConfirmDialog } from './confirm-dialog';import { goto, invalidateAll } from '$app/navigation';import { toast } from 'svelte-sonner';@@ -31,6 +32,7 @@name,type = 'container',itemState = 'stopped',+ desktopVariant = 'labels',loading = $bindable<LoadingStates>({}),onActionComplete = $bindable<(status?: string) => void>(() => {}),startLoading = $bindable(false),@@ -45,6 +47,7 @@name?: string;type?: TargetType;itemState?: string;+ desktopVariant?: 'labels' | 'adaptive';loading?: LoadingStates;onActionComplete?: (status?: string) => void;startLoading?: boolean;@@ -103,6 +106,42 @@const isRunning = $derived(itemState === 'running' || (type === 'project' && itemState === 'partially running'));+ // Tailwind xl breakpoint is 1280px. We use this to avoid mounting two desktop variants at once+ // (which would duplicate portaled popovers when the same `open` state is bound twice).+ let isXlUp = $state(true);+ let isLgUp = $state(true);+ const adaptiveIconOnly = $derived(!isXlUp);++ onMount(() => {+ const mqlXl = window.matchMedia('(min-width: 1280px)');+ const mqlLg = window.matchMedia('(min-width: 1024px)');++ const update = () => {+ isXlUp = mqlXl.matches;+ isLgUp = mqlLg.matches;+ };++ update();++ if ('addEventListener' in mqlXl) {+ mqlXl.addEventListener('change', update);+ mqlLg.addEventListener('change', update);+ return () => {+ mqlXl.removeEventListener('change', update);+ mqlLg.removeEventListener('change', update);+ };+ }++ // @ts-expect-error legacy MediaQueryList API+ mqlXl.addListener(update);+ mqlLg.addListener(update);+ return () => {+ // @ts-expect-error legacy MediaQueryList API+ mqlXl.removeListener(update);+ mqlLg.removeListener(update);+ };+ });+function resetPullState() {pullProgress = 0;pullStatusText = '';@@ -522,127 +561,339 @@}</script>-<div>- <div class="hidden items-center gap-2 lg:flex">- {#if !isRunning}- {#if type === 'container'}- <ArcaneButton action="start" onclick={() => handleStart()} loading={uiLoading.start} />- {:else}- <ProgressPopover- bind:open={deployPullPopoverOpen}- bind:progress={pullProgress}- mode="generic"- title={m.progress_deploying_project()}- completeTitle={m.progress_deploy_completed()}- statusText={pullStatusText}- error={pullError}- loading={deployPulling}- icon={DownloadIcon}- layers={layerProgress}- >- <ArcaneButton action="deploy" onclick={() => handleDeploy()} loading={uiLoading.start} />- </ProgressPopover>- {/if}- {/if}+{#if desktopVariant === 'adaptive'}+ <div>+ <!-- On xl+ show labels; below xl use icon-only to avoid overflow in constrained headers (sidebar layouts) -->+ {#if isLgUp}+ <div class="flex items-center gap-2">+ {#if !isRunning}+ {#if type === 'container'}+ <ArcaneButton+ action="start"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => handleStart()}+ loading={uiLoading.start}+ />+ {:else}+ <ProgressPopover+ bind:open={deployPullPopoverOpen}+ bind:progress={pullProgress}+ mode="generic"+ title={m.progress_deploying_project()}+ completeTitle={m.progress_deploy_completed()}+ statusText={pullStatusText}+ error={pullError}+ loading={deployPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ >+ <ArcaneButton+ action="deploy"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => handleDeploy()}+ loading={uiLoading.start}+ />+ </ProgressPopover>+ {/if}+ {/if}++ {#if isRunning}+ <ArcaneButton+ action="stop"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ customLabel={type === 'project' ? m.common_down() : undefined}+ onclick={() => handleStop()}+ loading={uiLoading.stop}+ />+ <ArcaneButton+ action="restart"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => handleRestart()}+ loading={uiLoading.restart}+ />+ {/if}++ {#if type === 'container'}+ <ArcaneButton+ action="remove"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => confirmAction('remove')}+ loading={uiLoading.remove}+ />+ {:else}+ <ArcaneButton+ action="redeploy"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => confirmAction('redeploy')}+ loading={uiLoading.redeploy}+ />++ {#if type === 'project'}+ <ProgressPopover+ bind:open={pullPopoverOpen}+ bind:progress={pullProgress}+ title={m.progress_pulling_images()}+ statusText={pullStatusText}+ error={pullError}+ loading={projectPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ >+ <ArcaneButton+ action="pull"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => handleProjectPull()}+ loading={projectPulling}+ />+ </ProgressPopover>+ {/if}- {#if isRunning}- <ArcaneButton- action="stop"- customLabel={type === 'project' ? m.common_down() : undefined}- onclick={() => handleStop()}- loading={uiLoading.stop}- />- <ArcaneButton action="restart" onclick={() => handleRestart()} loading={uiLoading.restart} />- {/if}+ {#if onRefresh}+ <ArcaneButton+ action="refresh"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => handleRefresh()}+ loading={uiLoading.refresh}+ />+ {/if}- {#if type === 'container'}- <ArcaneButton action="remove" onclick={() => confirmAction('remove')} loading={uiLoading.remove} />+ <ArcaneButton+ customLabel={type === 'project' ? m.compose_destroy() : m.common_remove()}+ action="remove"+ size={adaptiveIconOnly ? 'icon' : 'default'}+ showLabel={!adaptiveIconOnly}+ onclick={() => confirmAction('remove')}+ loading={uiLoading.remove}+ />+ {/if}+ </div>{:else}- <ArcaneButton action="redeploy" onclick={() => confirmAction('redeploy')} loading={uiLoading.redeploy} />-- {#if type === 'project'}- <ProgressPopover- bind:open={pullPopoverOpen}- bind:progress={pullProgress}- title={m.progress_pulling_images()}- statusText={pullStatusText}- error={pullError}- loading={projectPulling}- icon={DownloadIcon}- layers={layerProgress}- >- <ArcaneButton action="pull" onclick={() => handleProjectPull()} loading={projectPulling} />- </ProgressPopover>+ <div class="flex items-center">+ <DropdownMenu.Root>+ <DropdownMenu.Trigger class="bg-background/70 inline-flex size-9 items-center justify-center rounded-lg border">+ <span class="sr-only">{m.common_open_menu()}</span>+ <EllipsisIcon />+ </DropdownMenu.Trigger>++ <DropdownMenu.Content+ align="end"+ class="bg-popover/20 z-50 min-w-[180px] rounded-xl border p-1 shadow-lg backdrop-blur-md"+ >+ <DropdownMenu.Group>+ {#if !isRunning}+ {#if type === 'container'}+ <DropdownMenu.Item onclick={handleStart} disabled={uiLoading.start}>+ {m.common_start()}+ </DropdownMenu.Item>+ {:else}+ <DropdownMenu.Item onclick={handleDeploy} disabled={uiLoading.start}>+ {m.common_up()}+ </DropdownMenu.Item>+ {/if}+ {:else}+ <DropdownMenu.Item onclick={handleStop} disabled={uiLoading.stop}>+ {type === 'project' ? m.common_down() : m.common_stop()}+ </DropdownMenu.Item>+ <DropdownMenu.Item onclick={handleRestart} disabled={uiLoading.restart}>+ {m.common_restart()}+ </DropdownMenu.Item>+ {/if}++ {#if type === 'container'}+ <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>+ {m.common_remove()}+ </DropdownMenu.Item>+ {:else}+ <DropdownMenu.Item onclick={() => confirmAction('redeploy')} disabled={uiLoading.redeploy}>+ {m.common_redeploy()}+ </DropdownMenu.Item>++ {#if type === 'project'}+ <DropdownMenu.Item onclick={handleProjectPull} disabled={projectPulling || uiLoading.pulling}>+ {m.images_pull()}+ </DropdownMenu.Item>+ {/if}++ {#if onRefresh}+ <DropdownMenu.Item onclick={handleRefresh} disabled={uiLoading.refresh}>+ {m.common_refresh()}+ </DropdownMenu.Item>+ {/if}++ <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>+ {type === 'project' ? m.compose_destroy() : m.common_remove()}+ </DropdownMenu.Item>+ {/if}+ </DropdownMenu.Group>+ </DropdownMenu.Content>+ </DropdownMenu.Root>++ {#if type === 'project'}+ <ProgressPopover+ bind:open={deployPullPopoverOpen}+ bind:progress={pullProgress}+ mode="generic"+ title={m.progress_deploying_project()}+ completeTitle={m.progress_deploy_completed()}+ statusText={pullStatusText}+ error={pullError}+ loading={deployPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ triggerClass="hidden"+ >+ <span class="hidden"></span>+ </ProgressPopover>++ <ProgressPopover+ bind:open={pullPopoverOpen}+ bind:progress={pullProgress}+ title={m.progress_pulling_images()}+ statusText={pullStatusText}+ error={pullError}+ loading={projectPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ triggerClass="hidden"+ >+ <span class="hidden"></span>+ </ProgressPopover>+ {/if}+ </div>+ {/if}+ </div>+{:else}+ <div>+ <div class="hidden items-center gap-2 lg:flex">+ {#if !isRunning}+ {#if type === 'container'}+ <ArcaneButton action="start" onclick={() => handleStart()} loading={uiLoading.start} />+ {:else}+ <ProgressPopover+ bind:open={deployPullPopoverOpen}+ bind:progress={pullProgress}+ title={m.progress_pulling_images()}+ statusText={pullStatusText}+ error={pullError}+ loading={deployPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ >+ <ArcaneButton action="deploy" onclick={() => handleDeploy()} loading={uiLoading.start} />+ </ProgressPopover>+ {/if}{/if}- {#if onRefresh}- <ArcaneButton action="refresh" onclick={() => handleRefresh()} loading={uiLoading.refresh} />+ {#if isRunning}+ <ArcaneButton+ action="stop"+ customLabel={type === 'project' ? m.common_down() : undefined}+ onclick={() => handleStop()}+ loading={uiLoading.stop}+ />+ <ArcaneButton action="restart" onclick={() => handleRestart()} loading={uiLoading.restart} />{/if}- <ArcaneButton- customLabel={type === 'project' ? m.compose_destroy() : m.common_remove()}- action="remove"- onclick={() => confirmAction('remove')}- loading={uiLoading.remove}- />- {/if}- </div>-- <div class="flex items-center lg:hidden">- <DropdownMenu.Root>- <DropdownMenu.Trigger class="bg-background/70 inline-flex size-9 items-center justify-center rounded-lg border">- <span class="sr-only">{m.common_open_menu()}</span>- <EllipsisIcon />- </DropdownMenu.Trigger>+ {#if type === 'container'}+ <ArcaneButton action="remove" onclick={() => confirmAction('remove')} loading={uiLoading.remove} />+ {:else}+ <ArcaneButton action="redeploy" onclick={() => confirmAction('redeploy')} loading={uiLoading.redeploy} />++ {#if type === 'project'}+ <ProgressPopover+ bind:open={pullPopoverOpen}+ bind:progress={pullProgress}+ title={m.progress_pulling_images()}+ statusText={pullStatusText}+ error={pullError}+ loading={projectPulling}+ icon={DownloadIcon}+ layers={layerProgress}+ >+ <ArcaneButton action="pull" onclick={() => handleProjectPull()} loading={projectPulling} />+ </ProgressPopover>+ {/if}++ {#if onRefresh}+ <ArcaneButton action="refresh" onclick={() => handleRefresh()} loading={uiLoading.refresh} />+ {/if}++ <ArcaneButton+ customLabel={type === 'project' ? m.compose_destroy() : m.common_remove()}+ action="remove"+ onclick={() => confirmAction('remove')}+ loading={uiLoading.remove}+ />+ {/if}+ </div>++ <div class="flex items-center lg:hidden">+ <DropdownMenu.Root>+ <DropdownMenu.Trigger class="bg-background/70 inline-flex size-9 items-center justify-center rounded-lg border">+ <span class="sr-only">{m.common_open_menu()}</span>+ <EllipsisIcon />+ </DropdownMenu.Trigger>++ <DropdownMenu.Content+ align="end"+ class="bg-popover/20 z-50 min-w-[180px] rounded-xl border p-1 shadow-lg backdrop-blur-md"+ >+ <DropdownMenu.Group>+ {#if !isRunning}+ {#if type === 'container'}+ <DropdownMenu.Item onclick={handleStart} disabled={uiLoading.start}>+ {m.common_start()}+ </DropdownMenu.Item>+ {:else}+ <DropdownMenu.Item onclick={handleDeploy} disabled={uiLoading.start}>+ {m.common_up()}+ </DropdownMenu.Item>+ {/if}+ {:else}+ <DropdownMenu.Item onclick={handleStop} disabled={uiLoading.stop}>+ {type === 'project' ? m.common_down() : m.common_stop()}+ </DropdownMenu.Item>+ <DropdownMenu.Item onclick={handleRestart} disabled={uiLoading.restart}>+ {m.common_restart()}+ </DropdownMenu.Item>+ {/if}- <DropdownMenu.Content align="end" class="bg-popover/20 z-50 min-w-[180px] rounded-xl border p-1 shadow-lg backdrop-blur-md">- <DropdownMenu.Group>- {#if !isRunning}{#if type === 'container'}- <DropdownMenu.Item onclick={handleStart} disabled={uiLoading.start}>- {m.common_start()}+ <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>+ {m.common_remove()}</DropdownMenu.Item>{:else}- <DropdownMenu.Item onclick={handleDeploy} disabled={uiLoading.start}>- {m.common_up()}+ <DropdownMenu.Item onclick={() => confirmAction('redeploy')} disabled={uiLoading.redeploy}>+ {m.common_redeploy()}</DropdownMenu.Item>- {/if}- {:else}- <DropdownMenu.Item onclick={handleStop} disabled={uiLoading.stop}>- {type === 'project' ? m.common_down() : m.common_stop()}- </DropdownMenu.Item>- <DropdownMenu.Item onclick={handleRestart} disabled={uiLoading.restart}>- {m.common_restart()}- </DropdownMenu.Item>- {/if}- {#if type === 'container'}- <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>- {m.common_remove()}- </DropdownMenu.Item>- {:else}- <DropdownMenu.Item onclick={() => confirmAction('redeploy')} disabled={uiLoading.redeploy}>- {m.common_redeploy()}- </DropdownMenu.Item>+ {#if type === 'project'}+ <DropdownMenu.Item onclick={handleProjectPull} disabled={projectPulling || uiLoading.pulling}>+ {m.images_pull()}+ </DropdownMenu.Item>+ {/if}- {#if type === 'project'}- <DropdownMenu.Item onclick={handleProjectPull} disabled={projectPulling || uiLoading.pulling}>- {m.images_pull()}- </DropdownMenu.Item>- {/if}+ {#if onRefresh}+ <DropdownMenu.Item onclick={handleRefresh} disabled={uiLoading.refresh}>+ {m.common_refresh()}+ </DropdownMenu.Item>+ {/if}- {#if onRefresh}- <DropdownMenu.Item onclick={handleRefresh} disabled={uiLoading.refresh}>- {m.common_refresh()}+ <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>+ {type === 'project' ? m.compose_destroy() : m.common_remove()}</DropdownMenu.Item>{/if}-- <DropdownMenu.Item onclick={() => confirmAction('remove')} disabled={uiLoading.remove}>- {type === 'project' ? m.compose_destroy() : m.common_remove()}- </DropdownMenu.Item>- {/if}- </DropdownMenu.Group>- </DropdownMenu.Content>- </DropdownMenu.Root>+ </DropdownMenu.Group>+ </DropdownMenu.Content>+ </DropdownMenu.Root>+ </div></div>-</div>+{/if}diff --git a/frontend/src/lib/components/arcane-button/arcane-button.svelte b/frontend/src/lib/components/arcane-button/arcane-button.svelteindex c2be0bd35..6951922e6 100644--- a/frontend/src/lib/components/arcane-button/arcane-button.svelte+++ b/frontend/src/lib/components/arcane-button/arcane-button.svelte@@ -14,7 +14,7 @@showLabel?: boolean;customLabel?: string;loadingLabel?: string;- icon?: IconType;+ icon?: IconType | null;onClickPromise?: (e: MouseEvent & {currentTarget: EventTarget & HTMLButtonElement;@@ -72,7 +72,7 @@let displayLoadingLabel = $derived(loadingLabel ?? config.loadingLabel ?? m.common_processing());let isIconOnlyButton = $derived(size === 'icon' || !showLabel);- let IconComponent = $derived(icon ?? config.IconComponent);+ let IconComponent = $derived(icon === null ? null : (icon ?? config.IconComponent));let hasChildren = $derived(!!children);</script>diff --git a/frontend/src/lib/components/arcane-button/variants.ts b/frontend/src/lib/components/arcane-button/variants.tsindex ae80846b7..9d3225bb4 100644--- a/frontend/src/lib/components/arcane-button/variants.ts+++ b/frontend/src/lib/components/arcane-button/variants.ts@@ -44,6 +44,14 @@ export const arcaneButtonVariants = tv({'bg-destructive/5 text-foreground! border-destructive/20 hover:bg-destructive/10 hover:border-destructive/40 ' +'dark:bg-destructive/10 dark:text-destructive-foreground dark:border-destructive/30 dark:hover:bg-destructive/20 ' +'shadow-sm hover:shadow-md',+ 'outline-success':+ 'bg-emerald-500/5 text-foreground! border-emerald-500/20 hover:bg-emerald-500/10 hover:border-emerald-500/40 ' ++ 'dark:bg-emerald-500/10 dark:text-emerald-400 dark:border-emerald-500/30 dark:hover:bg-emerald-500/20 ' ++ 'shadow-sm hover:shadow-md',+ 'outline-info':+ 'bg-sky-500/5 text-foreground! border-sky-500/20 hover:bg-sky-500/10 hover:border-sky-500/40 ' ++ 'dark:bg-sky-500/10 dark:text-sky-400 dark:border-sky-500/30 dark:hover:bg-sky-500/20 ' ++ 'shadow-sm hover:shadow-md',outline: 'bg-background border-input hover:bg-accent hover:text-accent-foreground shadow-sm',@@ -55,7 +63,8 @@ export const arcaneButtonVariants = tv({default: 'h-9 px-4 py-2 has-[svg]:px-3',sm: 'h-8 gap-1.5 rounded-md px-3 has-[svg]:px-2.5',lg: 'h-10 rounded-md px-5 has-[svg]:px-4',- icon: 'size-9'+ icon: 'size-9',+ card: 'min-h-14 w-full p-3 rounded-2xl justify-start gap-3'},hoverEffect: {none: '',@@ -90,6 +99,12 @@ export const actionConfigs = {tone: 'outline-primary',loadingLabel: m.common_action_starting()},+ start_all: {+ defaultLabel: m.quick_actions_start_all(),+ IconComponent: StartIcon,+ tone: 'outline-success',+ loadingLabel: m.common_action_starting()+ },deploy: {defaultLabel: m.common_up(),IconComponent: StartIcon,@@ -102,12 +117,24 @@ export const actionConfigs = {tone: 'outline-destructive',loadingLabel: m.common_action_stopping()},+ stop_all: {+ defaultLabel: m.quick_actions_stop_all(),+ IconComponent: StopIcon,+ tone: 'outline-info',+ loadingLabel: m.common_action_stopping()+ },remove: {defaultLabel: m.common_remove(),IconComponent: TrashIcon,tone: 'outline-destructive',loadingLabel: m.common_action_removing()},+ prune: {+ defaultLabel: m.quick_actions_prune_system(),+ IconComponent: TrashIcon,+ tone: 'outline-destructive',+ loadingLabel: m.common_action_removing()+ },restart: {defaultLabel: m.common_restart(),IconComponent: RestartIcon,diff --git a/frontend/src/lib/components/arcane-table/arcane-table-view-options.svelte b/frontend/src/lib/components/arcane-table/arcane-table-view-options.svelteindex 1d509a9b9..702222ed8 100644--- a/frontend/src/lib/components/arcane-table/arcane-table-view-options.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table-view-options.svelte@@ -50,16 +50,15 @@{#each table.getAllColumns().filter((col) => typeof col.accessorFn !== 'undefined' && col.getCanHide()) as column (column)}- <DropdownMenu.CheckboxItem- bind:checked={() => column.getIsVisible(), (v) => column.toggleVisibility(!!v)}- class="capitalize"- >- {column.id}+ {@const meta = column.columnDef.meta as { title?: string }}+ {@const headerText = meta?.title ?? column.id}+ <DropdownMenu.CheckboxItem bind:checked={() => column.getIsVisible(), (v) => column.toggleVisibility(!!v)}>+ {headerText}</DropdownMenu.CheckboxItem>{/each}{:else if fields && onToggleField}{#each fields as field (field.id)}- <DropdownMenu.CheckboxItem bind:checked={() => field.visible, (v) => onToggleField(field.id)} class="capitalize">+ <DropdownMenu.CheckboxItem bind:checked={() => field.visible, (v) => onToggleField(field.id)}>{field.label}</DropdownMenu.CheckboxItem>{/each}diff --git a/frontend/src/lib/components/arcane-table/arcane-table.svelte b/frontend/src/lib/components/arcane-table/arcane-table.svelteindex eab1a5b66..895145724 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.svelte+++ b/frontend/src/lib/components/arcane-table/arcane-table.svelte@@ -28,9 +28,10 @@encodeHidden,applyHiddenPatch,encodeFilters,- encodeMobileHidden+ encodeMobileVisibility,+ buildMobileVisibility} from './arcane-table.types.svelte';- import { buildInitialMobileVisibility, extractPersistedPreferences, filterMapsEqual, toFilterMap } from './arcane-table.utils';+ import { extractPersistedPreferences, filterMapsEqual, toFilterMap } from './arcane-table.utils';import ArcaneTablePagination from './arcane-table-pagination.svelte';import ArcaneTableHeader from './arcane-table-header.svelte';import ArcaneTableCell from './arcane-table-cell.svelte';@@ -73,7 +74,16 @@onRemoveSelected?: (ids: string[]) => void;persistKey?: string;customViewOptions?: Snippet;- customTableView?: Snippet<[{ table: TableType<TData>; renderPagination: Snippet }]>;+ customTableView?: Snippet<+ [+ {+ table: TableType<TData>;+ renderPagination: Snippet;+ mobileFieldsForOptions: { id: string; label: string; visible: boolean }[];+ onToggleMobileField: (fieldId: string) => void;+ }+ ]+ >;customSettings?: Record<string, unknown>;} = $props();@@ -169,9 +179,8 @@}if (shouldRefresh) onRefresh(requestOptions);- const initialMobileVisibility = buildInitialMobileVisibility(mobileFields, mobileFieldVisibility, snapshot.mobileHidden);- if (initialMobileVisibility) {- mobileFieldVisibility = initialMobileVisibility;+ if (mobileFields.length && !Object.keys(mobileFieldVisibility).length) {+ mobileFieldVisibility = buildMobileVisibility(mobileFields, snapshot.mobileVisibility);}if (snapshot.customSettings && Object.keys(snapshot.customSettings).length > 0) {@@ -263,6 +272,7 @@id,...(accessorKey ? { accessorKey } : {}),...(accessorFn ? { accessorFn } : {}),+ meta: { title: spec.title },header: ({ column }) => {if (spec.header) return renderSnippet(spec.header, { column, title: spec.title, class: spec.class });return renderComponent(ArcaneTableHeader, {@@ -421,7 +431,7 @@};// Persist mobile field visibilityif (enablePersist && prefs) {- prefs.current = { ...prefs.current, m: encodeMobileHidden(mobileFieldVisibility) };+ prefs.current = { ...prefs.current, m: encodeMobileVisibility(mobileFieldVisibility) };}}@@ -502,7 +512,7 @@{/snippet}{#if customTableView}- {@render customTableView({ table, renderPagination: PaginationSnippet })}+ {@render customTableView({ table, renderPagination: PaginationSnippet, mobileFieldsForOptions, onToggleMobileField })}{:else if unstyled}<div class="flex h-full min-h-0 flex-col">{#if !withoutSearch}diff --git a/frontend/src/lib/components/arcane-table/arcane-table.types.svelte.ts b/frontend/src/lib/components/arcane-table/arcane-table.types.svelte.tsindex 5dd58d188..e8c60300f 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.types.svelte.ts+++ b/frontend/src/lib/components/arcane-table/arcane-table.types.svelte.ts@@ -61,17 +61,35 @@ export function decodeFilters(pairs?: [string, unknown][]): ColumnFiltersState {return pairs.map(([id, value]) => ({ id, value }));}-export function encodeMobileHidden(visibility: Record<string, boolean>): string[] {- const hidden: string[] = [];+export function encodeMobileVisibility(visibility: Record<string, boolean>): string[] {+ const encoded: string[] = [];for (const [id, visible] of Object.entries(visibility)) {- if (visible === false) hidden.push(id);+ encoded.push(visible ? id : `-${id}`);}- return hidden;+ return encoded;}-export function applyMobileHiddenPatch(target: Record<string, boolean>, hidden?: string[]) {- if (!hidden?.length) return;- for (const id of hidden) {- target[id] = false;+export function decodeMobileVisibility(encoded?: string[]): Record<string, boolean> {+ if (!encoded?.length) return {};+ const visibility: Record<string, boolean> = {};+ for (const entry of encoded) {+ if (entry.startsWith('-')) {+ visibility[entry.slice(1)] = false;+ } else {+ visibility[entry] = true;+ }+ }+ return visibility;+}++export function buildMobileVisibility(fields: FieldSpec[], persisted?: string[]): Record<string, boolean> {+ const visibility: Record<string, boolean> = {};+ for (const field of fields) {+ visibility[field.id] = field.defaultVisible ?? true;+ }+ const overrides = decodeMobileVisibility(persisted);+ for (const [id, visible] of Object.entries(overrides)) {+ visibility[id] = visible;}+ return visibility;}diff --git a/frontend/src/lib/components/arcane-table/arcane-table.utils.ts b/frontend/src/lib/components/arcane-table/arcane-table.utils.tsindex f689d325e..ae46d0030 100644--- a/frontend/src/lib/components/arcane-table/arcane-table.utils.ts+++ b/frontend/src/lib/components/arcane-table/arcane-table.utils.ts@@ -1,7 +1,7 @@import type { ColumnFiltersState } from '@tanstack/table-core';import type { FilterMap } from '$lib/types/pagination.type';-import type { CompactTablePrefs, FieldSpec, MobileFieldVisibility } from './arcane-table.types.svelte';-import { decodeFilters, applyMobileHiddenPatch } from './arcane-table.types.svelte';+import type { CompactTablePrefs } from './arcane-table.types.svelte';+import { decodeFilters } from './arcane-table.types.svelte';export type PersistedPreferencesSnapshot = {hiddenColumns: string[];@@ -9,7 +9,7 @@ export type PersistedPreferencesSnapshot = {filtersMap: FilterMap;search: string;limit: number;- mobileHidden?: string[];+ mobileVisibility?: string[];customSettings?: Record<string, unknown>;};@@ -73,23 +73,7 @@ export function extractPersistedPreferences(filtersMap,search,limit,- mobileHidden: prefs.m,+ mobileVisibility: prefs.m,customSettings: prefs.c};}--export function buildInitialMobileVisibility(- fields: FieldSpec[],- mobileFieldVisibility: MobileFieldVisibility,- persistedHidden?: string[]-): MobileFieldVisibility | null {- if (!fields.length || Object.keys(mobileFieldVisibility).length) return null;- const initial: MobileFieldVisibility = {};- for (const field of fields) {- initial[field.id] = field.defaultVisible ?? true;- }- if (persistedHidden && persistedHidden.length > 0) {- applyMobileHiddenPatch(initial, persistedHidden);- }- return initial;-}diff --git a/frontend/src/lib/components/arcane-table/cards/universal-mobile-card.svelte b/frontend/src/lib/components/arcane-table/cards/universal-mobile-card.svelteindex dfc45a141..5fca61014 100644--- a/frontend/src/lib/components/arcane-table/cards/universal-mobile-card.svelte+++ b/frontend/src/lib/components/arcane-table/cards/universal-mobile-card.svelte@@ -129,7 +129,7 @@{/if}<div class="min-w-0 flex-1"><h3- class={cn('leading-snug font-semibold', compact ? 'text-sm' : 'text-sm', hasSubtitle ? 'truncate' : 'line-clamp-2')}+ class={cn('line-clamp-2 leading-snug font-semibold break-all', compact ? 'text-sm' : 'text-sm')}title={title(item)}>{title(item)}@@ -232,7 +232,7 @@{@const footerValue = footer.getValue(item)}{#if footerValue}{@const FooterIcon = footer.icon}- <Card.Footer class="bg-muted/30 border-border/40 flex items-center gap-2 border-t px-3 py-2">+ <Card.Footer class="bg-muted/30 border-border/40 flex items-center gap-2 border-t px-3 !py-2"><FooterIcon class="text-muted-foreground size-3.5" /><span class="text-muted-foreground/70 text-[9px] font-medium tracking-wide uppercase">{footer.label}diff --git a/frontend/src/lib/components/disk-meter.svelte b/frontend/src/lib/components/disk-meter.svelteindex 9d80d0b17..e768f6d69 100644--- a/frontend/src/lib/components/disk-meter.svelte+++ b/frontend/src/lib/components/disk-meter.svelte@@ -71,7 +71,7 @@}</script>-<Card.Root class={className}>+<Card.Root class="flex h-full flex-col {className}">{#snippet children()}<Card.Header icon={VolumesIcon} iconVariant="primary" compact {loading}>{#snippet children()}@@ -123,60 +123,37 @@{/snippet}</Card.Header>- <Card.Content class="flex flex-1 items-center p-3 sm:p-4">- <div class="flex w-full items-center gap-4">- <div class="flex-1 space-y-2">- {#if loading}- <div class="bg-muted h-2 w-full animate-pulse rounded"></div>- {:else}- <Progress value={percentage} max={100} class="h-2" />- {/if}-- <div class="flex items-center justify-between text-xs">- {#if loading}- <div class="bg-muted h-3 w-16 animate-pulse rounded"></div>- <div class="bg-muted h-3 w-24 animate-pulse rounded"></div>- {:else}- <span class="text-muted-foreground font-medium">- {percentage.toFixed(1)}%- </span>- <span class="text-muted-foreground/70 font-mono">- {formatBytes(diskUsage ?? 0)} / {formatBytes(diskTotal ?? 0)}- </span>- {/if}- </div>+ <Card.Content class="flex flex-1 flex-col justify-end gap-3 p-3 sm:p-4">+ {#if loading}+ <div class="flex items-center gap-3">+ <div class="bg-muted h-2.5 flex-1 animate-pulse rounded-full"></div>+ <div class="bg-muted h-4 w-12 animate-pulse rounded"></div>+ </div>+ <div class="flex justify-between gap-4">+ <div class="bg-muted h-4 w-20 animate-pulse rounded"></div>+ <div class="bg-muted h-4 w-20 animate-pulse rounded"></div>+ </div>+ {:else}+ <div class="flex items-center gap-3">+ <Progress value={percentage} max={100} class="h-2.5 flex-1" />+ <span class="text-foreground min-w-12 text-right text-sm font-bold tabular-nums">+ {percentage.toFixed(1)}%+ </span></div>- <div class="bg-muted/50 hidden shrink-0 gap-4 rounded-lg p-3 sm:flex">- <div class="space-y-0.5">- {#if loading}- <div class="bg-muted h-3 w-12 animate-pulse rounded"></div>- <div class="bg-muted h-4 w-16 animate-pulse rounded"></div>- {:else}- <div class="text-muted-foreground text-[10px] font-medium tracking-wide uppercase">- {m.dashboard_meter_disk_used()}- </div>- <div class="text-foreground text-sm font-semibold">- {formatBytes(diskUsage ?? 0)}- </div>- {/if}+ <div class="flex flex-wrap items-center justify-between gap-x-4 gap-y-1">+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="bg-primary size-2 shrink-0 rounded-full"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_disk_used()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums">{formatBytes(diskUsage ?? 0)}</span></div>-- <div class="space-y-0.5">- {#if loading}- <div class="bg-muted h-3 w-12 animate-pulse rounded"></div>- <div class="bg-muted h-4 w-16 animate-pulse rounded"></div>- {:else}- <div class="text-muted-foreground text-[10px] font-medium tracking-wide uppercase">- {m.dashboard_meter_disk_free()}- </div>- <div class="text-foreground text-sm font-semibold">- {formatBytes(diskFree)}- </div>- {/if}+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="bg-primary/20 size-2 shrink-0 rounded-full"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_disk_free()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums">{formatBytes(diskFree)}</span></div></div>- </div>+ {/if}</Card.Content>{/snippet}</Card.Root>diff --git a/frontend/src/lib/components/dropdown-card.svelte b/frontend/src/lib/components/dropdown-card.svelteindex b04eb397d..2fde3d147 100644--- a/frontend/src/lib/components/dropdown-card.svelte+++ b/frontend/src/lib/components/dropdown-card.svelte@@ -104,7 +104,7 @@</Card.Header>{#if expanded}<div transition:slide={{ duration: 200 }}>- <Card.Content class="pt-4 pb-6">+ <Card.Content class="p-0">{@render children()}</Card.Content></div>diff --git a/frontend/src/lib/components/form/url-input.svelte b/frontend/src/lib/components/form/url-input.svelteindex e83564525..bfe4c0ebc 100644--- a/frontend/src/lib/components/form/url-input.svelte+++ b/frontend/src/lib/components/form/url-input.svelte@@ -51,13 +51,14 @@class="w-[5.5rem] shrink-0 justify-between gap-1 text-sm"{disabled}customLabel="{protocol}://"- icon={ArrowDownIcon}- />+ >+ <ArrowDownIcon />+ </ArcaneButton>{/snippet}</DropdownMenu.Trigger><DropdownMenu.Content align="center" class="min-w-0">- <DropdownMenu.Item class="px-2 py-1.5" onclick={() => selectProtocol('https')}>https://</DropdownMenu.Item>- <DropdownMenu.Item class="px-2 py-1.5" onclick={() => selectProtocol('http')}>http://</DropdownMenu.Item>+ <DropdownMenu.Item class="py-1.5" onclick={() => selectProtocol('https')}>https://</DropdownMenu.Item>+ <DropdownMenu.Item class="py-1.5" onclick={() => selectProtocol('http')}>http://</DropdownMenu.Item></DropdownMenu.Content></DropdownMenu.Root><InputGroup.Root class={['flex-1', error ? 'border-destructive' : ''].filter(Boolean).join(' ')}>diff --git a/frontend/src/lib/components/gpu-meter.svelte b/frontend/src/lib/components/gpu-meter.svelteindex 4214f4b5d..abd683f95 100644--- a/frontend/src/lib/components/gpu-meter.svelte+++ b/frontend/src/lib/components/gpu-meter.svelte@@ -23,7 +23,7 @@}</script>-<Card.Root>+<Card.Root class="flex h-full flex-col">{#snippet children()}<Card.Header icon={GpuIcon} iconVariant="primary" compact {loading}>{#snippet children()}@@ -39,40 +39,60 @@{/snippet}</Card.Header>- <Card.Content class="flex flex-col justify-center p-3">+ <Card.Content class="flex flex-1 flex-col justify-center gap-3 p-3 sm:p-4">{#if loading}- <div class="w-full space-y-3">- <div class="bg-muted h-16 w-full animate-pulse rounded"></div>+ <div class="space-y-3">+ <div class="flex items-center gap-3">+ <div class="bg-muted h-2.5 flex-1 animate-pulse rounded-full"></div>+ <div class="bg-muted h-4 w-12 animate-pulse rounded"></div>+ </div>+ <div class="flex justify-between gap-4">+ <div class="bg-muted h-4 w-16 animate-pulse rounded"></div>+ <div class="bg-muted h-4 w-20 animate-pulse rounded"></div>+ </div></div>{:else if !gpus || gpus.length === 0}<div class="text-muted-foreground text-center text-xs">{m.common_na()}</div>{:else}- <div class="w-full space-y-3">- {#each gpus as gpu}- <div class="space-y-1.5">- <div class="flex items-center justify-between">- <span class="text-foreground text-xs font-medium">{gpu.name}</span>- <span class="text-muted-foreground font-mono text-[10px]">- GPU {gpu.index}+ <div class="space-y-4">+ {#each gpus as gpu, i}+ {@const percentage = getPercentage(gpu.memoryUsed, gpu.memoryTotal)}+ <div class="space-y-2">+ {#if gpus.length > 1}+ <div class="flex items-center justify-between">+ <span class="text-foreground truncate text-xs font-medium">{gpu.name}</span>+ <span class="text-muted-foreground shrink-0 font-mono text-[10px]">GPU {gpu.index}</span>+ </div>+ {/if}++ <div class="flex items-center gap-3">+ <Progress value={percentage} max={100} class="h-2.5 flex-1 bg-emerald-500/20 [&>div]:bg-emerald-500" />+ <span class="text-foreground min-w-12 text-right text-sm font-bold tabular-nums">+ {percentage.toFixed(1)}%</span></div>- <div class="text-center">- <div class="text-foreground text-sm font-bold">- {formatBytes(gpu.memoryUsed)}++ <div class="flex flex-wrap items-center justify-between gap-x-4 gap-y-1">+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="size-2 shrink-0 rounded-full bg-emerald-500"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_disk_used()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums">{formatBytes(gpu.memoryUsed)}</span>+ </div>+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="size-2 shrink-0 rounded-full bg-emerald-500/20"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_disk_free()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums"+ >{formatBytes(gpu.memoryTotal - gpu.memoryUsed)}</span+ ></div>- </div>- <Progress value={getPercentage(gpu.memoryUsed, gpu.memoryTotal)} max={100} class="h-1.5" />- <div class="flex items-center justify-between text-xs">- <span class="text-muted-foreground font-medium">- {getPercentage(gpu.memoryUsed, gpu.memoryTotal).toFixed(1)}%- </span>- <span class="text-muted-foreground/70 font-mono text-[10px]">- {formatBytes(gpu.memoryUsed)} / {formatBytes(gpu.memoryTotal)}- </span></div></div>++ {#if i < gpus.length - 1}+ <div class="border-border/50 border-t"></div>+ {/if}{/each}</div>{/if}diff --git a/frontend/src/lib/components/header-card.svelte b/frontend/src/lib/components/header-card.sveltenew file mode 100644index 000000000..38f2156ef--- /dev/null+++ b/frontend/src/lib/components/header-card.svelte@@ -0,0 +1,25 @@+<script lang="ts">+ import type { Snippet } from 'svelte';+ import { cn } from '$lib/utils';++ interface Props {+ children: Snippet;+ class?: string;+ }++ let { children, class: className }: Props = $props();+</script>++<div+ class={cn(+ 'from-background/60 via-background/40 to-background/60 relative overflow-hidden rounded-xl border bg-linear-to-br p-4 shadow-sm sm:p-6',+ className+ )}+>+ <div class="bg-primary/10 pointer-events-none absolute -top-10 -right-10 size-40 rounded-full blur-3xl"></div>+ <div class="bg-muted/40 pointer-events-none absolute -bottom-10 -left-10 size-40 rounded-full blur-3xl"></div>++ <div class="relative">+ {@render children()}+ </div>+</div>diff --git a/frontend/src/lib/components/meter-metric.svelte b/frontend/src/lib/components/meter-metric.svelteindex d137d01d8..5b268a6d7 100644--- a/frontend/src/lib/components/meter-metric.svelte+++ b/frontend/src/lib/components/meter-metric.svelte@@ -30,10 +30,9 @@}: Props = $props();const percentage = $derived(currentValue !== undefined && !loading && maxValue > 0 ? (currentValue / maxValue) * 100 : 0);- const Icon = $derived(icon);</script>-<Card.Root>+<Card.Root class="flex h-full flex-col">{#snippet children()}<Card.Header {icon} iconVariant="primary" compact {loading}>{#snippet children()}@@ -46,50 +45,41 @@{/snippet}</Card.Header>- <Card.Content class="flex flex-col justify-center p-3">- <div class="w-full space-y-2">- <div class="text-center">- {#if loading}- <div class="bg-muted mx-auto h-7 w-14 animate-pulse rounded"></div>- {:else}- <div class="text-foreground text-lg font-bold">- {currentValue !== undefined ? formatValue(currentValue) : m.common_na()}- </div>- {/if}+ <Card.Content class="flex flex-1 flex-col justify-end gap-3 p-3 sm:p-4">+ {#if loading}+ <div class="flex items-center gap-3">+ <div class="bg-muted h-2.5 flex-1 animate-pulse rounded-full"></div>+ <div class="bg-muted h-4 w-12 animate-pulse rounded"></div>+ </div>+ <div class="flex justify-between gap-4">+ <div class="bg-muted h-4 w-16 animate-pulse rounded"></div>+ <div class="bg-muted h-4 w-20 animate-pulse rounded"></div>+ </div>+ {:else}+ <div class="flex items-center gap-3">+ <Progress value={percentage} max={100} class="h-2.5 flex-1" />+ <span class="text-foreground min-w-12 text-right text-sm font-bold tabular-nums">+ {currentValue !== undefined ? `${formatValue(currentValue)}${unit}` : m.common_na()}+ </span></div>- <div class="space-y-1.5">- {#if loading}- <div class="bg-muted h-1.5 w-full animate-pulse rounded"></div>- {:else}- <Progress value={percentage} max={100} class="h-1.5" />- {/if}-- <div class="flex items-center justify-between text-xs">- {#if loading}- <div class="bg-muted h-3 w-12 animate-pulse rounded"></div>- {#if showAbsoluteValues}- <div class="bg-muted h-3 w-20 animate-pulse rounded"></div>- {/if}- {:else}- <span class="text-muted-foreground font-medium">- {percentage.toFixed(1)}%- </span>- {#if showAbsoluteValues}- <span class="text-muted-foreground/70 font-mono text-[10px]">- {#if currentValue !== undefined && maxValue !== undefined && formatAbsoluteValue}- {#if maxValue === 100}- {formatAbsoluteValue(0)}- {:else}- {formatAbsoluteValue(currentValue)} / {formatAbsoluteValue(maxValue)}- {/if}- {/if}- </span>- {/if}- {/if}+ <div class="flex flex-wrap items-center justify-between gap-x-4 gap-y-1">+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="bg-primary size-2 shrink-0 rounded-full"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_usage()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums">{percentage.toFixed(1)}%</span></div>+ {#if showAbsoluteValues && currentValue !== undefined && maxValue !== undefined && formatAbsoluteValue}+ <div class="flex items-center gap-2 whitespace-nowrap">+ <div class="bg-primary/20 size-2 shrink-0 rounded-full"></div>+ <span class="text-muted-foreground text-xs">{m.dashboard_meter_capacity()}</span>+ <span class="text-foreground text-sm font-semibold tabular-nums">+ {maxValue === 100 ? formatAbsoluteValue(0) : formatAbsoluteValue(maxValue)}+ </span>+ </div>+ {/if}</div>- </div>+ {/if}</Card.Content>{/snippet}</Card.Root>diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav-item.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav-item.svelteindex 012617a1f..251868c3f 100644--- a/frontend/src/lib/components/mobile-nav/mobile-nav-item.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-nav-item.svelte@@ -24,12 +24,14 @@aria-label={`${item.title}${active ? ' (current page)' : ''}`}aria-current={active ? 'page' : undefined}class={cn(- 'flex-1 transition-all duration-200 ease-out',+ 'min-w-0 flex-1 transition-all duration-200 ease-out','hover:bg-muted/50 hover:text-foreground hover:scale-[1.02]','focus-visible:ring-muted-foreground/50 focus-visible:ring-1 focus-visible:ring-offset-1','focus-visible:scale-[1.02] focus-visible:ring-offset-transparent','active:scale-[0.98]',- showLabels ? 'h-12 min-w-[60px] flex-col gap-0.5 rounded-2xl px-3 py-1.5' : 'h-11 w-11 rounded-2xl',+ showLabels+ ? 'h-11 flex-col gap-0.5 overflow-hidden rounded-2xl px-2 py-1 sm:h-12 sm:min-w-[60px] sm:px-3 sm:py-1.5'+ : 'h-11 w-11 rounded-2xl',active && 'bg-muted text-foreground hover:bg-muted/70 shadow-sm',className)}@@ -38,7 +40,7 @@{@const IconComponent = item.icon}<IconComponent size={showLabels ? 20 : 24} aria-hidden="true" />{#if showLabels}- <span class="text-muted-foreground text-[10px] leading-none font-normal">{item.title}</span>+ <span class="text-muted-foreground w-full truncate text-center text-[10px] leading-none font-normal">{item.title}</span>{:else}<span class="sr-only">{item.title}</span>{/if}diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav-menu-button.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav-menu-button.svelteindex 1324cc94c..dd8787444 100644--- a/frontend/src/lib/components/mobile-nav/mobile-nav-menu-button.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-nav-menu-button.svelte@@ -18,12 +18,13 @@'bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:ring-ring/50 shadow-md','flex-shrink-0 rounded-full transition-all duration-200 ease-out active:scale-95','flex items-center justify-center',- showLabels ? 'size-14' : 'size-14'+ // Keep a large tap target but allow a slightly smaller footprint on the smallest screens.+ 'size-[52px] sm:size-14')}aria-label={m.mobile_navigation()}{onclick}data-testid="mobile-nav-open">- <MobileNavDrawerIcon class="size-8.5" aria-hidden="true" />+ <MobileNavDrawerIcon class="size-8 sm:size-8.5" aria-hidden="true" /><span class="sr-only">{m.mobile_navigation()}</span></button>diff --git a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte b/frontend/src/lib/components/mobile-nav/mobile-nav.svelteindex dcd250bf8..69da8b353 100644--- a/frontend/src/lib/components/mobile-nav/mobile-nav.svelte+++ b/frontend/src/lib/components/mobile-nav/mobile-nav.svelte@@ -144,7 +144,11 @@'shadow-sm select-none transition-all duration-300 ease-out','flex items-center',mode === 'floating'- ? cn('rounded-3xl border', showLabels ? 'gap-2 px-3 py-2' : 'gap-3 px-4 py-2.5')+ ? cn(+ 'rounded-3xl border',+ // On very small screens, tighten spacing so labeled items + center action fit.+ showLabels ? 'gap-1.5 px-2.5 py-1.5 sm:gap-2 sm:px-3 sm:py-2' : 'gap-2.5 px-3.5 py-2 sm:gap-3 sm:px-4 sm:py-2.5'+ ): cn('border-t border-border/50 justify-around', showLabels ? 'px-4 pt-2 pb-4' : 'px-4 pt-2.5 pb-4'),visible? mode === 'floating'diff --git a/frontend/src/lib/components/navigation-mode-setting-control.svelte b/frontend/src/lib/components/navigation-mode-setting-control.sveltedeleted file mode 100644index 3b5f2c1ee..000000000--- a/frontend/src/lib/components/navigation-mode-setting-control.svelte+++ /dev/null@@ -1,182 +0,0 @@-<script lang="ts">- import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import { m } from '$lib/paraglide/messages';- import { CloseIcon, EnvironmentsIcon, SmartphoneIcon, MonitorSpeakerIcon, DockIcon, type IconType } from '$lib/icons';-- let {- id,- description,- serverValue,- localOverride,- onServerChange,- onLocalOverride,- onClearOverride,- serverDisabled = false- }: {- id: string;- description: string;- serverValue: 'floating' | 'docked';- localOverride?: 'floating' | 'docked';- onServerChange: (value: 'floating' | 'docked') => void;- onLocalOverride: (value: 'floating' | 'docked') => void;- onClearOverride: () => void;- serverDisabled?: boolean;- } = $props();-- const effectiveValue = $derived(localOverride !== undefined ? localOverride : serverValue);- const hasOverride = $derived(localOverride !== undefined);-</script>--<div- class={`flex h-full flex-col rounded-lg border p-3 sm:p-4 ${hasOverride ? 'border-orange-200 bg-orange-50/50 dark:border-orange-800 dark:bg-orange-950/20' : 'border-border'}`}->- <div class="flex h-full flex-col space-y-3">- <div class="flex items-start gap-3">- <div class="min-w-0 flex-1">- <div class="mb-1 flex items-start justify-between gap-2">- {#if hasOverride}- <ArcaneButton- action="base"- tone="ghost"- size="sm"- onclick={onClearOverride}- class="h-6 w-6 flex-shrink-0 p-0 text-orange-600 hover:text-orange-700 dark:text-orange-400 dark:hover:text-orange-300"- title={m.clear_local_override()}- >- <CloseIcon class="size-3" />- </ArcaneButton>- {/if}- </div>- <p class="text-muted-foreground text-xs leading-relaxed">{description}</p>- </div>- </div>-- <div class="flex flex-1 flex-col justify-end space-y-2 sm:space-y-3">- <div class="bg-background/50 rounded-md border">- <div class="flex items-center justify-between p-2 sm:p-3">- <div class="flex min-w-0 flex-1 items-center gap-2">- <EnvironmentsIcon class="text-muted-foreground size-3 flex-shrink-0 sm:size-4" />- <div class="min-w-0 flex-1">- <p class="text-xs leading-tight font-medium">{m.server_default()}</p>- <p class="text-muted-foreground hidden text-xs leading-tight sm:block">{m.applies_to_all_users()}</p>- </div>- </div>-- <div class="flex flex-shrink-0 gap-1">- <ArcaneButton- action="base"- tone={serverValue === 'floating' ? 'outline-primary' : 'outline'}- size="sm"- onclick={() => !serverDisabled && onServerChange('floating')}- disabled={serverDisabled}- class="flex h-7 min-w-[2.5rem] items-center gap-1 px-2 text-xs sm:h-8 sm:px-3"- >- <MonitorSpeakerIcon class="size-3" />- <span class="hidden sm:inline">{m.navigation_mode_floating()}</span>- </ArcaneButton>- <ArcaneButton- action="base"- tone={serverValue === 'docked' ? 'outline-primary' : 'outline'}- size="sm"- onclick={() => !serverDisabled && onServerChange('docked')}- disabled={serverDisabled}- class="flex h-7 min-w-[2.5rem] items-center gap-1 px-2 text-xs sm:h-8 sm:px-3"- >- <DockIcon class="size-3" />- <span class="hidden sm:inline">{m.navigation_mode_docked()}</span>- </ArcaneButton>- </div>- </div>- </div>-- <div- class={`rounded-md border ${hasOverride ? 'border-orange-200 bg-orange-50 dark:border-orange-800 dark:bg-orange-950/30' : 'bg-muted/30 border-border'}`}- >- <div class="flex items-center justify-between p-2 sm:p-3">- <div class="flex min-w-0 flex-1 items-center gap-2">- <SmartphoneIcon class="text-muted-foreground size-3 flex-shrink-0 sm:size-4" />- <div class="min-w-0 flex-1">- <div class="flex flex-col sm:flex-row sm:items-center sm:gap-1">- <p class="text-xs leading-tight font-medium">{m.this_device()}</p>- {#if hasOverride}- <span class="text-xs leading-tight text-orange-600 dark:text-orange-400">({m.override()})</span>- {/if}- </div>- <p class="text-muted-foreground hidden text-xs leading-tight sm:block">- {hasOverride ? m.overriding_server_default() : m.using_server_default()}- </p>- </div>- </div>-- {#if hasOverride}- <div class="flex flex-shrink-0 gap-1">- <ArcaneButton- action="base"- tone={localOverride === 'floating' ? 'outline-primary' : 'outline'}- size="sm"- onclick={() => onLocalOverride('floating')}- class="flex h-7 min-w-[2.5rem] items-center gap-1 px-2 text-xs sm:h-8 sm:px-3"- >- <MonitorSpeakerIcon class="size-3" />- <span class="hidden sm:inline">{m.navigation_mode_floating()}</span>- </ArcaneButton>- <ArcaneButton- action="base"- tone={localOverride === 'docked' ? 'outline-primary' : 'outline'}- size="sm"- onclick={() => onLocalOverride('docked')}- class="flex h-7 min-w-[2.5rem] items-center gap-1 px-2 text-xs sm:h-8 sm:px-3"- >- <DockIcon class="size-3" />- <span class="hidden sm:inline">{m.navigation_mode_docked()}</span>- </ArcaneButton>- </div>- {:else}- <div class="flex flex-shrink-0 items-center gap-2">- <span class="text-muted-foreground hidden items-center gap-1 text-xs font-medium sm:flex">- {#if effectiveValue === 'floating'}- <MonitorSpeakerIcon class="size-3" />- {m.navigation_mode_floating()}- {:else}- <DockIcon class="size-3" />- {m.navigation_mode_docked()}- {/if}- </span>- <ArcaneButton- action="base"- tone="outline"- size="sm"- onclick={() => onLocalOverride(effectiveValue === 'floating' ? 'docked' : 'floating')}- class="h-6 px-2 text-xs sm:h-7"- >- {m.override()}- </ArcaneButton>- </div>- {/if}- </div>- </div>- </div>-- <div class="bg-muted/30 rounded-md border p-2">- <div class="flex items-center justify-between gap-2">- <span class="text-muted-foreground text-xs font-medium">{m.current_state()}:</span>- <div class="flex flex-wrap items-center justify-end gap-1">- <span- class={`flex items-center gap-1 text-xs font-medium ${effectiveValue === 'floating' ? 'text-blue-600 dark:text-blue-400' : 'text-purple-600 dark:text-purple-400'}`}- >- {#if effectiveValue === 'floating'}- <MonitorSpeakerIcon class="size-3" />- {m.navigation_mode_floating()}- {:else}- <DockIcon class="size-3" />- {m.navigation_mode_docked()}- {/if}- </span>- <span class="text-muted-foreground text-xs">- ({hasOverride ? m.local_override() : m.server_default()})- </span>- </div>- </div>- </div>- </div>-</div>diff --git a/frontend/src/lib/components/navigation-setting-control.svelte b/frontend/src/lib/components/navigation-setting-control.sveltedeleted file mode 100644index 5ce65c1ed..000000000--- a/frontend/src/lib/components/navigation-setting-control.svelte+++ /dev/null@@ -1,137 +0,0 @@-<script lang="ts">- import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import { Switch } from '$lib/components/ui/switch/index.js';- import { m } from '$lib/paraglide/messages';- import { CloseIcon, EnvironmentsIcon, SmartphoneIcon, type IconType } from '$lib/icons';-- let {- id,- description,- serverValue,- localOverride,- onServerChange,- onLocalOverride,- onClearOverride,- serverDisabled = false- }: {- id: string;- description: string;- serverValue: boolean;- localOverride?: boolean;- onServerChange: (value: boolean) => void;- onLocalOverride: (value: boolean) => void;- onClearOverride: () => void;- serverDisabled?: boolean;- } = $props();-- const effectiveValue = $derived(localOverride !== undefined ? localOverride : serverValue);- const hasOverride = $derived(localOverride !== undefined);-</script>--<div- class={`flex h-full flex-col rounded-lg border p-3 sm:p-4 ${hasOverride ? 'border-orange-200 bg-orange-50/50 dark:border-orange-800 dark:bg-orange-950/20' : 'border-border'}`}->- <div class="flex h-full flex-col space-y-3">- <div class="flex items-start gap-3">- <div class="min-w-0 flex-1">- <div class="mb-1 flex items-start justify-between gap-2">- {#if hasOverride}- <ArcaneButton- action="base"- tone="ghost"- size="sm"- icon={CloseIcon}- onclick={onClearOverride}- class="h-6 w-6 flex-shrink-0 p-0 text-orange-600 hover:text-orange-700 dark:text-orange-400 dark:hover:text-orange-300"- title={m.clear_local_override()}- />- {/if}- </div>- <p class="text-muted-foreground text-xs leading-relaxed">{description}</p>- </div>- </div>-- <div class="flex flex-1 flex-col justify-end space-y-2 sm:space-y-3">- <div class="bg-background/50 rounded-md border">- <div class="flex items-center justify-between p-2 sm:p-3">- <div class="flex min-w-0 flex-1 items-center gap-2">- <EnvironmentsIcon class="text-muted-foreground size-3 flex-shrink-0 sm:size-4" />- <div class="min-w-0 flex-1">- <p class="text-xs leading-tight font-medium">{m.server_default()}</p>- <p class="text-muted-foreground hidden text-xs leading-tight sm:block">{m.applies_to_all_users()}</p>- </div>- </div>-- <div class="flex flex-shrink-0 gap-1">- <div class="flex items-center">- <Switch- id={`server-${id}`}- bind:checked={serverValue}- disabled={serverDisabled}- onCheckedChange={(v) => !serverDisabled && onServerChange(!!v)}- />- </div>- </div>- </div>- </div>-- <div- class={`rounded-md border ${hasOverride ? 'border-orange-200 bg-orange-50 dark:border-orange-800 dark:bg-orange-950/30' : 'bg-muted/30 border-border'}`}- >- <div class="flex items-center justify-between p-2 sm:p-3">- <div class="flex min-w-0 flex-1 items-center gap-2">- <SmartphoneIcon class="text-muted-foreground size-3 flex-shrink-0 sm:size-4" />- <div class="min-w-0 flex-1">- <div class="flex flex-col sm:flex-row sm:items-center sm:gap-1">- <p class="text-xs leading-tight font-medium">{m.this_device()}</p>- {#if hasOverride}- <span class="text-xs leading-tight text-orange-600 dark:text-orange-400">({m.override()})</span>- {/if}- </div>- <p class="text-muted-foreground hidden text-xs leading-tight sm:block">- {hasOverride ? m.overriding_server_default() : m.server_default()}- </p>- </div>- </div>-- {#if hasOverride}- <div class="flex flex-shrink-0 gap-1">- <div class="flex items-center">- <Switch id={`local-${id}`} bind:checked={localOverride} onCheckedChange={(v) => onLocalOverride(!!v)} />- </div>- </div>- {:else}- <div class="flex flex-shrink-0 items-center gap-2">- <span class="text-muted-foreground hidden text-xs font-medium sm:inline">- {effectiveValue ? m.on() : m.off()}- </span>- <ArcaneButton- action="base"- size="sm"- customLabel={m.override()}- onclick={() => onLocalOverride(!effectiveValue)}- class="h-6 px-2 text-xs sm:h-7"- />- </div>- {/if}- </div>- </div>- </div>-- <div class="bg-muted/30 rounded-md border p-2">- <div class="flex items-center justify-between gap-2">- <span class="text-muted-foreground text-xs font-medium">{m.current_state()}:</span>- <div class="flex flex-wrap items-center justify-end gap-1">- <span- class={`text-xs font-medium ${effectiveValue ? 'text-green-600 dark:text-green-400' : 'text-gray-600 dark:text-gray-400'}`}- >- {effectiveValue ? m.on() : m.off()}- </span>- <span class="text-muted-foreground text-xs">- ({hasOverride ? m.local_override() : m.server_default()})- </span>- </div>- </div>- </div>- </div>-</div>diff --git a/frontend/src/lib/components/progress-popover.svelte b/frontend/src/lib/components/progress-popover.svelteindex 6a3c8ca68..da2544092 100644--- a/frontend/src/lib/components/progress-popover.svelte+++ b/frontend/src/lib/components/progress-popover.svelte@@ -1,6 +1,7 @@<script lang="ts">import { cn } from '$lib/utils.js';import * as Popover from '$lib/components/ui/popover/index.js';+ import * as Dialog from '$lib/components/ui/dialog/index.js';import { Popover as PopoverPrimitive } from 'bits-ui';import { Progress } from '$lib/components/ui/progress/index.js';import * as Item from '$lib/components/ui/item/index.js';@@ -17,6 +18,7 @@isIndeterminatePhase} from '$lib/utils/pull-progress';import { DownloadIcon, BoxIcon, ArrowDownIcon, VerifiedCheckIcon, CloseIcon } from '$lib/icons';+ import { IsMobile } from '$lib/hooks/is-mobile.svelte.js';interface Props {open?: boolean;@@ -36,6 +38,7 @@preventCloseWhileLoading?: boolean;onCancel?: () => void;layers?: Record<string, LayerProgress>;+ triggerClass?: string;children: Snippet;}@@ -57,9 +60,12 @@preventCloseWhileLoading = true,onCancel,layers = {},+ triggerClass,children}: Props = $props();+ const isMobile = new IsMobile();+const percent = $derived(Math.round(progress));const isComplete = $derived(progress >= 100);@@ -134,104 +140,118 @@}</script>-<Popover.Root bind:open onOpenChange={handleOpenChange}>- <Popover.Trigger>- {@render children()}- </Popover.Trigger>-- <Popover.Content class={cn('w-80 p-2', className)} {align} {sideOffset}>- <Item.Root variant={error ? 'outline' : 'default'} class={cn(error && 'border-destructive/50')}>- <Item.Media- variant="icon"- class={cn(- error && 'bg-destructive/10 text-destructive',- isComplete && !loading && !error && 'bg-green-500/10 text-green-500'- )}- >+{#snippet content()}+ <Item.Root variant={error ? 'outline' : 'default'} class={cn(error && 'border-destructive/50')}>+ <Item.Media+ variant="icon"+ class={cn(+ error && 'bg-destructive/10 text-destructive',+ isComplete && !loading && !error && 'bg-green-500/10 text-green-500'+ )}+ >+ {#if error}+ <CloseIcon class={iconClass} />+ {:else if isComplete && !loading}+ <VerifiedCheckIcon class={iconClass} />+ {:else}+ <PhaseIcon class={cn(iconClass, loading && 'animate-pulse')} />+ {/if}+ </Item.Media>+ <Item.Content>+ <Item.Title class={cn(error && 'text-destructive')}>{displayTitle}</Item.Title>+ <Item.Description class={cn(error && 'line-clamp-none break-words whitespace-pre-wrap')}>{#if error}- <CloseIcon class={iconClass} />- {:else if isComplete && !loading}- <VerifiedCheckIcon class={iconClass} />+ {error}+ {:else if mode !== 'pull'}+ {statusText || subtitle}+ {:else if layerStats.total > 0}+ {statusText || subtitle}+ <span class="text-muted-foreground">+ · {m.progress_layers_status({ completed: layerStats.completed, total: layerStats.total })}</span+ >{:else}- <PhaseIcon class={cn(iconClass, loading && 'animate-pulse')} />+ {hasReachedComplete ? 100 : percent}% · {statusText || subtitle}{/if}- </Item.Media>- <Item.Content>- <Item.Title class={cn(error && 'text-destructive')}>{displayTitle}</Item.Title>- <Item.Description>- {#if error}- {error}- {:else if mode !== 'pull'}- {statusText || subtitle}- {:else if layerStats.total > 0}- {statusText || subtitle}- <span class="text-muted-foreground">- · {m.progress_layers_status({ completed: layerStats.completed, total: layerStats.total })}</span- >- {:else}- {hasReachedComplete ? 100 : percent}% · {statusText || subtitle}- {/if}- </Item.Description>- </Item.Content>- {#if loading && onCancel}- <Item.Actions>- <ArcaneButton action="cancel" size="sm" onclick={onCancel} />- </Item.Actions>- {/if}- {#if !error}- <Item.Footer>- <Progress- value={hasReachedComplete || isIndeterminate ? 100 : progress}- max={100}- class="h-1.5 w-full"- indeterminate={(isIndeterminate && !hasReachedComplete) || isIndeterminateGeneric}- />- </Item.Footer>- {/if}- </Item.Root>-- {#if Object.keys(layers).length > 0 && !error}- <Collapsible.Root bind:open={showImageLayersState.current} class="mt-2">- <Collapsible.Trigger- class="text-muted-foreground hover:text-foreground hover:bg-accent flex w-full items-center justify-between rounded-md px-2 py-1.5 text-xs transition-colors"- >- {m.progress_show_layers()}- <ArrowDownIcon class={cn('size-3 transition-transform', showImageLayersState.current && 'rotate-180')} />- </Collapsible.Trigger>- <Collapsible.Content>- <div class="mt-2 max-h-48 space-y-1.5 overflow-y-auto">- {#each Object.entries(layers) as [id, layer] (id)}- {@const phase = hasReachedComplete ? 'complete' : getLayerPhase(layer.status)}- {@const layerPercent =- phase === 'complete' ? 100 : layer.total > 0 ? Math.round((layer.current / layer.total) * 100) : 0}- <div class="bg-muted/30 rounded-md px-2 py-1.5">- <div class="flex items-center justify-between gap-2">- <span class="text-muted-foreground truncate font-mono text-[10px]">{id.slice(0, 12)}</span>- <span- class={cn(- 'text-[10px] font-medium',- phase === 'complete' && 'text-green-500',- phase === 'downloading' && 'text-blue-500',- phase === 'extracting' && 'text-amber-500'- )}- >- {#if phase === 'complete'}- ✓- {:else if layer.total > 0}- {layerPercent}%- {:else}- {layer.status}- {/if}- </span>- </div>- <Progress value={layerPercent} max={100} class="mt-1 h-1" />- </div>- {/each}- </div>- </Collapsible.Content>- </Collapsible.Root>+ </Item.Description>+ </Item.Content>+ {#if loading && onCancel}+ <Item.Actions>+ <ArcaneButton action="cancel" size="sm" onclick={onCancel} />+ </Item.Actions>{/if}+ {#if !error}+ <Item.Footer>+ <Progress+ value={hasReachedComplete || isIndeterminate ? 100 : progress}+ max={100}+ class="h-1.5 w-full"+ indeterminate={(isIndeterminate && !hasReachedComplete) || isIndeterminateGeneric}+ />+ </Item.Footer>+ {/if}+ </Item.Root>++ {#if Object.keys(layers).length > 0 && !error}+ <Collapsible.Root bind:open={showImageLayersState.current} class="mt-2">+ <Collapsible.Trigger+ class="text-muted-foreground hover:text-foreground hover:bg-accent flex w-full items-center justify-between rounded-md px-2 py-1.5 text-xs transition-colors"+ >+ {m.progress_show_layers()}+ <ArrowDownIcon class={cn('size-3 transition-transform', showImageLayersState.current && 'rotate-180')} />+ </Collapsible.Trigger>+ <Collapsible.Content>+ <div class="mt-2 max-h-48 space-y-1.5 overflow-y-auto">+ {#each Object.entries(layers) as [id, layer] (id)}+ {@const phase = hasReachedComplete ? 'complete' : getLayerPhase(layer.status)}+ {@const layerPercent =+ phase === 'complete' ? 100 : layer.total > 0 ? Math.round((layer.current / layer.total) * 100) : 0}+ <div class="bg-muted/30 rounded-md px-2 py-1.5">+ <div class="flex items-center justify-between gap-2">+ <span class="text-muted-foreground truncate font-mono text-[10px]">{id.slice(0, 12)}</span>+ <span+ class={cn(+ 'text-[10px] font-medium',+ phase === 'complete' && 'text-green-500',+ phase === 'downloading' && 'text-blue-500',+ phase === 'extracting' && 'text-amber-500'+ )}+ >+ {#if phase === 'complete'}+ ✓+ {:else if layer.total > 0}+ {layerPercent}%+ {:else}+ {layer.status}+ {/if}+ </span>+ </div>+ <Progress value={layerPercent} max={100} class="mt-1 h-1" />+ </div>+ {/each}+ </div>+ </Collapsible.Content>+ </Collapsible.Root>+ {/if}+{/snippet}++{#if isMobile.current}+ <Dialog.Root bind:open onOpenChange={handleOpenChange}>+ <Dialog.Trigger class={triggerClass}>+ {@render children()}+ </Dialog.Trigger>+ <Dialog.Content class={cn('p-2', error && 'max-w-[600px]', className)} showCloseButton={!loading}>+ {@render content()}+ </Dialog.Content>+ </Dialog.Root>+{:else}+ <Popover.Root bind:open onOpenChange={handleOpenChange}>+ <Popover.Trigger class={triggerClass}>+ {@render children()}+ </Popover.Trigger>- <PopoverPrimitive.Arrow class="fill-background stroke-border" />- </Popover.Content>-</Popover.Root>+ <Popover.Content class={cn('w-80 p-2', error && 'w-auto max-w-[600px]', className)} {align} {sideOffset}>+ {@render content()}+ <PopoverPrimitive.Arrow class="fill-background stroke-border" />+ </Popover.Content>+ </Popover.Root>+{/if}diff --git a/frontend/src/lib/components/quick-actions.svelte b/frontend/src/lib/components/quick-actions.svelteindex f1a5133ad..4ec6dd570 100644--- a/frontend/src/lib/components/quick-actions.svelte+++ b/frontend/src/lib/components/quick-actions.svelte@@ -1,10 +1,10 @@<script lang="ts">- import { Spinner } from '$lib/components/ui/spinner/index.js';- import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import { ArcaneButton } from '$lib/components/arcane-button/index.js';+ import { ActionButtonGroup, type ActionButton } from '$lib/components/action-button-group/index.js';import { m } from '$lib/paraglide/messages';import type { DockerInfo } from '$lib/types/docker-info.type';- import { RefreshIcon, StartIcon, StopIcon, TrashIcon, EllipsisIcon } from '$lib/icons';+ import { StartIcon, StopIcon, TrashIcon } from '$lib/icons';+ import { cn } from '$lib/utils';type IsLoadingFlags = {starting: boolean;@@ -39,9 +39,48 @@compact?: boolean;class?: string;} = $props();++ const isAnyActionLoading = $derived(isLoading.starting || isLoading.stopping || isLoading.pruning);++ const actionButtons: ActionButton[] = $derived([+ {+ id: 'start-all',+ action: 'start_all',+ label: m.quick_actions_start_all(),+ onclick: onStartAll,+ loading: isLoading.starting,+ disabled: !dockerInfo || stoppedContainers === 0 || isAnyActionLoading,+ badge: stoppedContainers+ },+ {+ id: 'stop-all',+ action: 'stop_all',+ label: m.quick_actions_stop_all(),+ onclick: onStopAll,+ loading: isLoading.stopping,+ disabled: !dockerInfo || (dockerInfo?.ContainersRunning ?? 0) === 0 || isAnyActionLoading,+ badge: runningContainers+ },+ {+ id: 'prune',+ action: 'prune',+ label: m.quick_actions_prune_system(),+ onclick: onOpenPruneDialog,+ loading: isLoading.pruning,+ disabled: !dockerInfo || isAnyActionLoading+ },+ {+ id: 'refresh',+ action: 'refresh',+ label: m.common_refresh(),+ onclick: onRefresh,+ loading: refreshing,+ disabled: isAnyActionLoading || refreshing+ }+ ]);</script>-<section class={className}>+<section class={cn(compact ? 'flex min-w-0 flex-1 items-center justify-end' : '', className)}>{#if compact}{#if loadingDockerInfo}<div class="hidden flex-wrap items-center gap-2 sm:flex">@@ -51,125 +90,7 @@</div><div class="bg-card/60 size-9 animate-pulse rounded-lg backdrop-blur-sm sm:hidden"></div>{:else}- <div class="hidden flex-wrap items-center gap-2 sm:flex">- <button- class="ring-offset-background focus-visible:ring-ring bg-card/60 hover:bg-card/90 group bubble-shadow hover-lift inline-flex h-9 items-center gap-2 rounded-lg border border-emerald-500/20 px-3 py-1.5 text-xs backdrop-blur-sm transition-all hover:border-emerald-500/40 hover:bg-emerald-500/10 hover:backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo || stoppedContainers === 0 || isLoading.starting || isLoading.stopping || isLoading.pruning}- onclick={onStartAll}- aria-busy={isLoading.starting}- >- {#if isLoading.starting}- <Spinner class="size-3.5 text-emerald-500" />- {:else}- <StartIcon class="size-4 text-emerald-500" />- {/if}- <span class="font-medium">{m.quick_actions_start_all()}</span>- <span class="text-muted-foreground rounded-full border px-1 py-0.5 text-[10px]"- >{m.quick_actions_containers({ count: stoppedContainers })}</span- >- </button>-- <button- class="ring-offset-background focus-visible:ring-ring bg-card/60 hover:bg-card/90 group bubble-shadow hover-lift inline-flex h-9 items-center gap-2 rounded-lg border border-sky-500/20 px-3 py-1.5 text-xs backdrop-blur-sm transition-all hover:border-sky-500/40 hover:bg-sky-500/10 hover:backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo ||- (dockerInfo?.ContainersRunning ?? 0) === 0 ||- isLoading.starting ||- isLoading.stopping ||- isLoading.pruning}- onclick={onStopAll}- aria-busy={isLoading.stopping}- >- {#if isLoading.stopping}- <Spinner class="size-3.5 text-sky-500" />- {:else}- <StopIcon class="size-4 text-sky-500" />- {/if}- <span class="font-medium">{m.quick_actions_stop_all()}</span>- <span class="text-muted-foreground rounded-full border px-1 py-0.5 text-[10px]"- >{m.quick_actions_containers({ count: runningContainers })}</span- >- </button>-- <button- class="ring-offset-background focus-visible:ring-ring bg-card/60 hover:bg-card/90 group bubble-shadow hover-lift inline-flex h-9 items-center gap-2 rounded-lg border border-red-500/20 px-3 py-1.5 text-xs backdrop-blur-sm transition-all hover:border-red-500/40 hover:bg-red-500/10 hover:backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo || isLoading.starting || isLoading.stopping || isLoading.pruning}- onclick={onOpenPruneDialog}- aria-busy={isLoading.pruning}- >- {#if isLoading.pruning}- <Spinner class="size-3.5 text-red-500" />- {:else}- <TrashIcon class="size-4 text-red-500" />- {/if}- <span class="font-medium">{m.quick_actions_prune_system()}</span>- </button>-- <button- class="ring-offset-background focus-visible:ring-ring bg-card/60 hover:bg-card/90 border-primary/20 hover:border-primary/40 hover:bg-primary/10 group bubble-shadow hover-lift inline-flex h-9 items-center gap-2 rounded-lg border px-3 py-1.5 text-xs backdrop-blur-sm transition-all hover:backdrop-blur-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={isLoading.starting || isLoading.stopping || isLoading.pruning || refreshing}- onclick={onRefresh}- aria-busy={refreshing}- >- {#if refreshing}- <Spinner class="text-primary size-3.5" />- {:else}- <RefreshIcon class="text-primary size-4" />- {/if}- <span class="font-medium">{m.common_refresh()}</span>- </button>- </div>-- <div class="sm:hidden">- <DropdownMenu.Root>- <DropdownMenu.Trigger>- {#snippet child({ props })}- <ArcaneButton {...props} action="base" tone="ghost" size="icon" class="bg-background/70 size-9 border">- <span class="sr-only">{m.common_open_menu()}</span>- <EllipsisIcon class="size-4" />- </ArcaneButton>- {/snippet}- </DropdownMenu.Trigger>-- <DropdownMenu.Content- align="end"- class="bg-popover/90 z-50 min-w-[160px] rounded-xl border p-1 shadow-lg backdrop-blur-md"- >- <DropdownMenu.Group>- <DropdownMenu.Item- onclick={onStartAll}- disabled={!dockerInfo || stoppedContainers === 0 || isLoading.starting || isLoading.stopping || isLoading.pruning}- >- {m.quick_actions_start_all()}- </DropdownMenu.Item>-- <DropdownMenu.Item- onclick={onStopAll}- disabled={!dockerInfo ||- (dockerInfo?.ContainersRunning ?? 0) === 0 ||- isLoading.starting ||- isLoading.stopping ||- isLoading.pruning}- >- {m.quick_actions_stop_all()}- </DropdownMenu.Item>-- <DropdownMenu.Item- onclick={onOpenPruneDialog}- disabled={!dockerInfo || isLoading.starting || isLoading.stopping || isLoading.pruning}- >- {m.quick_actions_prune_system()}- </DropdownMenu.Item>-- <DropdownMenu.Item- onclick={onRefresh}- disabled={isLoading.starting || isLoading.stopping || isLoading.pruning || refreshing}- >- {m.common_refresh()}- </DropdownMenu.Item>- </DropdownMenu.Group>- </DropdownMenu.Content>- </DropdownMenu.Root>- </div>+ <ActionButtonGroup buttons={actionButtons} />{/if}{:else}<h2 class="mb-3 text-lg font-semibold tracking-tight">{m.quick_actions_title()}</h2>@@ -189,19 +110,20 @@{:else}<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"><div class="group hover-lift rounded-2xl bg-gradient-to-br from-emerald-500/20 to-emerald-500/0 p-[1px]">- <button- class="ring-offset-background focus-visible:ring-ring bg-card/90 bubble bubble-shadow flex min-h-14 w-full items-center gap-3 rounded-2xl border p-3 backdrop-blur-sm transition-all hover:shadow-md focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo || stoppedContainers === 0 || isLoading.starting || isLoading.stopping || isLoading.pruning}+ <ArcaneButton+ action="start_all"+ size="card"+ tone="outline-success"+ class="bg-card/90 bubble bubble-shadow backdrop-blur-sm"onclick={onStartAll}- aria-busy={isLoading.starting}+ loading={isLoading.starting}+ disabled={!dockerInfo || stoppedContainers === 0 || isAnyActionLoading}+ icon={null}+ showLabel={false}><div class="relative"><div class="flex size-10 items-center justify-center rounded-lg bg-emerald-500/10 ring-1 ring-emerald-500/30">- {#if isLoading.starting}- <Spinner class="size-4 text-emerald-400" />- {:else}- <StartIcon class="size-5 text-emerald-400" />- {/if}+ <StartIcon class="size-5 text-emerald-400" /></div><divclass="pointer-events-none absolute -inset-1 rounded-lg bg-emerald-500/20 opacity-0 blur-lg transition-opacity group-hover:opacity-40"@@ -213,27 +135,24 @@<span class="rounded-full border px-1.5 py-0.5">{m.quick_actions_containers({ count: stoppedContainers })}</span></div></div>- </button>+ </ArcaneButton></div><div class="group hover-lift rounded-2xl bg-gradient-to-br from-sky-500/20 to-sky-500/0 p-[1px]">- <button- class="ring-offset-background focus-visible:ring-ring bg-card/90 bubble bubble-shadow flex min-h-14 w-full items-center gap-3 rounded-2xl border p-3 backdrop-blur-sm transition-all hover:shadow-md focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo ||- (dockerInfo?.ContainersRunning ?? 0) === 0 ||- isLoading.starting ||- isLoading.stopping ||- isLoading.pruning}+ <ArcaneButton+ action="stop_all"+ size="card"+ tone="outline-info"+ class="bg-card/90 bubble bubble-shadow backdrop-blur-sm"onclick={onStopAll}- aria-busy={isLoading.stopping}+ loading={isLoading.stopping}+ disabled={!dockerInfo || (dockerInfo?.ContainersRunning ?? 0) === 0 || isAnyActionLoading}+ icon={null}+ showLabel={false}><div class="relative"><div class="flex size-10 items-center justify-center rounded-lg bg-sky-500/10 ring-1 ring-sky-500/30">- {#if isLoading.stopping}- <Spinner class="size-4 text-sky-400" />- {:else}- <StopIcon class="size-5 text-sky-400" />- {/if}+ <StopIcon class="size-5 text-sky-400" /></div><divclass="pointer-events-none absolute -inset-1 rounded-lg bg-sky-500/20 opacity-0 blur-lg transition-opacity group-hover:opacity-40"@@ -245,23 +164,24 @@<span class="rounded-full border px-1.5 py-0.5">{m.quick_actions_containers({ count: runningContainers })}</span></div></div>- </button>+ </ArcaneButton></div><div class="group hover-lift rounded-2xl bg-gradient-to-br from-red-500/20 to-red-500/0 p-[1px]">- <button- class="ring-offset-background focus-visible:ring-ring bg-card/90 bubble bubble-shadow flex min-h-14 w-full items-center gap-3 rounded-2xl border p-3 backdrop-blur-sm transition-all hover:shadow-md focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"- disabled={!dockerInfo || isLoading.starting || isLoading.stopping || isLoading.pruning}+ <ArcaneButton+ action="prune"+ size="card"+ tone="outline-destructive"+ class="bg-card/90 bubble bubble-shadow backdrop-blur-sm"onclick={onOpenPruneDialog}- aria-busy={isLoading.pruning}+ loading={isLoading.pruning}+ disabled={!dockerInfo || isAnyActionLoading}+ icon={null}+ showLabel={false}><div class="relative"><div class="flex size-10 items-center justify-center rounded-lg bg-red-500/10 ring-1 ring-red-500/30">- {#if isLoading.pruning}- <Spinner class="size-4 text-red-400" />- {:else}- <TrashIcon class="size-5 text-red-400" />- {/if}+ <TrashIcon class="size-5 text-red-400" /></div><divclass="pointer-events-none absolute -inset-1 rounded-lg bg-red-500/20 opacity-0 blur-lg transition-opacity group-hover:opacity-40"@@ -271,7 +191,7 @@<div class="text-sm font-medium">{m.quick_actions_prune_system()}</div><div class="text-muted-foreground text-xs">{m.quick_actions_prune_description()}</div></div>- </button>+ </ArcaneButton></div></div>{/if}diff --git a/frontend/src/lib/components/stat-card.svelte b/frontend/src/lib/components/stat-card.svelteindex 20bb7bec2..d9b06493f 100644--- a/frontend/src/lib/components/stat-card.svelte+++ b/frontend/src/lib/components/stat-card.svelte@@ -33,7 +33,7 @@<span class="text-sm leading-none font-bold tabular-nums">{value}</span>- <span class="text-muted-foreground text-[10px] leading-none font-medium tracking-wider uppercase">+ <span class="text-muted-foreground text-[10px] leading-none font-medium tracking-wider whitespace-nowrap uppercase">{title}</span></div>@@ -48,7 +48,7 @@style="--stat-hover-tint: currentColor;"><div- class="pointer-events-none absolute inset-0 bg-gradient-to-br from-[var(--stat-hover-tint)]/5 via-transparent to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100"+ class="pointer-events-none absolute inset-0 bg-linear-to-br from-(--stat-hover-tint)/5 via-transparent to-transparent opacity-0 transition-opacity duration-500 group-hover:opacity-100"></div><div class="relative flex items-start justify-between">@@ -67,7 +67,7 @@<divclass={cn('flex size-10 items-center justify-center rounded-full transition-colors duration-300',- 'bg-transparent group-hover:bg-[var(--stat-hover-tint)]/10'+ 'bg-transparent group-hover:bg-(--stat-hover-tint)/10')}><Icon class={cn('size-6 transition-transform duration-300 group-hover:scale-110', iconColor)} />diff --git a/frontend/src/lib/components/ui/dialog/dialog-content.svelte b/frontend/src/lib/components/ui/dialog/dialog-content.svelteindex 617ef4db2..6ec623ac4 100644--- a/frontend/src/lib/components/ui/dialog/dialog-content.svelte+++ b/frontend/src/lib/components/ui/dialog/dialog-content.svelte@@ -10,10 +10,12 @@class: className,portalProps,children,+ showCloseButton = true,...restProps}: WithoutChildrenOrChild<DialogPrimitive.ContentProps> & {portalProps?: DialogPrimitive.PortalProps;children: Snippet;+ showCloseButton?: boolean;} = $props();</script>@@ -29,11 +31,13 @@{...restProps}>{@render children?.()}- <DialogPrimitive.Close- class="ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"- >- <CloseIcon />- <span class="sr-only">Close</span>- </DialogPrimitive.Close>+ {#if showCloseButton}+ <DialogPrimitive.Close+ class="ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"+ >+ <CloseIcon />+ <span class="sr-only">Close</span>+ </DialogPrimitive.Close>+ {/if}</DialogPrimitive.Content></Dialog.Portal>diff --git a/frontend/src/lib/layouts/index.ts b/frontend/src/lib/layouts/index.tsindex 2d5f3b554..09fa61668 100644--- a/frontend/src/lib/layouts/index.ts+++ b/frontend/src/lib/layouts/index.ts@@ -6,3 +6,4 @@ export {type SettingsStatCard,type SettingsPageType} from './settings-page-layout.svelte';+export { default as ResourceDetailLayout, type DetailAction } from './resource-detail-layout.svelte';diff --git a/frontend/src/lib/layouts/resource-detail-layout.svelte b/frontend/src/lib/layouts/resource-detail-layout.sveltenew file mode 100644index 000000000..de6244f3b--- /dev/null+++ b/frontend/src/lib/layouts/resource-detail-layout.svelte@@ -0,0 +1,178 @@+<script lang="ts">+ import { ArcaneButton } from '$lib/components/arcane-button/index.js';+ import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';+ import { cn } from '$lib/utils';+ import { ArrowLeftIcon, EllipsisIcon } from '$lib/icons';+ import type { Snippet } from 'svelte';+ import type { Action } from '$lib/components/arcane-button/index.js';++ export interface DetailAction {+ id: string;+ action: Action;+ label: string;+ loadingLabel?: string;+ loading?: boolean;+ disabled?: boolean;+ onclick: () => void;+ }++ interface Props {+ backUrl: string;+ backLabel: string;+ title: string;+ subtitle?: string;+ actions?: DetailAction[];+ badges?: Snippet;+ headerExtra?: Snippet;+ children: Snippet;+ class?: string;+ }++ let {+ backUrl,+ backLabel,+ title,+ subtitle,+ actions = [],+ badges,+ headerExtra,+ children,+ class: className = ''+ }: Props = $props();++ let scrollY = $state(0);+ const showFloatingHeader = $derived(scrollY > 120);++ $effect(() => {+ const onScroll = () => (scrollY = window.scrollY);+ window.addEventListener('scroll', onScroll, { passive: true });+ return () => window.removeEventListener('scroll', onScroll);+ });++ const primaryAction = $derived(actions[0]);+ const secondaryActions = $derived(actions.slice(1));+</script>++{#if showFloatingHeader}+ <div+ class="animate-in fade-in slide-in-from-top-2 fixed top-4 left-1/2 z-40 w-[calc(100%-2rem)] max-w-fit -translate-x-1/2 px-2 duration-200 sm:w-auto sm:px-0"+ >+ <div+ class="bg-popover/95 supports-backdrop-filter:bg-popover/85 border-border/60 flex items-center gap-3 rounded-full border px-4 py-2 shadow-lg backdrop-blur-lg"+ >+ <ArcaneButton action="base" tone="ghost" href={backUrl} class="size-8 rounded-full p-0">+ <ArrowLeftIcon class="size-4" />+ </ArcaneButton>++ <div class="bg-border/60 h-4 w-px"></div>++ <span class="max-w-[200px] truncate text-sm font-semibold">{title}</span>++ {#if actions.length > 0}+ <div class="bg-border/60 h-4 w-px"></div>+ <div class="flex items-center gap-1.5">+ {#if primaryAction}+ <ArcaneButton+ action={primaryAction.action}+ customLabel={primaryAction.label}+ loading={primaryAction.loading}+ disabled={primaryAction.disabled}+ onclick={primaryAction.onclick}+ />+ {/if}+ {#if secondaryActions.length > 0}+ <DropdownMenu.Root>+ <DropdownMenu.Trigger>+ {#snippet child({ props })}+ <ArcaneButton {...props} action="base" tone="ghost" size="icon" class="size-8">+ <EllipsisIcon class="size-4" />+ </ArcaneButton>+ {/snippet}+ </DropdownMenu.Trigger>+ <DropdownMenu.Content align="end" class="min-w-[140px]">+ {#each secondaryActions as act (act.id)}+ <DropdownMenu.Item onclick={act.onclick} disabled={act.disabled || act.loading}>+ {act.loading ? act.loadingLabel || act.label : act.label}+ </DropdownMenu.Item>+ {/each}+ </DropdownMenu.Content>+ </DropdownMenu.Root>+ {/if}+ </div>+ {/if}+ </div>+ </div>+{/if}++<div class={cn('space-y-6 pb-8', className)}>+ <div class="space-y-4">+ <div class="flex items-center justify-between">+ <ArcaneButton action="base" tone="ghost" href={backUrl} class="-ml-2">+ <ArrowLeftIcon class="size-4" />+ {backLabel}+ </ArcaneButton>++ <div class="flex items-center gap-2 sm:hidden">+ {#if actions.length === 1 && primaryAction}+ <ArcaneButton+ action={primaryAction.action}+ customLabel={primaryAction.label}+ loading={primaryAction.loading}+ disabled={primaryAction.disabled}+ onclick={primaryAction.onclick}+ />+ {:else if actions.length > 1}+ <DropdownMenu.Root>+ <DropdownMenu.Trigger>+ {#snippet child({ props })}+ <ArcaneButton {...props} action="base" tone="outline" size="icon" class="size-9">+ <EllipsisIcon class="size-4" />+ </ArcaneButton>+ {/snippet}+ </DropdownMenu.Trigger>+ <DropdownMenu.Content align="end" class="min-w-[160px]">+ {#each actions as act (act.id)}+ <DropdownMenu.Item onclick={act.onclick} disabled={act.disabled || act.loading}>+ {act.loading ? act.loadingLabel || act.label : act.label}+ </DropdownMenu.Item>+ {/each}+ </DropdownMenu.Content>+ </DropdownMenu.Root>+ {/if}+ </div>+ </div>++ <div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">+ <div class="min-w-0 flex-1 space-y-2">+ <h1 class="text-2xl font-bold tracking-tight break-all sm:text-3xl">{title}</h1>+ {#if subtitle}+ <p class="text-muted-foreground text-sm">{subtitle}</p>+ {/if}+ {#if badges}+ <div class="flex flex-wrap items-center gap-2 pt-1">+ {@render badges()}+ </div>+ {/if}+ </div>++ <div class="hidden shrink-0 items-center gap-2 sm:flex">+ {#each actions as act (act.id)}+ <ArcaneButton+ action={act.action}+ customLabel={act.label}+ loadingLabel={act.loadingLabel}+ loading={act.loading}+ disabled={act.disabled}+ onclick={act.onclick}+ />+ {/each}+ </div>+ </div>++ {#if headerExtra}+ {@render headerExtra()}+ {/if}+ </div>++ {@render children()}+</div>diff --git a/frontend/src/lib/layouts/resource-page-layout.svelte b/frontend/src/lib/layouts/resource-page-layout.svelteindex 5d57e1925..6f4b8c488 100644--- a/frontend/src/lib/layouts/resource-page-layout.svelte+++ b/frontend/src/lib/layouts/resource-page-layout.svelte@@ -1,79 +1,71 @@-<script lang="ts">- import { ArcaneButton } from '$lib/components/arcane-button/index.js';- import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';- import StatCard from '$lib/components/stat-card.svelte';- import type { Snippet } from 'svelte';- import type { Action } from '$lib/components/arcane-button/index.js';- import { EllipsisIcon, type IconType } from '$lib/icons';-- export interface ActionButton {- id: string;- action: Action;- label: string;- loadingLabel?: string;- loading?: boolean;- disabled?: boolean;- onclick: () => void;- showOnMobile?: boolean;- }+<script lang="ts" module>+ import type { ActionButton as ActionButtonType } from '$lib/components/action-button-group/index.js';+ export type ActionButton = ActionButtonType;export interface StatCardConfig {title: string;value: string | number;subtitle?: string;- icon: IconType;+ icon: import('$lib/icons').IconType;iconColor?: string;bgColor?: string;class?: string;}+</script>++<script lang="ts">+ import { ActionButtonGroup } from '$lib/components/action-button-group/index.js';+ import StatCard from '$lib/components/stat-card.svelte';+ import type { Snippet } from 'svelte';+ import type { IconType } from '$lib/icons';+ import { cn } from '$lib/utils';interface Props {title: string;subtitle?: string;+ icon?: IconType;actionButtons?: ActionButton[];statCards?: StatCardConfig[];mainContent: Snippet;additionalContent?: Snippet;class?: string;- containerClass?: string;}let {title,subtitle,+ icon: Icon,actionButtons = [],statCards = [],mainContent,additionalContent,- class: className = '',- containerClass = 'space-y-8 pb-5 md:space-y-10 md:pb-5'+ class: className = ''}: Props = $props();-- const mobileVisibleButtons = $derived(actionButtons.filter((btn) => btn.showOnMobile));- const mobileDropdownButtons = $derived(actionButtons.filter((btn) => !btn.showOnMobile));</script>-<div class="{containerClass} {className}">- <div class="relative flex flex-col justify-between gap-4 sm:flex-row sm:items-center">- <div class="flex-1">- <h1 class="text-2xl font-bold tracking-tight sm:text-3xl">{title}</h1>- {#if subtitle}- <p class="text-muted-foreground mt-1 text-sm">{subtitle}</p>+<div class={cn('space-y-6 pt-3 md:space-y-10 md:pt-5', className)}>+ <header class="flex items-center justify-between gap-4">+ <div class="flex min-w-0 flex-1 items-center gap-3 sm:gap-4">+ {#if Icon}+ <div+ class="bg-primary/10 text-primary ring-primary/20 flex size-8 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-10"+ >+ <Icon class="size-4 sm:size-5" />+ </div>{/if}+ <div class="min-w-0">+ <h1 class="text-2xl font-bold tracking-tight sm:text-3xl">{title}</h1>+ {#if subtitle}+ <p class="text-muted-foreground mt-1 text-sm">{subtitle}</p>+ {/if}+ </div></div>{#if statCards && statCards.length > 0}- <div class="hidden flex-1 items-center justify-center md:flex">- <div class="border-border/50 relative overflow-hidden rounded-full border">- <!-- Subtle muted background overlay -->- <div class="bg-muted/50 absolute inset-0"></div>-- <!-- Glass effect container -->- <div class="relative flex items-center gap-4 px-4 py-1.5 backdrop-blur-md">+ <div class="hidden shrink items-center justify-center md:flex">+ <div class="border-border/50 bg-muted/30 relative overflow-hidden rounded-xl border backdrop-blur-sm">+ <div class="flex flex-wrap items-center justify-center gap-x-4 gap-y-2 px-4 py-2">{#each statCards as card, i}- {#if i > 0}- <div class="bg-border/50 h-4 w-px"></div>- {/if}<StatCardvariant="mini"title={card.title}@@ -88,63 +80,8 @@</div>{/if}- <div class="flex flex-1 items-center justify-end gap-2">- {#if actionButtons.length > 0}- <div class="hidden items-center gap-2 sm:flex">- {#each actionButtons as button}- <ArcaneButton- action={button.action}- customLabel={button.label}- loadingLabel={button.loadingLabel}- loading={button.loading}- disabled={button.disabled}- onclick={button.onclick}- />- {/each}- </div>-- <div class="absolute top-4 right-4 flex items-center gap-2 sm:hidden">- {#each mobileVisibleButtons as button}- <ArcaneButton- action={button.action}- customLabel={button.label}- loadingLabel={button.loadingLabel}- loading={button.loading}- disabled={button.disabled}- onclick={button.onclick}- size="sm"- />- {/each}-- {#if mobileDropdownButtons.length > 0}- <DropdownMenu.Root>- <DropdownMenu.Trigger>- {#snippet child({ props })}- <ArcaneButton {...props} action="base" tone="ghost" size="icon" class="bg-background/70 size-9 border">- <span class="sr-only">Open menu</span>- <EllipsisIcon class="size-4" />- </ArcaneButton>- {/snippet}- </DropdownMenu.Trigger>-- <DropdownMenu.Content- align="end"- class="bg-popover/90 z-50 min-w-[160px] rounded-xl border p-1 shadow-lg backdrop-blur-md"- >- <DropdownMenu.Group>- {#each mobileDropdownButtons as button}- <DropdownMenu.Item onclick={button.onclick} disabled={button.disabled || button.loading}>- {button.loading ? button.loadingLabel || button.label : button.label}- </DropdownMenu.Item>- {/each}- </DropdownMenu.Group>- </DropdownMenu.Content>- </DropdownMenu.Root>- {/if}- </div>- {/if}- </div>- </div>+ <ActionButtonGroup buttons={actionButtons} />+ </header>{@render mainContent()}diff --git a/frontend/src/lib/layouts/settings-page-layout.svelte b/frontend/src/lib/layouts/settings-page-layout.svelteindex ba09724ee..1c189ec20 100644--- a/frontend/src/lib/layouts/settings-page-layout.svelte+++ b/frontend/src/lib/layouts/settings-page-layout.svelte@@ -2,12 +2,14 @@import type { Snippet } from 'svelte';import { UiConfigDisabledTag } from '$lib/components/badges/index.js';import StatCard from '$lib/components/stat-card.svelte';+ import HeaderCard from '$lib/components/header-card.svelte';import { ArcaneButton } from '$lib/components/arcane-button/index.js';import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';import type { Action } from '$lib/components/arcane-button/index.js';import { getContext } from 'svelte';import { m } from '$lib/paraglide/messages';- import { EllipsisIcon, ResetIcon, SaveIcon, type IconType } from '$lib/icons';+ import { EllipsisIcon, ResetIcon, type IconType } from '$lib/icons';+ import { cn } from '$lib/utils';export interface SettingsActionButton {id: string;@@ -61,7 +63,6 @@const mobileVisibleButtons = $derived(actionButtons.filter((btn) => btn.showOnMobile));const mobileDropdownButtons = $derived(actionButtons.filter((btn) => !btn.showOnMobile));- // Get form state from context if availableconst formState = getContext<{hasChanges: boolean;isLoading: boolean;@@ -70,155 +71,147 @@}>('settingsFormState');</script>-<div class="px-2 py-4 pb-5 sm:px-6 sm:py-6 sm:pb-10 lg:px-8 {className}">- <div- class="from-background/60 via-background/40 to-background/60 relative overflow-hidden rounded-xl border bg-gradient-to-br p-4 shadow-sm sm:p-6"- >- <div class="bg-primary/10 pointer-events-none absolute -top-10 -right-10 size-40 rounded-full blur-3xl"></div>- <div class="bg-muted/40 pointer-events-none absolute -bottom-10 -left-10 size-40 rounded-full blur-3xl"></div>- <div class="relative flex items-start gap-3 sm:gap-4">- <div- class="bg-primary/10 text-primary ring-primary/20 flex size-8 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-10"- >- <Icon class="size-4 sm:size-5" />+<div class={cn('px-2 py-4 pb-5 sm:px-6 sm:py-6 sm:pb-10 lg:px-8', className)}>+ <HeaderCard>+ <div class="flex items-center justify-between gap-4">+ <div class="flex flex-1 items-center gap-3 sm:gap-4">+ {#if Icon}+ <div+ class="bg-primary/10 text-primary ring-primary/20 flex size-8 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-10"+ >+ <Icon class="size-4 sm:size-5" />+ </div>+ {/if}+ <div class="min-w-0">+ <h1 class="text-xl font-bold tracking-tight sm:text-3xl">{title}</h1>+ {#if description}+ <p class="text-muted-foreground mt-1 hidden text-sm sm:block sm:text-base">{description}</p>+ {/if}+ </div></div>- <div class="min-w-0 flex-1">- <div class="flex items-start justify-between gap-3">- <div class="flex-1">- <h1 class="settings-title min-w-0 text-xl sm:text-3xl">{title}</h1>+ {#if pageType === 'management' && statCards && statCards.length > 0}+ <div class="hidden flex-1 items-center justify-center md:flex">+ <div class="border-border/50 relative overflow-hidden rounded-full border">+ <div class="bg-muted/50 absolute inset-0"></div>+ <div class="relative flex items-center gap-4 px-4 py-1.5 backdrop-blur-md">+ {#each statCards as card, i}+ {#if i > 0}+ <div class="bg-border/50 h-4 w-px"></div>+ {/if}+ <StatCard+ variant="mini"+ title={card.title}+ value={card.value}+ icon={card.icon}+ iconColor={card.iconColor}+ class={card.class}+ />+ {/each}+ </div></div>+ </div>+ {/if}- {#if pageType === 'management' && statCards && statCards.length > 0}- <div class="hidden flex-1 items-center justify-center md:flex">- <div class="border-border/50 relative overflow-hidden rounded-full border">- <!-- Subtle muted background overlay -->- <div class="bg-muted/50 absolute inset-0"></div>-- <!-- Glass effect container -->- <div class="relative flex items-center gap-4 px-4 py-1.5 backdrop-blur-md">- {#each statCards as card, i}- {#if i > 0}- <div class="bg-border/50 h-4 w-px"></div>- {/if}- <StatCard- variant="mini"- title={card.title}- value={card.value}- icon={card.icon}- iconColor={card.iconColor}- class={card.class}- />- {/each}- </div>- </div>- </div>- {/if}+ <div class="flex flex-1 items-center justify-end gap-2">+ {#if showReadOnlyTag}+ <UiConfigDisabledTag />+ {/if}- <div class="flex flex-1 shrink-0 items-center justify-end gap-2">- {#if showReadOnlyTag}- <UiConfigDisabledTag />+ {#if pageType === 'form' && formState && !showReadOnlyTag}+ <div class="hidden items-center gap-2 sm:flex">+ {#if formState.hasChanges}+ <span class="mr-2 text-xs text-orange-600 dark:text-orange-400">{m.common_unsaved_changes()}</span>+ {:else if !formState.hasChanges && formState.saveFunction}+ <span class="mr-2 text-xs text-green-600 dark:text-green-400">{m.common_all_changes_saved()}</span>{/if}- {#if pageType === 'form' && formState && !showReadOnlyTag}- <div class="hidden items-center gap-2 sm:flex">- {#if formState.hasChanges}- <span class="mr-2 text-xs text-orange-600 dark:text-orange-400"> Unsaved changes </span>- {:else if !formState.hasChanges && formState.saveFunction}- <span class="mr-2 text-xs text-green-600 dark:text-green-400"> All changes saved </span>- {/if}+ {#if formState.hasChanges && formState.resetFunction}+ <ArcaneButton+ action="base"+ tone="outline"+ size="sm"+ onclick={() => formState.resetFunction && formState.resetFunction()}+ disabled={formState.isLoading}+ class="gap-2"+ icon={ResetIcon}+ customLabel={m.common_reset()}+ />+ {/if}- {#if formState.hasChanges && formState.resetFunction}- <ArcaneButton- action="base"- tone="outline"- size="sm"- onclick={() => formState.resetFunction && formState.resetFunction()}- disabled={formState.isLoading}- class="gap-2"- icon={ResetIcon}- customLabel={m.common_reset()}- />- {/if}+ <ArcaneButton+ action="save"+ onclick={async () => {+ if (formState.saveFunction) {+ await formState.saveFunction();+ }+ }}+ disabled={!formState.hasChanges || !formState.saveFunction}+ loading={formState.isLoading}+ size="sm"+ class="min-w-[80px] gap-2"+ />+ </div>+ {/if}- <ArcaneButton- action="save"- onclick={async () => {- if (formState.saveFunction) {- await formState.saveFunction();- }- }}- disabled={!formState.hasChanges || !formState.saveFunction}- loading={formState.isLoading}- size="sm"- class="min-w-[80px] gap-2"- />- </div>- {/if}+ {#if pageType === 'management' && actionButtons.length > 0}+ <div class="hidden items-center gap-2 sm:flex">+ {#each actionButtons as button}+ <ArcaneButton+ action={button.action}+ customLabel={button.label}+ loadingLabel={button.loadingLabel}+ loading={button.loading}+ disabled={button.disabled}+ onclick={button.onclick}+ size="sm"+ />+ {/each}+ </div>- {#if pageType === 'management' && actionButtons.length > 0}- <div class="hidden items-center gap-2 sm:flex">- {#each actionButtons as button}- <ArcaneButton- action={button.action}- customLabel={button.label}- loadingLabel={button.loadingLabel}- loading={button.loading}- disabled={button.disabled}- onclick={button.onclick}- size="sm"- />- {/each}- </div>-- <div class="flex items-center gap-2 sm:hidden">- {#each mobileVisibleButtons as button}- <ArcaneButton- action={button.action}- customLabel={button.label}- loadingLabel={button.loadingLabel}- loading={button.loading}- disabled={button.disabled}- onclick={button.onclick}- size="sm"- />- {/each}-- {#if mobileDropdownButtons.length > 0}- <DropdownMenu.Root>- <DropdownMenu.Trigger>- {#snippet child({ props })}- <ArcaneButton {...props} action="base" tone="ghost" size="icon" class="bg-background/70 size-8 border">- <span class="sr-only">Open menu</span>- <EllipsisIcon class="size-4" />- </ArcaneButton>- {/snippet}- </DropdownMenu.Trigger>-- <DropdownMenu.Content- align="end"- class="bg-popover/90 z-50 min-w-[160px] rounded-xl border p-1 shadow-lg backdrop-blur-md"- >- <DropdownMenu.Group>- {#each mobileDropdownButtons as button}- <DropdownMenu.Item onclick={button.onclick} disabled={button.disabled || button.loading}>- {button.loading ? button.loadingLabel || button.label : button.label}- </DropdownMenu.Item>- {/each}- </DropdownMenu.Group>- </DropdownMenu.Content>- </DropdownMenu.Root>- {/if}- </div>+ <div class="flex items-center gap-2 sm:hidden">+ {#each mobileVisibleButtons as button}+ <ArcaneButton+ action={button.action}+ customLabel={button.label}+ loadingLabel={button.loadingLabel}+ loading={button.loading}+ disabled={button.disabled}+ onclick={button.onclick}+ size="sm"+ />+ {/each}++ {#if mobileDropdownButtons.length > 0}+ <DropdownMenu.Root>+ <DropdownMenu.Trigger>+ {#snippet child({ props })}+ <ArcaneButton {...props} action="base" tone="ghost" size="icon" class="bg-background/70 size-8 border">+ <span class="sr-only">{m.common_open_menu()}</span>+ <EllipsisIcon class="size-4" />+ </ArcaneButton>+ {/snippet}+ </DropdownMenu.Trigger>++ <DropdownMenu.Content+ align="end"+ class="bg-popover/90 z-50 min-w-[160px] rounded-xl border p-1 shadow-lg backdrop-blur-md"+ >+ <DropdownMenu.Group>+ {#each mobileDropdownButtons as button}+ <DropdownMenu.Item onclick={button.onclick} disabled={button.disabled || button.loading}>+ {button.loading ? button.loadingLabel || button.label : button.label}+ </DropdownMenu.Item>+ {/each}+ </DropdownMenu.Group>+ </DropdownMenu.Content>+ </DropdownMenu.Root>{/if}</div>- </div>- {#if description}- <p class="text-muted-foreground mt-1 text-sm sm:text-base">{@html description}</p>{/if}</div></div>- </div>+ </HeaderCard><div class="mt-6 sm:mt-8">{@render mainContent()}diff --git a/frontend/src/lib/layouts/tabbed-page-layout.svelte b/frontend/src/lib/layouts/tabbed-page-layout.svelteindex 890390b77..c67a27cb9 100644--- a/frontend/src/lib/layouts/tabbed-page-layout.svelte+++ b/frontend/src/lib/layouts/tabbed-page-layout.svelte@@ -3,7 +3,6 @@import * as Tabs from '$lib/components/ui/tabs/index.js';import { TabBar, type TabItem } from '$lib/components/tab-bar/index.js';import type { Snippet } from 'svelte';- import { browser } from '$app/environment';import { cn } from '$lib/utils';import { ArrowLeftIcon } from '$lib/icons';@@ -38,7 +37,6 @@let scrollContainer = $state<HTMLDivElement | null>(null);$effect(() => {- if (!browser) return;const getScrollTop = () => (scrollContainer ? scrollContainer.scrollTop : window.scrollY);const onScroll = () => {showFloatingHeader = getScrollTop() > 100;@@ -86,7 +84,7 @@{#if showFloatingHeader}<div class="fixed top-4 left-1/2 z-30 -translate-x-1/2 transition-all duration-300 ease-in-out"><div- class="bg-popover/90 supports-[backdrop-filter]:bg-popover/80 bubble-shadow-lg border-border/50 rounded-xl border px-4 py-3 backdrop-blur-md"+ class="bg-popover/90 supports-backdrop-filter:bg-popover/80 bubble-shadow-lg border-border/50 rounded-xl border px-4 py-3 backdrop-blur-md"><div class="flex items-center gap-4"><div class="min-w-0">diff --git a/frontend/src/lib/utils/api.util.ts b/frontend/src/lib/utils/api.util.tsindex d1653a1f6..7e38d8fe2 100644--- a/frontend/src/lib/utils/api.util.ts+++ b/frontend/src/lib/utils/api.util.ts@@ -37,7 +37,7 @@ export async function handleApiResultWithCallbacks<T>({if (result.error) {const dockerMsg = extractDockerErrorMessage(result.error);console.error(`API Error: ${message}:`, result.error);- toast.error(`${message}: ${dockerMsg}`);+ toast.error(message, { description: dockerMsg });await Promise.resolve(onError(result.error));} else {await Promise.resolve(onSuccess(result.data as T));diff --git a/frontend/src/routes/(app)/containers/+page.svelte b/frontend/src/routes/(app)/containers/+page.svelteindex 1dd436665..1fe0d9d46 100644--- a/frontend/src/routes/(app)/containers/+page.svelte+++ b/frontend/src/routes/(app)/containers/+page.svelte@@ -8,7 +8,7 @@import { m } from '$lib/paraglide/messages';import { imageService } from '$lib/services/image-service';import { untrack } from 'svelte';- import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index.js';+ import { ResourcePageLayout, type ActionButton, type StatCardConfig } from '$lib/layouts/index';import { useEnvironmentRefresh } from '$lib/hooks/use-environment-refresh.svelte';import { parallelRefresh } from '$lib/utils/refresh.util';import { BoxIcon } from '$lib/icons';diff --git a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte b/frontend/src/routes/(app)/containers/[containerId]/+page.svelteindex e9adb5756..d67b9e9a7 100644--- a/frontend/src/routes/(app)/containers/[containerId]/+page.svelte+++ b/frontend/src/routes/(app)/containers/[containerId]/+page.svelte@@ -299,6 +299,7 @@name={containerDisplayName}type="container"itemState={container.state?.running ? 'running' : 'stopped'}+ desktopVariant="adaptive"loading={{ start: starting, stop: stopping, restart: restarting, remove: removing }}/>{/snippet}diff --git a/frontend/src/routes/(app)/containers/container-table.svelte b/frontend/src/routes/(app)/containers/container-table.svelteindex 8e23c5067..ec603018a 100644--- a/frontend/src/routes/(app)/containers/container-table.svelte+++ b/frontend/src/routes/(app)/containers/container-table.svelte@@ -266,41 +266,27 @@}const columns = $derived([+ { accessorKey: 'id', title: m.common_id(), cell: IdCell, hidden: true },{ accessorKey: 'names', id: 'name', title: m.common_name(), sortable: !groupByProject, cell: NameCell },- { accessorKey: 'id', title: m.common_id(), cell: IdCell },{ accessorKey: 'state', title: m.common_state(), sortable: !groupByProject, cell: StateCell },{ accessorKey: 'image', title: m.common_image(), sortable: !groupByProject, cell: ImageCell },- { accessorKey: 'imageId', id: 'update', title: m.containers_update_column(), cell: UpdateCell },{ accessorKey: 'status', title: m.common_status() },+ { accessorKey: 'imageId', id: 'update', title: m.containers_update_column(), cell: UpdateCell },{ accessorKey: 'networkSettings', id: 'ipAddress', title: m.containers_ip_address(), sortable: false, cell: IPAddressCell },{ accessorKey: 'ports', title: m.common_ports(), cell: PortsCell },{ accessorKey: 'created', title: m.common_created(), sortable: !groupByProject, cell: CreatedCell }] satisfies ColumnSpec<ContainerSummaryDto>[]);const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },{ id: 'state', label: m.common_state(), defaultVisible: true },- { id: 'image', label: m.common_image(), defaultVisible: true },{ id: 'status', label: m.common_status(), defaultVisible: true },+ { id: 'image', label: m.common_image(), defaultVisible: true },+ { id: 'ipAddress', label: m.containers_ip_address(), defaultVisible: false },{ id: 'ports', label: m.common_ports(), defaultVisible: true },{ id: 'created', label: m.common_created(), defaultVisible: true }];- function onToggleMobileField(fieldId: string) {- mobileFieldVisibility = {- ...mobileFieldVisibility,- [fieldId]: !mobileFieldVisibility[fieldId]- };- }-- const mobileFieldsForOptions = $derived(- mobileFields.map((field) => ({- id: field.id,- label: field.label,- visible: mobileFieldVisibility[field.id] ?? true- }))- );-function getProjectName(container: ContainerSummaryDto): string {const projectLabel = container.labels?.['com.docker.compose.project'];return projectLabel || 'No Project';@@ -349,7 +335,7 @@{/snippet}{#snippet IdCell({ item }: { item: ContainerSummaryDto })}- <span class="font-mono text-sm">{String(item.id).substring(0, 12)}</span>+ <span class="font-mono text-sm">{String(item.id)}</span>{/snippet}{#snippet StateCell({ item }: { item: ContainerSummaryDto })}@@ -482,6 +468,14 @@icon: ClockIcon,iconVariant: 'purple' as const,show: (mobileFieldVisibility.status ?? true) && item.status !== undefined+ },+ {+ label: m.containers_ip_address(),+ getValue: (item: ContainerSummaryDto) => getContainerIpAddress(item) ?? m.common_na(),+ icon: NetworksIcon,+ iconVariant: 'sky' as const,+ type: 'mono' as const,+ show: mobileFieldVisibility.ipAddress ?? false}]}footer={(mobileFieldVisibility.created ?? true)@@ -625,10 +619,14 @@{#snippet GroupedTableView({table,- renderPagination+ renderPagination,+ mobileFieldsForOptions,+ onToggleMobileField}: {table: TableType<ContainerSummaryDto>;renderPagination: import('svelte').Snippet;+ mobileFieldsForOptions: { id: string; label: string; visible: boolean }[];+ onToggleMobileField: (fieldId: string) => void;})}<div class="flex h-full flex-col"><div class="shrink-0 border-b">@@ -703,7 +701,7 @@</div></div>- <div class="space-y-4 px-6 py-2 md:hidden">+ <div class="space-y-4 py-2 md:hidden">{#each groupedContainers() ?? [] as [projectName, projectContainers] (projectName)}{@const projectContainerIds = new Set(projectContainers.map((c) => c.id))}{@const projectRows = table@@ -716,15 +714,13 @@description={`${projectContainers.length} ${projectContainers.length === 1 ? 'container' : 'containers'}`}icon={ProjectsIcon}>- <div class="space-y-3">- {#each projectRows as row (row.id)}- {@render ContainerMobileCardSnippet({ item: row.original as ContainerSummaryDto, mobileFieldVisibility })}- {:else}- <div class="h-24 flex items-center justify-center text-center text-muted-foreground">- {m.common_no_results_found()}- </div>- {/each}- </div>+ {#each projectRows as row (row.id)}+ {@render ContainerMobileCardSnippet({ item: row.original as ContainerSummaryDto, mobileFieldVisibility })}+ {:else}+ <div class="flex h-24 items-center justify-center text-center text-muted-foreground">+ {m.common_no_results_found()}+ </div>+ {/each}</DropdownCard>{/each}</div>diff --git a/frontend/src/routes/(app)/customize/+page.svelte b/frontend/src/routes/(app)/customize/+page.svelteindex f31edc2bf..d38c9b54a 100644--- a/frontend/src/routes/(app)/customize/+page.svelte+++ b/frontend/src/routes/(app)/customize/+page.svelte@@ -10,6 +10,7 @@import { debounced } from '$lib/utils/utils';import * as InputGroup from '$lib/components/ui/input-group/index.js';import { SearchIcon, TemplateIcon, ArrowRightIcon, FileTextIcon, RegistryIcon, VariableIcon, CustomizeIcon } from '$lib/icons';+ import HeaderCard from '$lib/components/header-card.svelte';let { data } = $props();let searchQuery = $state('');@@ -86,60 +87,50 @@}</script>-<div class="px-2 py-4 sm:px-6 sm:py-6 lg:px-8">- <div class="mb-6 sm:mb-8">- <div- class="from-background/60 via-background/40 to-background/60 relative overflow-hidden rounded-xl border bg-gradient-to-br p-4 shadow-sm sm:p-6"- >- <div class="bg-primary/10 pointer-events-none absolute -top-10 -right-10 size-40 rounded-full blur-3xl"></div>- <div class="bg-muted/40 pointer-events-none absolute -bottom-10 -left-10 size-40 rounded-full blur-3xl"></div>- <div class="relative">- <div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">- <div class="flex w-full items-start gap-3 sm:gap-4">- <div- class="bg-primary/10 text-primary ring-primary/20 flex size-8 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-10"- >- <CustomizeIcon class="size-4 sm:size-5" />- </div>- <div class="min-w-0 flex-1">- <div class="flex items-start justify-between gap-3">- <h1 class="min-w-0 text-xl font-bold tracking-tight sm:text-2xl">{m.customize_title()}</h1>- <div class="shrink-0">- <UiConfigDisabledTag />- </div>- </div>- <p class="text-muted-foreground mt-1 text-sm sm:text-base">{m.customize_subtitle()}</p>- </div>- </div>+<div class="space-y-8 pb-5 md:space-y-10 md:pb-5">+ <HeaderCard>+ <div class="flex items-center justify-between gap-4">+ <div class="flex min-w-64 flex-1 items-center gap-3 sm:gap-4">+ <div+ class="bg-primary/10 text-primary ring-primary/20 flex size-8 shrink-0 items-center justify-center rounded-lg ring-1 sm:size-10"+ >+ <CustomizeIcon class="size-4 sm:size-5" /></div>-- <div class="relative mt-4 w-full sm:mt-6 sm:max-w-md">- <InputGroup.Root>- <InputGroup.Input- placeholder={m.customize_search_placeholder()}- value={searchQuery}- oninput={(e) => {- searchQuery = e.currentTarget.value;- debouncedSearch(e.currentTarget.value);- }}- onkeydown={(e) => {- if (e.key === 'Enter') {- performSearch((e.currentTarget as HTMLInputElement).value, true);- }- }}- />- <InputGroup.Addon>- {#if showSearchResults}- <ArcaneButton action="base" tone="ghost" size="icon" onclick={clearSearch} class="size-6 p-0">×</ArcaneButton>- {:else}- <SearchIcon class="size-4" />- {/if}- </InputGroup.Addon>- </InputGroup.Root>+ <div class="min-w-0">+ <h1 class="text-3xl font-bold tracking-tight">{m.customize_title()}</h1>+ <p class="text-muted-foreground mt-1 text-sm sm:text-base">{m.customize_subtitle()}</p></div></div>+ <div class="flex items-center gap-3">+ <UiConfigDisabledTag />+ </div>+ </div>++ <div class="relative mt-4 w-full sm:mt-6 sm:max-w-md">+ <InputGroup.Root>+ <InputGroup.Input+ placeholder={m.customize_search_placeholder()}+ value={searchQuery}+ oninput={(e) => {+ searchQuery = e.currentTarget.value;+ debouncedSearch(e.currentTarget.value);+ }}+ onkeydown={(e) => {+ if (e.key === 'Enter') {+ performSearch((e.currentTarget as HTMLInputElement).value, true);+ }+ }}+ />+ <InputGroup.Addon>+ {#if showSearchResults}+ <ArcaneButton action="base" tone="ghost" size="icon" onclick={clearSearch} class="size-6 p-0">×</ArcaneButton>+ {:else}+ <SearchIcon class="size-4" />+ {/if}+ </InputGroup.Addon>+ </InputGroup.Root></div>- </div>+ </HeaderCard>{#if !showSearchResults}<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 sm:gap-6 xl:grid-cols-3">diff --git a/frontend/src/routes/(app)/customize/registries/registry-table.svelte b/frontend/src/routes/(app)/customize/registries/registry-table.svelteindex c9e53d3f5..95e4469af 100644--- a/frontend/src/routes/(app)/customize/registries/registry-table.svelte+++ b/frontend/src/routes/(app)/customize/registries/registry-table.svelte@@ -155,9 +155,11 @@] satisfies ColumnSpec<ContainerRegistry>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },{ id: 'username', label: m.common_username(), defaultVisible: true },- { id: 'description', label: m.common_description(), defaultVisible: true }+ { id: 'description', label: m.common_description(), defaultVisible: true },+ { id: 'enabled', label: m.common_status(), defaultVisible: true },+ { id: 'createdAt', label: m.common_created(), defaultVisible: true }];let mobileFieldVisibility = $state<Record<string, boolean>>({});diff --git a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelteindex b3a63c7a1..59fceb519 100644--- a/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte+++ b/frontend/src/routes/(app)/customize/templates/components/RegistryManager.svelte@@ -28,12 +28,12 @@</script><div class="space-y-6">- <div class="flex items-center justify-between">+ <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between"><div><h3 class="text-lg font-semibold">{m.templates_registries_section_title()}</h3><p class="text-muted-foreground text-sm">{m.templates_registries_section_description()}</p></div>- <ArcaneButton action="create" onclick={onAddRegistry}>+ <ArcaneButton action="create" onclick={onAddRegistry} class="w-full sm:w-auto">{m.common_add_button({ resource: m.resource_registry_cap() })}</ArcaneButton></div>@@ -61,9 +61,9 @@<div class="space-y-3">{#each registries as registry}<Card.Root class="p-4">- <div class="flex items-center justify-between">- <div class="flex-1">- <div class="mb-1 flex items-center gap-2">+ <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">+ <div class="min-w-0 flex-1">+ <div class="mb-1 flex flex-wrap items-center gap-2"><h4 class="font-medium">{registry.name}</h4><Badge variant={registry.enabled ? 'default' : 'secondary'}>{registry.enabled ? m.common_enabled() : m.common_disabled()}@@ -74,7 +74,7 @@<p class="text-muted-foreground mt-1 text-sm">{registry.description}</p>{/if}</div>- <div class="flex items-center gap-2">+ <div class="flex items-center gap-2 self-end sm:self-center"><Switchchecked={registry.enabled}onCheckedChange={(checked) => onUpdateRegistry(registry.id, { enabled: checked })}diff --git a/frontend/src/routes/(app)/customize/templates/template-table.svelte b/frontend/src/routes/(app)/customize/templates/template-table.svelteindex 1925f2af5..54d8052bc 100644--- a/frontend/src/routes/(app)/customize/templates/template-table.svelte+++ b/frontend/src/routes/(app)/customize/templates/template-table.svelte@@ -145,21 +145,6 @@};}- function onToggleMobileField(fieldId: string) {- mobileFieldVisibility = {- ...mobileFieldVisibility,- [fieldId]: !mobileFieldVisibility[fieldId]- };- }-- const mobileFieldsForOptions = $derived(- mobileFields.map((field) => ({- id: field.id,- label: field.label,- visible: mobileFieldVisibility[field.id] ?? field.defaultVisible ?? true- }))- );-function getRegistryName(template: Template): string {if (template.registry?.name) {return template.registry.name;@@ -364,7 +349,17 @@</DropdownMenu.CheckboxItem>{/snippet}-{#snippet GroupedTableView({ table, renderPagination }: { table: TemplateTable; renderPagination: import('svelte').Snippet })}+{#snippet GroupedTableView({+ table,+ renderPagination,+ mobileFieldsForOptions,+ onToggleMobileField+}: {+ table: TemplateTable;+ renderPagination: import('svelte').Snippet;+ mobileFieldsForOptions: { id: string; label: string; visible: boolean }[];+ onToggleMobileField: (fieldId: string) => void;+})}<div class="flex h-full flex-col"><div class="shrink-0 border-b"><DataTableToolbar@@ -442,7 +437,7 @@</div></div>- <div class="space-y-4 px-6 py-2 md:hidden">+ <div class="space-y-4 py-2 md:hidden">{#each groupedTemplates ?? [] as [registryName, registryTemplates] (registryName)}{@const registryTemplateIds = new Set(registryTemplates.map((t) => t.id))}{@const registryRows = table.getRowModel().rows.filter((row) => registryTemplateIds.has((row.original as Template).id))}@@ -453,15 +448,13 @@description={`${registryTemplates.length} ${registryTemplates.length === 1 ? m.resource_template() : m.resource_templates()}`}icon={registryName === m.templates_local_templates() ? FolderOpenIcon : RegistryIcon}>- <div class="space-y-3">- {#each registryRows as row (row.id)}- {@render TemplateMobileCardSnippet({ item: row.original as Template, mobileFieldVisibility })}- {:else}- <div class="h-24 flex items-center justify-center text-center text-muted-foreground">- {m.common_no_results_found()}- </div>- {/each}- </div>+ {#each registryRows as row (row.id)}+ {@render TemplateMobileCardSnippet({ item: row.original as Template, mobileFieldVisibility })}+ {:else}+ <div class="flex h-24 items-center justify-center text-center text-muted-foreground">+ {m.common_no_results_found()}+ </div>+ {/each}</DropdownCard>{/each}</div>diff --git a/frontend/src/routes/(app)/dashboard/+page.svelte b/frontend/src/routes/(app)/dashboard/+page.svelteindex 3e9897a4f..18cc0ba6c 100644--- a/frontend/src/routes/(app)/dashboard/+page.svelte+++ b/frontend/src/routes/(app)/dashboard/+page.svelte@@ -19,7 +19,6 @@import { m } from '$lib/paraglide/messages';import { invalidateAll } from '$app/navigation';import { systemService } from '$lib/services/system-service';- import { untrack } from 'svelte';import bytes from 'bytes';import { CpuIcon, MemoryStickIcon } from '$lib/icons';@@ -273,15 +272,17 @@}</script>-<div class="flex min-h-full flex-col space-y-8 pb-5 md:space-y-10 md:pb-5">- <div class="relative flex flex-col justify-between gap-4 sm:flex-row sm:items-center">- <div class="flex-1">- <h1 class="text-2xl font-bold tracking-tight sm:text-3xl">{m.dashboard_title()}</h1>- <p class="text-muted-foreground mt-1 text-sm">{m.dashboard_subtitle()}</p>+<div class="flex min-h-full flex-col space-y-6 pt-3 md:space-y-10 md:pt-5">+ <header class="flex items-center justify-between gap-4">+ <div class="flex min-w-0 flex-1 items-center gap-3 sm:gap-4">+ <div class="min-w-0">+ <h1 class="text-2xl font-bold tracking-tight sm:text-3xl">{m.dashboard_title()}</h1>+ <p class="text-muted-foreground mt-1 text-sm">{m.dashboard_subtitle()}</p>+ </div></div><QuickActions- class="absolute top-4 right-4 shrink-0 sm:static"+ class="min-w-0 flex-1"compact{dockerInfo}{stoppedContainers}@@ -294,7 +295,7 @@onRefresh={refreshData}refreshing={isLoading.refreshing}/>- </div>+ </header><section><div class="mb-4 flex items-center justify-between gap-4">diff --git a/frontend/src/routes/(app)/environments/environment-table.svelte b/frontend/src/routes/(app)/environments/environment-table.svelteindex e10ad6262..fe422ec28 100644--- a/frontend/src/routes/(app)/environments/environment-table.svelte+++ b/frontend/src/routes/(app)/environments/environment-table.svelte@@ -223,7 +223,9 @@] satisfies ColumnSpec<Environment>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },+ { id: 'status', label: m.common_status(), defaultVisible: true },+ { id: 'enabled', label: m.common_enabled(), defaultVisible: true },{ id: 'apiUrl', label: m.environments_api_url(), defaultVisible: true }];diff --git a/frontend/src/routes/(app)/images/[imageId]/+page.svelte b/frontend/src/routes/(app)/images/[imageId]/+page.svelteindex b3ec7445b..89acc5c2d 100644--- a/frontend/src/routes/(app)/images/[imageId]/+page.svelte+++ b/frontend/src/routes/(app)/images/[imageId]/+page.svelte@@ -1,6 +1,5 @@<script lang="ts">import * as Card from '$lib/components/ui/card';- import * as Breadcrumb from '$lib/components/ui/breadcrumb';import { goto } from '$app/navigation';import { Badge } from '$lib/components/ui/badge';import { format } from 'date-fns';@@ -12,6 +11,8 @@import { ArcaneButton } from '$lib/components/arcane-button';import { m } from '$lib/paraglide/messages';import { imageService } from '$lib/services/image-service.js';+ import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';+ import StatusBadge from '$lib/components/badges/status-badge.svelte';import { VolumesIcon, ClockIcon, TagIcon, LayersIcon, CpuIcon, InfoIcon, SettingsIcon, HashIcon } from '$lib/icons';let { data } = $props();@@ -36,7 +37,7 @@}});- const imageSize = $derived(() => bytes.format(image?.size || 0));+ const imageSize = $derived(() => bytes.format(image?.size || 0) || '0 B');const architecture = $derived(() => image?.architecture || m.common_na());const osName = $derived(() => image?.os || m.common_na());@@ -61,39 +62,35 @@}});}-</script>-<div class="space-y-6 pb-8">- <div class="flex flex-col justify-between gap-4 sm:flex-row sm:items-center">- <div>- <Breadcrumb.Root>- <Breadcrumb.List>- <Breadcrumb.Item>- <Breadcrumb.Link href="/images">{m.images_title()}</Breadcrumb.Link>- </Breadcrumb.Item>- <Breadcrumb.Separator />- <Breadcrumb.Item>- <Breadcrumb.Page>{shortId()}</Breadcrumb.Page>- </Breadcrumb.Item>- </Breadcrumb.List>- </Breadcrumb.Root>- <div class="mt-2 flex items-center gap-2">- <h1 class="text-2xl font-bold tracking-tight break-all">- {image?.repoTags?.[0] || shortId()}- </h1>- </div>- </div>+ const actions: DetailAction[] = $derived([+ {+ id: 'remove',+ action: 'remove',+ label: m.common_remove(),+ loading: isLoading.removing,+ disabled: isLoading.removing,+ onclick: () => handleImageRemove(image.id)+ }+ ]);+</script>- <div class="flex flex-wrap gap-2">- <ArcaneButton- action="remove"- onclick={() => handleImageRemove(image.id)}- loading={isLoading.removing}- disabled={isLoading.removing}- size="sm"- />- </div>- </div>+<ResourceDetailLayout+ backUrl="/images"+ backLabel={m.images_title()}+ title={image?.repoTags?.[0] || shortId()}+ subtitle={shortId()}+ {actions}+>+ {#snippet badges()}+ {#if image?.architecture}+ <StatusBadge variant="blue" text={image.architecture} />+ {/if}+ {#if image?.os}+ <StatusBadge variant="purple" text={image.os} />+ {/if}+ <StatusBadge variant="gray" text={imageSize()} />+ {/snippet}{#if image}<div class="space-y-6">@@ -291,4 +288,4 @@/></div>{/if}-</div>+</ResourceDetailLayout>diff --git a/frontend/src/routes/(app)/images/image-table.svelte b/frontend/src/routes/(app)/images/image-table.svelteindex 42cc0f655..02d93d209 100644--- a/frontend/src/routes/(app)/images/image-table.svelte+++ b/frontend/src/routes/(app)/images/image-table.svelte@@ -145,32 +145,31 @@const columns = [{ accessorKey: 'id', title: m.common_id(), hidden: true },- {- id: 'updates',- accessorFn: (row) => row.updateInfo?.hasUpdate ?? false,- title: m.images_updates(),- cell: UpdatesCell- },+ { accessorKey: 'repo', title: m.images_repository(), sortable: true, cell: RepoCell },+ { accessorKey: 'repoTags', title: m.common_tags(), cell: TagCell },{accessorKey: 'inUse',title: m.common_status(),sortable: true,cell: StatusCell},- { accessorKey: 'created', title: m.common_created(), sortable: true, cell: CreatedCell },+ {+ id: 'updates',+ accessorFn: (row) => row.updateInfo?.hasUpdate ?? false,+ title: m.images_updates(),+ cell: UpdatesCell+ },{ accessorKey: 'size', title: m.common_size(), sortable: true, cell: SizeCell },- { accessorKey: 'repo', title: m.images_repository(), sortable: true, cell: RepoCell },- { accessorKey: 'repoTags', title: m.common_tags(), cell: TagCell }+ { accessorKey: 'created', title: m.common_created(), sortable: true, cell: CreatedCell }] satisfies ColumnSpec<ImageSummaryDto>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },+ { id: 'repoTags', label: m.common_tags(), defaultVisible: true },+ { id: 'inUse', label: m.common_status(), defaultVisible: true },{ id: 'updates', label: m.images_updates(), defaultVisible: true },- { id: 'inUse', label: m.common_in_use(), defaultVisible: true },- { id: 'created', label: m.common_created(), defaultVisible: true },{ id: 'size', label: m.common_size(), defaultVisible: true },- { id: 'repo', label: m.images_repository(), defaultVisible: true },- { id: 'repoTags', label: m.common_tags(), defaultVisible: true }+ { id: 'created', label: m.common_created(), defaultVisible: true }];let mobileFieldVisibility = $state<Record<string, boolean>>({});@@ -264,13 +263,6 @@iconVariant: 'blue' as const,show: mobileFieldVisibility.size ?? true},- {- label: m.images_repository(),- getValue: (item: ImageSummaryDto) => (item.repo && item.repo !== '<none>' ? item.repo : m.images_untagged()),- icon: ImagesIcon,- iconVariant: 'purple' as const,- show: mobileFieldVisibility.repo ?? true- },{label: m.common_tags(),getValue: (item: ImageSummaryDto) => {diff --git a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte b/frontend/src/routes/(app)/networks/[networkId]/+page.svelteindex 40a0100f6..9ec7a6576 100644--- a/frontend/src/routes/(app)/networks/[networkId]/+page.svelte+++ b/frontend/src/routes/(app)/networks/[networkId]/+page.svelte@@ -16,7 +16,6 @@ArrowUpIcon,ArrowDownIcon} from '$lib/icons';- import * as Breadcrumb from '$lib/components/ui/breadcrumb';import * as Alert from '$lib/components/ui/alert';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { format } from 'date-fns';@@ -28,6 +27,7 @@import { tryCatch } from '$lib/utils/try-catch';import { m } from '$lib/paraglide/messages';import { networkService } from '$lib/services/network-service';+ import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';let { data }: { data: PageData } = $props();let errorMessage = $state('');@@ -101,60 +101,37 @@}});}-</script>--<div class="space-y-6 pb-8">- <div class="flex flex-col space-y-4">- <Breadcrumb.Root>- <Breadcrumb.List>- <Breadcrumb.Item>- <Breadcrumb.Link href="/networks">{m.networks_title()}</Breadcrumb.Link>- </Breadcrumb.Item>- <Breadcrumb.Separator />- <Breadcrumb.Item>- <Breadcrumb.Page>{network?.name ?? shortId}</Breadcrumb.Page>- </Breadcrumb.Item>- </Breadcrumb.List>- </Breadcrumb.Root>-- <div class="flex flex-col justify-between gap-4 sm:flex-row sm:items-start">- <div class="flex flex-col">- <div class="flex items-center gap-3">- <h1 class="text-2xl font-bold tracking-tight">- {network?.name ?? m.common_details_title({ resource: m.resource_network_cap() })}- </h1>-- <div class="hidden sm:block">- <StatusBadge variant="gray" text={`${m.common_id()}: ${shortId}`} />- </div>- </div>-- <div class="mt-2 flex gap-2">- {#if inUse}- <StatusBadge variant="green" text={m.networks_in_use_count({ count: connectedContainers.length })} />- {:else}- <StatusBadge variant="amber" text={m.common_unused()} />- {/if}-- {#if isPredefined}- <StatusBadge variant="blue" text={m.networks_predefined()} />- {/if}- <StatusBadge variant="purple" text={network?.driver ?? m.common_unknown()} />- </div>- </div>+ const actions: DetailAction[] = $derived([+ {+ id: 'remove',+ action: 'remove',+ label: m.common_remove(),+ loading: isRemoving,+ disabled: isRemoving || isPredefined,+ onclick: triggerRemove+ }+ ]);+</script>- <div class="self-start">- <ArcaneButton- action="remove"- customLabel={m.common_remove_title({ resource: m.resource_network_cap() })}- onclick={triggerRemove}- loading={isRemoving}- disabled={isRemoving || isPredefined}- />- </div>- </div>- </div>+<ResourceDetailLayout+ backUrl="/networks"+ backLabel={m.networks_title()}+ title={network?.name ?? m.common_details_title({ resource: m.resource_network_cap() })}+ subtitle={`${m.common_id()}: ${shortId}`}+ {actions}+>+ {#snippet badges()}+ {#if inUse}+ <StatusBadge variant="green" text={m.networks_in_use_count({ count: connectedContainers.length })} />+ {:else}+ <StatusBadge variant="amber" text={m.common_unused()} />+ {/if}+ {#if isPredefined}+ <StatusBadge variant="blue" text={m.networks_predefined()} />+ {/if}+ <StatusBadge variant="purple" text={network?.driver ?? m.common_unknown()} />+ {/snippet}{#if errorMessage}<Alert.Root variant="destructive">@@ -667,4 +644,4 @@/></div>{/if}-</div>+</ResourceDetailLayout>diff --git a/frontend/src/routes/(app)/networks/network-table.svelte b/frontend/src/routes/(app)/networks/network-table.svelteindex 56cfb8b28..e8ec60936 100644--- a/frontend/src/routes/(app)/networks/network-table.svelte+++ b/frontend/src/routes/(app)/networks/network-table.svelte@@ -127,40 +127,16 @@}const columns = [- {- accessorKey: 'name',- title: m.common_name(),- sortable: true,- cell: NameCell- },- {- accessorKey: 'id',- title: m.common_id(),- cell: IdCell- },- {- accessorKey: 'inUse',- title: m.common_status(),- sortable: true,- cell: StatusCell- },- {- accessorKey: 'driver',- title: m.common_driver(),- sortable: true,- cell: DriverCell- },- {- accessorKey: 'scope',- title: m.common_scope(),- sortable: true,- cell: ScopeCell- }+ { accessorKey: 'id', title: m.common_id(), cell: IdCell, hidden: true },+ { accessorKey: 'name', title: m.common_name(), sortable: true, cell: NameCell },+ { accessorKey: 'inUse', title: m.common_status(), sortable: true, cell: StatusCell },+ { accessorKey: 'driver', title: m.common_driver(), sortable: true, cell: DriverCell },+ { accessorKey: 'scope', title: m.common_scope(), sortable: true, cell: ScopeCell }] satisfies ColumnSpec<NetworkSummaryDto>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },- { id: 'status', label: m.common_status(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },+ { id: 'inUse', label: m.common_status(), defaultVisible: true },{ id: 'driver', label: m.common_driver(), defaultVisible: true },{ id: 'scope', label: m.common_scope(), defaultVisible: true }];@@ -172,8 +148,8 @@<a class="font-medium hover:underline" href="/networks/{item.id}">{item.name}</a>{/snippet}-{#snippet IdCell({ value }: { value: unknown })}- <span class="truncate font-mono text-sm">{String(value ?? '')}</span>+{#snippet IdCell({ item }: { item: NetworkSummaryDto })}+ <span class="truncate font-mono text-sm">{String(item.id)}</span>{/snippet}{#snippet DriverCell({ item }: { item: NetworkSummaryDto })}@@ -224,7 +200,7 @@subtitle={(item: NetworkSummaryDto) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}badges={[(item: NetworkSummaryDto) =>- (mobileFieldVisibility.status ?? true)+ (mobileFieldVisibility.inUse ?? true)? (item.isDefault ?? false) || DEFAULT_NETWORK_NAMES.has(item.name)? { variant: 'gray', text: m.networks_predefined() }: item.inUsediff --git a/frontend/src/routes/(app)/projects/+page.svelte b/frontend/src/routes/(app)/projects/+page.svelteindex f4d3d9085..bb8b69c5f 100644--- a/frontend/src/routes/(app)/projects/+page.svelte+++ b/frontend/src/routes/(app)/projects/+page.svelte@@ -83,7 +83,7 @@}});- const actionButtons: ActionButton[] = $derived.by(() => [+ const actionButtons: ActionButton[] = $derived([{id: 'create',action: 'create',diff --git a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte b/frontend/src/routes/(app)/projects/[projectId]/+page.svelteindex 4f8a32d06..a35efd8aa 100644--- a/frontend/src/routes/(app)/projects/[projectId]/+page.svelte+++ b/frontend/src/routes/(app)/projects/[projectId]/+page.svelte@@ -288,6 +288,18 @@disabled={!hasChanges}customLabel={m.common_save()}loadingLabel={m.common_saving()}+ class="hidden xl:inline-flex"+ />+ <ArcaneButton+ action="save"+ size="icon"+ showLabel={false}+ loading={isLoading.saving}+ onclick={handleSaveChanges}+ disabled={!hasChanges}+ customLabel={m.common_save()}+ loadingLabel={m.common_saving()}+ class="xl:hidden"/>{/if}<ActionButtons@@ -295,6 +307,7 @@name={project.name}type="project"itemState={project.status}+ desktopVariant="adaptive"bind:startLoading={isLoading.deploying}bind:stopLoading={isLoading.stopping}bind:restartLoading={isLoading.restarting}diff --git a/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte b/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelteindex c7df67faa..02f40212d 100644--- a/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte+++ b/frontend/src/routes/(app)/projects/components/ProjectLogsPanel.svelte@@ -58,9 +58,7 @@<div class="flex flex-col gap-1.5"><div class="flex items-center gap-2"><Card.Title>- <h2>- {m.compose_logs_title()}- </h2>+ <h2>{m.compose_logs_title()}</h2></Card.Title>{#if isStreaming}<div class="flex items-center gap-2">diff --git a/frontend/src/routes/(app)/projects/projects-table.svelte b/frontend/src/routes/(app)/projects/projects-table.svelteindex e7131cf82..3c8ea8a28 100644--- a/frontend/src/routes/(app)/projects/projects-table.svelte+++ b/frontend/src/routes/(app)/projects/projects-table.svelte@@ -133,6 +133,7 @@const isAnyLoading = $derived(Object.values(isLoading).some((loading) => loading));const columns = [+ { accessorKey: 'id', title: m.common_id(), hidden: true },{ accessorKey: 'name', title: m.common_name(), sortable: true, cell: NameCell },{ accessorKey: 'status', title: m.common_status(), sortable: true, cell: StatusCell },{ accessorKey: 'createdAt', title: m.common_created(), sortable: true, cell: CreatedCell },@@ -140,10 +141,10 @@] satisfies ColumnSpec<Project>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },+ { id: 'id', label: m.common_id(), defaultVisible: false },{ id: 'status', label: m.common_status(), defaultVisible: true },- { id: 'createdAt', label: m.common_created(), defaultVisible: true },- { id: 'serviceCount', label: m.compose_services(), defaultVisible: true }+ { id: 'serviceCount', label: m.compose_services(), defaultVisible: true },+ { id: 'createdAt', label: m.common_created(), defaultVisible: true }];let mobileFieldVisibility = $state<Record<string, boolean>>({});diff --git a/frontend/src/routes/(app)/settings/appearance/+page.svelte b/frontend/src/routes/(app)/settings/appearance/+page.svelteindex 38a8ea8a0..4e12e1e41 100644--- a/frontend/src/routes/(app)/settings/appearance/+page.svelte+++ b/frontend/src/routes/(app)/settings/appearance/+page.svelte@@ -1,8 +1,6 @@<script lang="ts">import { z } from 'zod/v4';import { toast } from 'svelte-sonner';- import NavigationSettingControl from '$lib/components/navigation-setting-control.svelte';- import NavigationModeSettingControl from '$lib/components/navigation-mode-setting-control.svelte';import settingsStore from '$lib/stores/config-store';import { m } from '$lib/paraglide/messages';import { navigationSettingsOverridesStore, resetNavigationVisibility } from '$lib/utils/navigation.utils';@@ -14,7 +12,9 @@import { Label } from '$lib/components/ui/label';import AccentColorPicker from '$lib/components/accent-color/accent-color-picker.svelte';import { applyAccentColor } from '$lib/utils/accent-color-util';- import { ApperanceIcon } from '$lib/icons';+ import { ApperanceIcon, MonitorSpeakerIcon, DockIcon } from '$lib/icons';+ import SwitchWithLabel from '$lib/components/form/labeled-switch.svelte';+ import { ArcaneButton } from '$lib/components/arcane-button/index.js';let { data } = $props();const currentSettings = $derived($settingsStore || data.settings!);@@ -64,7 +64,46 @@navigationSettingsOverridesStore.current = newOverrides;persistedState = navigationSettingsOverridesStore.current;if (key === 'mode') resetNavigationVisibility();- toast.success(`Local override cleared for ${key.replace(/([A-Z])/g, ' $1').toLowerCase()}`);+ }++ // Navigation Mode state+ const modeIsLocal = $derived(persistedState.mode !== undefined);+ const modeDisplayValue = $derived(modeIsLocal ? persistedState.mode : $formInputs.mobileNavigationMode.value);++ function handleModeSelect(mode: 'floating' | 'docked') {+ if (modeIsLocal) {+ setLocalOverride('mode', mode);+ } else {+ $formInputs.mobileNavigationMode.value = mode;+ }+ }++ function handleModeScopeChange(isLocal: boolean) {+ if (isLocal) {+ setLocalOverride('mode', $formInputs.mobileNavigationMode.value);+ } else {+ clearLocalOverride('mode');+ }+ }++ // Show Labels state+ const labelsIsLocal = $derived(persistedState.showLabels !== undefined);+ const labelsDisplayValue = $derived(labelsIsLocal ? persistedState.showLabels : $formInputs.mobileNavigationShowLabels.value);++ function handleLabelsChange(checked: boolean) {+ if (labelsIsLocal) {+ setLocalOverride('showLabels', checked);+ } else {+ $formInputs.mobileNavigationShowLabels.value = checked;+ }+ }++ function handleLabelsScopeChange(isLocal: boolean) {+ if (isLocal) {+ setLocalOverride('showLabels', $formInputs.mobileNavigationShowLabels.value);+ } else {+ clearLocalOverride('showLabels');+ }}</script>@@ -163,7 +202,6 @@disabled={isReadOnly}onCheckedChange={(checked) => {$formInputs.sidebarHoverExpansion.value = checked;- // Update the sidebar immediately if context is availableif (sidebar) {sidebar.setHoverExpansion(checked);}@@ -185,47 +223,65 @@<h3 class="text-lg font-medium">{m.navigation_mobile_appearance_title()}</h3><div class="bg-card rounded-lg border shadow-sm"><div class="space-y-6 p-6">+ <!-- Navigation Mode --><div class="grid gap-4 md:grid-cols-[1fr_1.5fr] md:gap-8"><div><Label class="text-base">{m.navigation_mode_label()}</Label><p class="text-muted-foreground mt-1 text-sm">{m.navigation_mode_description()}</p></div>- <div>- <NavigationModeSettingControl- id="mobileNavigationMode"- description=""- serverValue={$formInputs.mobileNavigationMode.value}- localOverride={persistedState.mode}- onServerChange={(value) => {- $formInputs.mobileNavigationMode.value = value;- }}- onLocalOverride={(value) => setLocalOverride('mode', value)}- onClearOverride={() => clearLocalOverride('mode')}- serverDisabled={isReadOnly}+ <div class="space-y-3">+ <SwitchWithLabel+ id="mode-scope-toggle"+ checked={modeIsLocal}+ label={modeIsLocal ? m.this_device() : m.server_default()}+ onCheckedChange={handleModeScopeChange}+ disabled={isReadOnly && !modeIsLocal}/>++ <div class="grid grid-cols-2 gap-2">+ <ArcaneButton+ action="base"+ tone={modeDisplayValue === 'floating' ? 'outline-primary' : 'outline'}+ class="h-12 w-full"+ onclick={() => handleModeSelect('floating')}+ icon={MonitorSpeakerIcon}+ customLabel={m.navigation_mode_floating()}+ />+ <ArcaneButton+ action="base"+ tone={modeDisplayValue === 'docked' ? 'outline-primary' : 'outline'}+ class="h-12 w-full"+ onclick={() => handleModeSelect('docked')}+ icon={DockIcon}+ customLabel={m.navigation_mode_docked()}+ />+ </div></div></div><Separator />+ <!-- Show Labels --><div class="grid gap-4 md:grid-cols-[1fr_1.5fr] md:gap-8"><div><Label class="text-base">{m.navigation_show_labels_label()}</Label><p class="text-muted-foreground mt-1 text-sm">{m.navigation_show_labels_description()}</p></div>- <div>- <NavigationSettingControl- id="mobileNavigationShowLabels"- description=""- serverValue={$formInputs.mobileNavigationShowLabels.value}- localOverride={persistedState.showLabels}- onServerChange={(value) => {- $formInputs.mobileNavigationShowLabels.value = value;- }}- onLocalOverride={(value) => setLocalOverride('showLabels', value)}- onClearOverride={() => clearLocalOverride('showLabels')}- serverDisabled={isReadOnly}+ <div class="space-y-3">+ <SwitchWithLabel+ id="labels-scope-toggle"+ checked={labelsIsLocal}+ label={labelsIsLocal ? m.this_device() : m.server_default()}+ onCheckedChange={handleLabelsScopeChange}+ disabled={isReadOnly && !labelsIsLocal}/>++ <div class="flex items-center gap-3">+ <Switch id="mobileNavigationShowLabels" checked={labelsDisplayValue} onCheckedChange={handleLabelsChange} />+ <span class="text-sm font-medium">+ {labelsDisplayValue ? m.on() : m.off()}+ </span>+ </div></div></div></div>diff --git a/frontend/src/routes/(app)/volumes/+page.svelte b/frontend/src/routes/(app)/volumes/+page.svelteindex b3f2068c5..42e757ddb 100644--- a/frontend/src/routes/(app)/volumes/+page.svelte+++ b/frontend/src/routes/(app)/volumes/+page.svelte@@ -82,12 +82,6 @@icon: VolumesIcon,iconColor: 'text-blue-500'},- {- title: m.volumes_stat_used(),- value: volumeUsageCounts.inuse,- icon: VolumeUsedIcon,- iconColor: 'text-green-500'- },{title: m.volumes_stat_unused(),value: volumeUsageCounts.unused,diff --git a/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte b/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelteindex 7e79e0437..4255d330c 100644--- a/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte+++ b/frontend/src/routes/(app)/volumes/[volumeName]/+page.svelte@@ -1,7 +1,6 @@<script lang="ts">import * as Card from '$lib/components/ui/card/index.js';import { VolumesIcon, ClockIcon, TagIcon, LayersIcon, InfoIcon, GlobeIcon, ContainersIcon, BoxIcon } from '$lib/icons';- import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';import { goto } from '$app/navigation';import StatusBadge from '$lib/components/badges/status-badge.svelte';import { truncateString } from '$lib/utils/string.utils';@@ -14,6 +13,7 @@import { m } from '$lib/paraglide/messages';import { untrack } from 'svelte';import { volumeService } from '$lib/services/volume-service.js';+ import { ResourceDetailLayout, type DetailAction } from '$lib/layouts';let { data } = $props();let volume = $state(untrack(() => data.volume));@@ -48,58 +48,33 @@}});}-</script>--<div class="space-y-6 pb-8">- <div class="flex flex-col space-y-4">- <Breadcrumb.Root>- <Breadcrumb.List>- <Breadcrumb.Item>- <Breadcrumb.Link href="/volumes">{m.volumes_title()}</Breadcrumb.Link>- </Breadcrumb.Item>- <Breadcrumb.Separator />- <Breadcrumb.Item>- <Breadcrumb.Page>{volume.name}</Breadcrumb.Page>- </Breadcrumb.Item>- </Breadcrumb.List>- </Breadcrumb.Root>- <div class="flex flex-col justify-between gap-4 sm:flex-row sm:items-start">- <div class="flex flex-col">- <div class="flex items-center gap-3">- <h1 class="text-2xl font-bold tracking-tight">- {volume.name}- </h1>- </div>-- <div class="mt-2 flex gap-2">- {#if volume.inUse}- <StatusBadge variant="green" text={m.common_in_use()} />- {:else}- <StatusBadge variant="amber" text={m.common_unused()} />- {/if}-- {#if volume.driver}- <StatusBadge variant="blue" text={volume.driver} />- {/if}-- {#if volume.scope}- <StatusBadge variant="purple" text={volume.scope} />- {/if}- </div>- </div>+ const actions: DetailAction[] = $derived([+ {+ id: 'remove',+ action: 'remove',+ label: m.common_remove(),+ loading: isLoading.remove,+ disabled: isLoading.remove,+ onclick: () => handleRemoveVolumeConfirm(volume.name)+ }+ ]);+</script>- <div class="flex gap-2 self-start">- <ArcaneButton- action="remove"- customLabel={m.common_remove_title({ resource: m.resource_volume_cap() })}- onclick={() => handleRemoveVolumeConfirm(volume.name)}- loading={isLoading.remove}- disabled={isLoading.remove}- />- </div>- </div>- </div>+<ResourceDetailLayout backUrl="/volumes" backLabel={m.volumes_title()} title={volume.name} {actions}>+ {#snippet badges()}+ {#if volume.inUse}+ <StatusBadge variant="green" text={m.common_in_use()} />+ {:else}+ <StatusBadge variant="amber" text={m.common_unused()} />+ {/if}+ {#if volume.driver}+ <StatusBadge variant="blue" text={volume.driver} />+ {/if}+ {#if volume.scope}+ <StatusBadge variant="purple" text={volume.scope} />+ {/if}+ {/snippet}{#if volume}<div class="space-y-6">@@ -325,4 +300,4 @@/></div>{/if}-</div>+</ResourceDetailLayout>diff --git a/frontend/src/routes/(app)/volumes/volume-table.svelte b/frontend/src/routes/(app)/volumes/volume-table.svelteindex 2d5fe1243..34b2e17e0 100644--- a/frontend/src/routes/(app)/volumes/volume-table.svelte+++ b/frontend/src/routes/(app)/volumes/volume-table.svelte@@ -121,27 +121,16 @@}const columns = [- { accessorKey: 'name', title: m.common_name(), sortable: true, cell: NameCell },{ accessorKey: 'id', title: m.common_id(), hidden: true },- {- accessorKey: 'inUse',- title: m.common_status(),- sortable: true,- cell: StatusCell- },- {- accessorKey: 'size',- title: m.common_size(),- sortable: true,- cell: SizeCell- },+ { accessorKey: 'name', title: m.common_name(), sortable: true, cell: NameCell },+ { accessorKey: 'inUse', title: m.common_status(), sortable: true, cell: StatusCell },+ { accessorKey: 'size', title: m.common_size(), sortable: true, cell: SizeCell },{ accessorKey: 'createdAt', title: m.common_created(), sortable: true, cell: CreatedCell },{ accessorKey: 'driver', title: m.common_driver(), sortable: true }] satisfies ColumnSpec<VolumeSummaryDto>[];const mobileFields = [- { id: 'id', label: m.common_id(), defaultVisible: true },- { id: 'status', label: m.common_status(), defaultVisible: true },+ { id: 'inUse', label: m.common_status(), defaultVisible: true },{ id: 'size', label: m.common_size(), defaultVisible: true },{ id: 'createdAt', label: m.common_created(), defaultVisible: true },{ id: 'driver', label: m.common_driver(), defaultVisible: true }@@ -206,7 +195,7 @@subtitle={(item) => ((mobileFieldVisibility.id ?? true) ? item.id : null)}badges={[(item) =>- (mobileFieldVisibility.status ?? true)+ (mobileFieldVisibility.inUse ?? true)? item.inUse? { variant: 'green' as const, text: m.common_in_use() }: { variant: 'amber' as const, text: m.common_unused() }diff --git a/tests/spec/image-updates.spec.ts b/tests/spec/image-updates.spec.tsindex c43ac40d7..e963a54d2 100644--- a/tests/spec/image-updates.spec.ts+++ b/tests/spec/image-updates.spec.ts@@ -62,34 +62,42 @@ test.describe('Image Update UI - Check All Updates Button', () => {test('should display the Check Updates button on images page', async ({ page }) => {await navigateToImages(page);- // Look for the Check Updates button in the action bar- const checkUpdatesButton = page.getByRole('button', { name: /check.*update/i });+ // Find the Check Updates button - it might be directly visible or in a menu+ let checkUpdatesButton = page.getByRole('button', { name: 'Check Updates' });+ const isDirectlyVisible = await checkUpdatesButton.isVisible().catch(() => false);++ if (!isDirectlyVisible) {+ // Try to find and click the overflow menu trigger+ const menuTrigger = page.getByRole('button', { name: 'More actions' });+ await menuTrigger.click();+ checkUpdatesButton = page.getByRole('menuitem', { name: 'Check Updates' });+ }+await expect(checkUpdatesButton).toBeVisible();});test('should trigger bulk update check when clicking Check Updates button', async ({ page }) => {await navigateToImages(page);- // Find and click the Check Updates button- const checkUpdatesButton = page.getByRole('button', { name: /check.*update/i });- await expect(checkUpdatesButton).toBeVisible();+ // Find the Check Updates button - it might be directly visible or in a menu+ let checkUpdatesButton = page.getByRole('button', { name: 'Check Updates' });+ const isDirectlyVisible = await checkUpdatesButton.isVisible().catch(() => false);- // Click the button- await checkUpdatesButton.click();+ if (!isDirectlyVisible) {+ // Try to find and click the overflow menu trigger+ const menuTrigger = page.getByRole('button', { name: 'More actions' });+ await menuTrigger.click();+ checkUpdatesButton = page.getByRole('menuitem', { name: 'Check Updates' });+ }- // Wait for the loading state or completion toast- // The button should show a loading state or we should see a toast notification- await expect(async () => {- // Either button shows loading state- const buttonText = await checkUpdatesButton.textContent();- const isLoading = buttonText?.toLowerCase().includes('checking');+ await expect(checkUpdatesButton).toBeVisible();- // Or a toast appears- const toast = page.locator('li[data-sonner-toast]');- const toastVisible = await toast.isVisible().catch(() => false);+ await checkUpdatesButton.click();- expect(isLoading || toastVisible).toBeTruthy();- }).toPass({ timeout: 30000 });+ if (isDirectlyVisible) {+ // If it's a direct button, it should show a loading state+ await expect(checkUpdatesButton).toContainText(/checking/i, { timeout: 10000 });+ }// Eventually a success or completion toast should appearawait expect(page.locator('li[data-sonner-toast]')).toBeVisible({ timeout: 60000 });diff --git a/tests/spec/images.spec.ts b/tests/spec/images.spec.tsindex bc16efeea..491221d3d 100644--- a/tests/spec/images.spec.ts+++ b/tests/spec/images.spec.ts@@ -51,13 +51,22 @@ test.describe('Images Page', () => {test('should open the Pull Image dialog', async ({ page }) => {await navigateToImages(page);- await page.locator('button:has-text("Pull Image")').first().click();+ await page.getByRole('button', { name: 'Pull Image' }).click();await expect(page.locator('div[role="heading"][aria-level="2"][data-dialog-title]:has-text("Pull Image")')).toBeVisible();});test('should open the Prune Unused Images dialog', async ({ page }) => {await navigateToImages(page);- await page.locator('button:has-text("Prune Unused")').click();++ let pruneButton = page.getByRole('button', { name: 'Prune Unused' });+ const isDirectlyVisible = await pruneButton.isVisible().catch(() => false);++ if (!isDirectlyVisible) {+ await page.getByRole('button', { name: 'More actions' }).click();+ pruneButton = page.getByRole('menuitem', { name: 'Prune Unused' });+ }++ await pruneButton.click();await expect(page.locator('div[role="heading"][aria-level="2"][data-dialog-title]:has-text("Prune Unused Images")'),).toBeVisible();@@ -76,7 +85,7 @@ test.describe('Images Page', () => {await navigateToImages(page);const firstRow = await page.getByRole('row', { name: 'ghcr.io/linuxserver/nginx' });- await firstRow.getByRole('button', { name: 'Open menu' }).click();+ await firstRow.getByLabel('Open menu').click();await page.getByRole('menuitem', { name: 'Pull' }).click();await page.waitForLoadState('networkidle');@@ -105,7 +114,15 @@ test.describe('Images Page', () => {test('should call prune API on prune click and confirmation', async ({ page }) => {await navigateToImages(page);- await page.locator('button:has-text("Prune Unused")').click();+ let pruneButton = page.getByRole('button', { name: 'Prune Unused' });+ const isDirectlyVisible = await pruneButton.isVisible().catch(() => false);++ if (!isDirectlyVisible) {+ await page.getByRole('button', { name: 'More actions' }).click();+ pruneButton = page.getByRole('menuitem', { name: 'Prune Unused' });+ }++ await pruneButton.click();await expect(page.locator('div[role="heading"][aria-level="2"][data-dialog-title]:has-text("Prune Unused Images")'),@@ -121,7 +138,7 @@ test.describe('Images Page', () => {test('should pull image via form', async ({ page }) => {await navigateToImages(page);- await page.locator('button:has-text("Pull Image")').first().click();+ await page.getByRole('button', { name: 'Pull Image' }).click();const dialogHeading = page.getByRole('heading', { name: 'Pull Image' });await expect(dialogHeading).toBeVisible();diff --git a/tests/spec/network.spec.ts b/tests/spec/network.spec.tsindex 0ee514fd5..0f4dc0a0f 100644--- a/tests/spec/network.spec.ts+++ b/tests/spec/network.spec.ts@@ -45,7 +45,7 @@ test.describe('Networks Page', () => {test('Open Create Network sheet', async ({ page }) => {await navigateToNetworks(page);- await page.locator('button:has-text("Create Network")').first().click();+ await page.getByRole('button', { name: 'Create Network' }).first().click();await expect(page.getByRole('dialog')).toBeVisible();await expect(page.getByRole('heading', { name: 'Create New Network' })).toBeVisible();@@ -57,7 +57,7 @@ test.describe('Networks Page', () => {await page.locator('input[id^="network-name-"]').first().fill(networkName);}- await page.getByRole('dialog').locator('button:has-text("Create Network")').click();+ await page.getByRole('dialog').getByRole('button', { name: 'Create Network' }).click();await expect(page.locator('li[data-sonner-toast][data-type="success"] div[data-title]')).toBeVisible();});@@ -75,14 +75,14 @@ test.describe('Networks Page', () => {await navigateToNetworks(page);// 1. Create the network first- await page.locator('button:has-text("Create Network")').first().click();+ await page.getByRole('button', { name: 'Create Network' }).first().click();const nameInput = page.getByLabel('Name').first();if (await nameInput.isVisible().catch(() => false)) {await nameInput.fill(networkName);} else {- await page.locator('input[id^="network-name-"]').first().fill(networkName);+ await page.getByRole('textbox', { name: 'Network Name *' }).fill(networkName);}- await page.getByRole('dialog').locator('button:has-text("Create Network")').click();+ await page.getByLabel('Create New Network').getByRole('button', { name: 'Create Network' }).click();await expect(page.locator('li[data-sonner-toast][data-type="success"] div[data-title]')).toBeVisible();// 2. Find and remove it@@ -103,7 +103,7 @@ test.describe('Networks Page', () => {await page.goto(`/networks/${bridge.id}`);await page.waitForLoadState('networkidle');- const removeBtn = page.getByRole('button', { name: 'Remove Network' });+ const removeBtn = page.getByRole('button', { name: 'Remove' });await expect(removeBtn).toBeDisabled();});diff --git a/tests/spec/volumes.spec.ts b/tests/spec/volumes.spec.tsindex c9cec58a2..86ed00c82 100644--- a/tests/spec/volumes.spec.ts+++ b/tests/spec/volumes.spec.ts@@ -50,7 +50,7 @@ test.describe('Volumes Page', () => {await page.goto('/volumes');await page.waitForLoadState('networkidle');- await page.locator('button:has-text("Create Volume")').first().click();+ await page.getByRole('button', { name: 'Create Volume' }).first().click();await expect(page.getByRole('dialog')).toBeVisible();await expect(page.getByText('Create New Volume')).toBeVisible();});@@ -83,9 +83,9 @@ test.describe('Volumes Page', () => {await page.waitForLoadState('networkidle');// 1. Create the volume first- await page.locator('button:has-text("Create Volume")').first().click();+ await page.getByRole('button', { name: 'Create Volume' }).first().click();await page.locator('input[id="volume-name-*"]').fill(volumeName);- await page.getByRole('dialog').locator('button:has-text("Create Volume")').click();+ await page.getByRole('dialog').getByRole('button', { name: 'Create Volume' }).click();await expect(page.locator('li[data-sonner-toast][data-type="success"] div[data-title]')).toBeVisible();// 2. Find and remove it@@ -108,16 +108,16 @@ test.describe('Volumes Page', () => {await page.goto('/volumes');await page.waitForLoadState('networkidle');- await page.locator('button:has-text("Create Volume")').first().click();+ await page.getByRole('button', { name: 'Create Volume' }).first().click();await expect(page.getByRole('dialog')).toBeVisible();const volumeName = `test-volume-${Date.now()}`;await page.locator('input[id="volume-name-*"]').fill(volumeName);- await page.getByRole('dialog').locator('button:has-text("Create Volume")').click();+ await page.getByRole('dialog').getByRole('button', { name: 'Create Volume' }).click();await expect(- page.locator(`li[data-sonner-toast][data-type="success"] div[data-title]:has-text("created successfully")`)+ page.locator(`li[data-sonner-toast][data-type="success"] div[data-title]:has-text("created successfully")`),).toBeVisible();});