Skip to content

Modern Docker Management, Designed for Everyone

refactor: tweak the styling of resource detail pages (#595)

Chase Baucom735c5530c3cd
diff --git a/frontend/messages/en.json b/frontend/messages/en.json
index 815ba21b2..a45c3b894 100644
--- a/frontend/messages/en.json
+++ b/frontend/messages/en.json
@@ -264,6 +264,9 @@
"images_pruning": "Pruning…",
"images_checking": "Checking…",
"images_details_title": "Image Details",
+ "images_details_description": "Essential information about this image",
+ "images_tags_description": "Repository tags associated with this image",
+ "images_env_vars_description": "Environment variables defined in this image",
"images_tags_title": "Tags",
"images_env_vars_title": "Environment Variables",
"images_architecture": "Architecture",
@@ -472,7 +475,7 @@
"containers_nav_networks": "Networks",
"containers_nav_storage": "Storage",
"containers_details_title": "Container Details",
- "containers_details_description": "Identity, runtime, and system metadata",
+ "containers_details_description": "Essential information about this container instance",
"containers_ip_address": "IP Address",
"containers_command": "Command",
"containers_system": "System",
@@ -480,6 +483,7 @@
"containers_health_label": "Health",
"containers_health_last_check": "Last check: {time}",
"containers_resource_metrics": "Resource Metrics",
+ "containers_resource_metrics_description": "Real-time performance metrics and resource utilization",
"containers_network_io": "Network I/O",
"containers_network_received": "Received",
"containers_network_transmitted": "Transmitted",
@@ -490,17 +494,23 @@
"containers_stats_unavailable": "Container is not running. Stats unavailable.",
"containers_stats_loading": "Loading stats...",
"containers_logs_title": "Container Logs",
+ "containers_logs_description": "Real-time container logs",
"containers_configuration_title": "Configuration",
"containers_env_ports_labels_title": "Environment, Ports & Labels",
"containers_env_ports_labels_description": "Runtime configuration and metadata for this container",
"containers_env_vars_title": "Environment Variables",
+ "containers_env_vars_description": "Runtime environment variables for your container",
"containers_no_env_vars": "No environment variables",
"containers_port_mappings": "Port Mappings",
+ "containers_port_mappings_description": "Network ports exposed by this container for external access",
"containers_not_published": "Not published",
+ "common_labels_description": "Metadata labels attached to this container for organization and automation",
"containers_no_labels_defined": "No labels defined",
"containers_networks_title": "Networks",
+ "containers_networks_description": "Network interfaces and connectivity configuration for this container",
"containers_no_networks_connected": "No networks connected",
"containers_storage_title": "Storage & Mounts",
+ "containers_storage_description": "Volume mounts and storage configuration for persistent data",
"containers_mount_type_tmpfs": "Temporary filesystem",
"containers_mount_type_volume": "Docker volume",
"containers_mount_type_bind": "Host directory",
@@ -516,6 +526,8 @@
"containers_subnet": "Subnet",
"containers_aliases": "Aliases",
"compose_services": "Services",
+ "compose_services_description": "Docker Compose services and their current status",
+ "compose_active_container": "Active container",
"compose_start_failed": "Failed to start project",
"compose_start_success": "Project started successfully.",
"compose_stop_failed": "Failed to stop project",
@@ -612,6 +624,9 @@
"auth_or_continue": "Or continue with",
"auth_tagline": "Modern Docker Management, Designed for Everyone.",
"common_password": "Password",
+ "common_author": "Author",
+ "common_working_dir": "Working Dir",
+ "common_docker_version": "Docker Version",
"common_view_on_github": "View on GitHub",
"auth_login_failed": "Login failed",
"auth_processing_login": "Processing Login...",
@@ -1093,5 +1108,6 @@
"on": "On",
"off": "Off",
"tap_to_edit": "Tap to edit",
- "cannot_edit": "Cannot edit"
+ "cannot_edit": "Cannot edit",
+ "network_interface": "Network interface"
}
diff --git a/frontend/src/lib/components/badges/index.ts b/frontend/src/lib/components/badges/index.ts
new file mode 100644
index 000000000..728d206fe
--- /dev/null
+++ b/frontend/src/lib/components/badges/index.ts
@@ -0,0 +1,3 @@
+export { default as StatusBadge } from './status-badge.svelte';
+export { default as PortBadge } from './port-badge.svelte';
+export { default as UiConfigDisabledTag } from './ui-config-disabled-tag.svelte';
\ No newline at end of file
diff --git a/frontend/src/lib/components/port-badges.svelte b/frontend/src/lib/components/badges/port-badge.svelte
similarity index 94%
rename from frontend/src/lib/components/port-badges.svelte
rename to frontend/src/lib/components/badges/port-badge.svelte
index cf880ba23..f7c11fbe6 100644
--- a/frontend/src/lib/components/port-badges.svelte
+++ b/frontend/src/lib/components/badges/port-badge.svelte
@@ -72,7 +72,7 @@
<div class="flex flex-wrap gap-1.5">
{#each published as p, i (i)}
<a
- class="ring-offset-background focus-visible:ring-ring bg-background/70 inline-flex items-center gap-1 rounded-lg border border-sky-700/20 px-2 py-1 text-[11px] shadow-sm transition-colors transition-shadow hover:border-sky-700/40 hover:bg-sky-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2"
+ class="ring-offset-background focus-visible:ring-ring bg-background/70 inline-flex items-center gap-1 rounded-lg border border-sky-700/20 px-2 py-1 text-[11px] shadow-sm transition-colors hover:border-sky-700/40 hover:bg-sky-500/10 hover:shadow-md focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none"
href={toHref(p.hostPort)}
target="_blank"
rel="noopener noreferrer"
diff --git a/frontend/src/lib/components/ui-config-disabled-tag.svelte b/frontend/src/lib/components/badges/ui-config-disabled-tag.svelte
similarity index 100%
rename from frontend/src/lib/components/ui-config-disabled-tag.svelte
rename to frontend/src/lib/components/badges/ui-config-disabled-tag.svelte
diff --git a/frontend/src/lib/components/code-editor/editor.svelte b/frontend/src/lib/components/code-editor/editor.svelte
index 805150f44..bedc34218 100644
--- a/frontend/src/lib/components/code-editor/editor.svelte
+++ b/frontend/src/lib/components/code-editor/editor.svelte
@@ -25,7 +25,7 @@
const dynamicHeight = $derived(() => {
if (height === 'full' || height === 'auto') {
- return 'calc(100dvh - 240px)';
+ return 'calc(100dvh - 300px)';
}
return height;
});
diff --git a/frontend/src/lib/components/log-viewer.svelte b/frontend/src/lib/components/log-viewer.svelte
index 586f545a4..af1a68dd7 100644
--- a/frontend/src/lib/components/log-viewer.svelte
+++ b/frontend/src/lib/components/log-viewer.svelte
@@ -4,6 +4,7 @@
import { environmentStore } from '$lib/stores/environment.store';
import { m } from '$lib/paraglide/messages';
import { ReconnectingWebSocket } from '$lib/utils/ws';
+ import { cn } from '$lib/utils';
interface LogEntry {
id: number;
@@ -15,6 +16,7 @@
}
interface Props {
+ class?: string;
containerId?: string | null;
projectId?: string | null;
type?: 'container' | 'project';
@@ -29,6 +31,7 @@
}
let {
+ class: className,
containerId = null,
projectId = null,
type = 'container',
@@ -289,7 +292,7 @@
});
</script>
-<div class="log-viewer rounded-md border bg-black text-white">
+<div class={cn('log-viewer rounded-t-none rounded-b-xl border bg-black text-white', className)}>
{#if error}
<div class="border-b border-red-700 bg-red-900/20 p-3 text-sm text-red-200">
{error}
@@ -298,7 +301,7 @@
<div
bind:this={logContainer}
- class="log-viewer overflow-y-auto rounded-lg border bg-black font-mono text-xs text-white sm:text-sm"
+ class="log-viewer overflow-y-auto rounded-t-none rounded-b-xl border bg-black font-mono text-xs text-white sm:text-sm"
style="height: {height}; min-height: 300px;"
role="log"
aria-live={isStreaming ? 'polite' : 'off'}
diff --git a/frontend/src/lib/components/quick-actions.svelte b/frontend/src/lib/components/quick-actions.svelte
index c5b58c01a..cb4d0b2ac 100644
--- a/frontend/src/lib/components/quick-actions.svelte
+++ b/frontend/src/lib/components/quick-actions.svelte
@@ -56,7 +56,7 @@
{:else}
<div class="hidden flex-wrap items-center gap-2 sm:flex">
<button
- class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-emerald-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors transition-shadow hover:border-emerald-500/40 hover:bg-emerald-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
+ class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-emerald-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors hover:border-emerald-500/40 hover:bg-emerald-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
disabled={!dockerInfo || stoppedContainers === 0 || isLoading.starting || isLoading.stopping || isLoading.pruning}
onclick={onStartAll}
aria-busy={isLoading.starting}
@@ -73,7 +73,7 @@
</button>
<button
- class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-sky-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors transition-shadow hover:border-sky-500/40 hover:bg-sky-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
+ class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-sky-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors hover:border-sky-500/40 hover:bg-sky-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
disabled={!dockerInfo ||
(dockerInfo?.containersRunning ?? 0) === 0 ||
isLoading.starting ||
@@ -94,7 +94,7 @@
</button>
<button
- class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-red-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors transition-shadow hover:border-red-500/40 hover:bg-red-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
+ class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-red-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors hover:border-red-500/40 hover:bg-red-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
disabled={!dockerInfo || isLoading.starting || isLoading.stopping || isLoading.pruning}
onclick={onOpenPruneDialog}
aria-busy={isLoading.pruning}
@@ -108,7 +108,7 @@
</button>
<button
- class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-violet-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors transition-shadow hover:border-violet-500/40 hover:bg-violet-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
+ class="ring-offset-background focus-visible:ring-ring bg-background/70 group inline-flex h-9 items-center gap-2 rounded-lg border border-violet-500/20 px-3 py-1.5 text-xs shadow-sm transition-colors hover:border-violet-500/40 hover:bg-violet-500/10 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60"
disabled={isLoading.starting || isLoading.stopping || isLoading.pruning || refreshing}
onclick={onRefresh}
aria-busy={refreshing}
@@ -124,7 +124,7 @@
<DropdownMenu.Root>
<DropdownMenu.Trigger
- class="bg-background/70 flex inline-flex size-9 items-center justify-center rounded-lg border sm:hidden"
+ class="bg-background/70 inline-flex size-9 items-center justify-center rounded-lg border sm:hidden"
>
<span class="sr-only">{m.common_open_menu()}</span>
<EllipsisIcon />
diff --git a/frontend/src/lib/layouts/settings-page-layout.svelte b/frontend/src/lib/layouts/settings-page-layout.svelte
index d93956a75..12326e3b5 100644
--- a/frontend/src/lib/layouts/settings-page-layout.svelte
+++ b/frontend/src/lib/layouts/settings-page-layout.svelte
@@ -1,7 +1,7 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import type { Icon as IconType } from '@lucide/svelte';
- import UiConfigDisabledTag from '$lib/components/ui-config-disabled-tag.svelte';
+ import { UiConfigDisabledTag } from '$lib/components/badges/index.js';
import StatCard from '$lib/components/stat-card.svelte';
import { ArcaneButton } from '$lib/components/arcane-button/index.js';
import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js';
diff --git a/frontend/src/lib/layouts/tabbed-page-layout.svelte b/frontend/src/lib/layouts/tabbed-page-layout.svelte
index 480c2686f..c34a91085 100644
--- a/frontend/src/lib/layouts/tabbed-page-layout.svelte
+++ b/frontend/src/lib/layouts/tabbed-page-layout.svelte
@@ -49,7 +49,7 @@
<div class={cn('bg-background min-h-screen', className)}>
<Tabs.Root value={selectedTab} class="flex min-h-0 w-full flex-1 flex-col">
<div
- class="bg-background/95 sticky top-0 z-20 border-b backdrop-blur transition-all duration-300"
+ class="bg-background/95 sticky top-0 border-b backdrop-blur transition-all duration-300"
style="opacity: {showFloatingHeader ? 0 : 1}; pointer-events: {showFloatingHeader ? 'none' : 'auto'};"
>
<div class="max-w-full px-4 py-3">
diff --git a/frontend/src/routes/containers/[containerId]/+page.svelte b/frontend/src/routes/containers/[containerId]/+page.svelte
index 8c53fd73b..f56dfdca9 100644
--- a/frontend/src/routes/containers/[containerId]/+page.svelte
+++ b/frontend/src/routes/containers/[containerId]/+page.svelte
@@ -266,14 +266,11 @@
{#snippet tabContent(activeTab)}
<Tabs.Content value="overview" class="h-full">
- <div class="space-y-8">
<ContainerOverview {container} {primaryIpAddress} />
- </div>
</Tabs.Content>
{#if showStats}
<Tabs.Content value="stats" class="h-full">
- <div class="space-y-8">
<ContainerStats
{container}
{stats}
@@ -284,12 +281,10 @@
{memoryLimitFormatted}
{memoryUsagePercent}
/>
- </div>
</Tabs.Content>
{/if}
<Tabs.Content value="logs" class="h-full">
- <div class="h-full">
<ContainerLogsPanel
containerId={container?.id}
bind:autoScroll={autoScrollLogs}
@@ -298,30 +293,23 @@
onClear={handleLogClear}
onToggleAutoScroll={handleToggleAutoScroll}
/>
- </div>
</Tabs.Content>
{#if showConfiguration}
<Tabs.Content value="config" class="h-full">
- <div class="space-y-8">
<ContainerConfiguration {container} {hasEnvVars} {hasPorts} {hasLabels} {baseServerUrl} />
- </div>
</Tabs.Content>
{/if}
{#if hasNetworks}
<Tabs.Content value="network" class="h-full">
- <div class="space-y-8">
<ContainerNetwork {container} />
- </div>
</Tabs.Content>
{/if}
{#if hasMounts}
<Tabs.Content value="storage" class="h-full">
- <div class="space-y-8">
<ContainerStorage {container} />
- </div>
</Tabs.Content>
{/if}
{/snippet}
diff --git a/frontend/src/routes/containers/components/ContainerConfiguration.svelte b/frontend/src/routes/containers/components/ContainerConfiguration.svelte
index 339ef17e1..b3b804274 100644
--- a/frontend/src/routes/containers/components/ContainerConfiguration.svelte
+++ b/frontend/src/routes/containers/components/ContainerConfiguration.svelte
@@ -1,9 +1,9 @@
<script lang="ts">
import * as Card from '$lib/components/ui/card/index.js';
- import { Badge } from '$lib/components/ui/badge/index.js';
import SettingsIcon from '@lucide/svelte/icons/settings';
- import Separator from '$lib/components/ui/separator/separator.svelte';
- import PortBadges from '$lib/components/port-badges.svelte';
+ import NetworkIcon from '@lucide/svelte/icons/network';
+ import TagIcon from '@lucide/svelte/icons/tag';
+ import { PortBadge } from '$lib/components/badges/index.js';
import { m } from '$lib/paraglide/messages';
import type { ContainerDetailsDto } from '$lib/types/container.type';
@@ -18,94 +18,96 @@
let { container, hasEnvVars, hasPorts, hasLabels, baseServerUrl }: Props = $props();
</script>
-<section class="scroll-mt-20">
- <h2 class="mb-6 flex items-center gap-2 text-xl font-semibold">
- <SettingsIcon class="size-5" />
- {m.containers_configuration_title()}
- </h2>
-
- <Card.Root class="rounded-lg border shadow-sm">
- <Card.Header class="pb-4">
- <Card.Title>{m.containers_env_ports_labels_title()}</Card.Title>
- <Card.Description class="text-muted-foreground text-sm">
- {m.containers_env_ports_labels_description()}
- </Card.Description>
- </Card.Header>
-
- <Card.Content class="space-y-8">
- {#if hasEnvVars}
- <div>
- <h3 class="mb-3 text-sm font-semibold tracking-tight">{m.containers_env_vars_title()}</h3>
-
- {#if container.config?.env && container.config.env.length > 0}
- <ul class="divide-border/60 divide-y">
- {#each container.config.env as env, index (index)}
- {#if env.includes('=')}
- {@const [key, ...valueParts] = env.split('=')}
- {@const value = valueParts.join('=')}
- <li class="px-4 py-2.5">
- <div class="flex min-w-0 items-center gap-3">
- <Badge variant="secondary">
- {key}:
- </Badge>
- <span class="truncate font-semibold" title={value}>{value}</span>
- </div>
- </li>
- {:else}
- <li class="px-4 py-2.5">
- <div class="flex min-w-0 items-center gap-3">
- <Badge variant="secondary">ENV:</Badge>
- <span class="truncate font-semibold" title={env}>{env}</span>
- </div>
- </li>
- {/if}
- {/each}
- </ul>
- {:else}
- <div class="text-muted-foreground py-8 text-center">{m.containers_no_env_vars()}</div>
- {/if}
- </div>
- {/if}
-
- {#if hasEnvVars && (hasPorts || hasLabels)}
- <Separator />
- {/if}
-
- {#if hasPorts}
- <div>
- <h3 class="mb-3 text-sm font-semibold tracking-tight">{m.containers_port_mappings()}</h3>
- <PortBadges ports={container.ports ?? []} {baseServerUrl} />
- </div>
- {/if}
-
- {#if hasPorts && hasLabels}
- <Separator />
- {/if}
+<div class="space-y-6">
+ {#if hasEnvVars}
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <SettingsIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_env_vars_title()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_env_vars_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ {#if container.config?.env && container.config.env.length > 0}
+ <div class="space-y-3">
+ {#each container.config.env as env, index (index)}
+ {#if env.includes('=')}
+ {@const [key, ...valueParts] = env.split('=')}
+ {@const value = valueParts.join('=')}
+ <div class="border-border flex items-start justify-between border-b py-2 last:border-b-0">
+ <div class="text-muted-foreground text-sm font-medium break-all">{key}</div>
+ <div class="text-foreground ml-4 cursor-pointer font-mono text-sm break-all select-all" title="Click to select">
+ {value}
+ </div>
+ </div>
+ {:else}
+ <div class="border-border flex items-start justify-between border-b py-2 last:border-b-0">
+ <div class="text-muted-foreground text-sm font-medium">ENV_VAR</div>
+ <div class="text-foreground ml-4 cursor-pointer font-mono text-sm break-all select-all" title="Click to select">
+ {env}
+ </div>
+ </div>
+ {/if}
+ {/each}
+ </div>
+ {:else}
+ <div class="text-muted-foreground rounded-lg border border-dashed py-8 text-center">
+ <div class="text-sm">{m.containers_no_env_vars()}</div>
+ </div>
+ {/if}
+ </Card.Content>
+ </Card.Root>
+ {/if}
- {#if hasLabels}
- <div>
- <h3 class="mb-3 text-sm font-semibold tracking-tight">{m.common_labels()}</h3>
+ {#if hasPorts}
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <NetworkIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_port_mappings()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_port_mappings_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ <PortBadge ports={container.ports ?? []} {baseServerUrl} />
+ </Card.Content>
+ </Card.Root>
+ {/if}
- {#if container.labels && Object.keys(container.labels).length > 0}
- <ul class="divide-border/60 divide-y">
- {#each Object.entries(container.labels) as [key, value] (key)}
- <li class="px-4 py-2.5">
- <div class="flex min-w-0 items-center gap-3">
- <Badge variant="secondary">
- {key}:
- </Badge>
- <span class="truncate font-semibold" title={value?.toString()}>
- {value?.toString() || ''}
- </span>
- </div>
- </li>
- {/each}
- </ul>
- {:else}
- <div class="text-muted-foreground py-8 text-center">{m.containers_no_labels_defined()}</div>
- {/if}
- </div>
- {/if}
- </Card.Content>
- </Card.Root>
-</section>
+ {#if hasLabels}
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <TagIcon class="text-primary size-5" />
+ <h2>
+ {m.common_labels()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.common_labels_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ {#if container.labels && Object.keys(container.labels).length > 0}
+ <div class="space-y-3">
+ {#each Object.entries(container.labels) as [key, value] (key)}
+ <div class="border-border flex items-start justify-between border-b py-2 last:border-b-0">
+ <div class="text-muted-foreground text-sm font-medium break-all">{key}</div>
+ <div class="text-foreground ml-4 cursor-pointer font-mono text-sm break-all select-all" title="Click to select">
+ {value?.toString() || ''}
+ </div>
+ </div>
+ {/each}
+ </div>
+ {:else}
+ <div class="text-muted-foreground rounded-lg border border-dashed py-8 text-center">
+ <div class="text-sm">{m.containers_no_labels_defined()}</div>
+ </div>
+ {/if}
+ </Card.Content>
+ </Card.Root>
+ {/if}
+</div>
diff --git a/frontend/src/routes/containers/components/ContainerLogsPanel.svelte b/frontend/src/routes/containers/components/ContainerLogsPanel.svelte
index 79f55c8c1..0befa5683 100644
--- a/frontend/src/routes/containers/components/ContainerLogsPanel.svelte
+++ b/frontend/src/routes/containers/components/ContainerLogsPanel.svelte
@@ -44,94 +44,63 @@
}
</script>
-<div class="mb-3 flex flex-col gap-3 sm:hidden">
- <div class="flex items-center justify-between">
- <div class="flex items-center gap-2">
- <FileTextIcon class="size-5" />
- <h2 class="text-lg font-semibold">{m.containers_logs_title()}</h2>
- </div>
- {#if isStreaming}
+<Card.Root class="gap-0 p-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div class="flex items-center gap-2">
- <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
- <span class="text-sm font-medium text-green-600">{m.common_live()}</span>
+ <FileTextIcon class="text-primary size-5" />
+ <Card.Title class="text-lg">
+ <h2>
+ {m.containers_logs_title()}
+ </h2>
+ </Card.Title>
+ {#if isStreaming}
+ <div class="flex items-center gap-2">
+ <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
+ <span class="text-xs font-semibold text-green-600 sm:text-sm">{m.common_live()}</span>
+ </div>
+ {/if}
</div>
- {/if}
- </div>
-
- <div class="flex items-center justify-between gap-3">
- <label class="flex items-center gap-2">
- <input type="checkbox" bind:checked={autoScroll} class="size-4" />
- {m.common_autoscroll()}
- </label>
- <div class="flex items-center gap-2">
- <Button variant="outline" size="sm" onclick={() => viewer?.clearLogs()}>{m.common_clear()}</Button>
- {#if isStreaming}
- <Button variant="outline" size="sm" onclick={() => viewer?.stopLogStream()}>
- {m.common_stop()}
- </Button>
- {:else}
- <Button variant="outline" size="sm" onclick={() => viewer?.startLogStream()} disabled={!containerId}>
- {m.common_start()}
- </Button>
- {/if}
- <Button
- variant="outline"
- size="sm"
- onclick={() => {
- viewer?.stopLogStream();
- viewer?.startLogStream();
- }}
- aria-label="Refresh logs"
- title="Refresh"
- >
- <RefreshCwIcon class="size-4" />
- </Button>
- </div>
- </div>
-</div>
-
-<div class="mb-3 hidden items-center justify-between sm:flex">
- <div class="flex items-center gap-3">
- <FileTextIcon class="size-5" />
- <h2 class="text-xl font-semibold">{m.containers_logs_title()}</h2>
- {#if isStreaming}
- <div class="flex items-center gap-2">
- <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
- <span class="text-sm font-medium text-green-600">{m.common_live()}</span>
+
+ <div class="flex flex-col gap-3 sm:flex-row sm:items-center">
+ <label class="flex items-center gap-2">
+ <input type="checkbox" bind:checked={autoScroll} class="size-4" />
+ <span class="text-sm font-medium">{m.common_autoscroll()}</span>
+ </label>
+
+ <div class="flex items-center gap-2">
+ <Button variant="outline" size="sm" class="text-xs font-medium" onclick={() => viewer?.clearLogs()}>
+ {m.common_clear()}
+ </Button>
+ {#if isStreaming}
+ <Button variant="outline" size="sm" class="text-xs font-medium" onclick={() => viewer?.stopLogStream()}>
+ {m.common_stop()}
+ </Button>
+ {:else}
+ <Button variant="outline" size="sm" class="text-xs font-medium" onclick={() => viewer?.startLogStream()} disabled={!containerId}>
+ {m.common_start()}
+ </Button>
+ {/if}
+ <Button
+ variant="outline"
+ size="sm"
+ class="px-2"
+ onclick={() => {
+ viewer?.stopLogStream();
+ viewer?.startLogStream();
+ }}
+ aria-label="Refresh logs"
+ title="Refresh"
+ >
+ <RefreshCwIcon class="size-4" />
+ </Button>
+ </div>
</div>
- {/if}
- </div>
- <div class="flex items-center gap-3">
- <label class="flex items-center gap-2">
- <input type="checkbox" bind:checked={autoScroll} class="size-4" />
- {m.common_autoscroll()}
- </label>
- <Button variant="outline" size="sm" onclick={() => viewer?.clearLogs()}>{m.common_clear()}</Button>
- {#if isStreaming}
- <Button variant="outline" size="sm" onclick={() => viewer?.stopLogStream()}>{m.common_stop()}</Button>
- {:else}
- <Button variant="outline" size="sm" onclick={() => viewer?.startLogStream()} disabled={!containerId}>
- {m.common_start()}
- </Button>
- {/if}
- <Button
- variant="outline"
- size="sm"
- onclick={() => {
- viewer?.stopLogStream();
- viewer?.startLogStream();
- }}
- aria-label="Refresh logs"
- title="Refresh"
- >
- <RefreshCwIcon class="size-4" />
- </Button>
- </div>
-</div>
-
-<Card.Root class="overflow-hidden border">
+ </div>
+ <Card.Description>{m.containers_logs_description()}</Card.Description>
+ </Card.Header>
<Card.Content class="p-0">
- <div class="w-full overflow-hidden">
+ <div class="rounded-lg border bg-card/50 p-0">
<LogViewer
bind:this={viewer}
bind:autoScroll
@@ -139,7 +108,7 @@
{containerId}
maxLines={500}
showTimestamps={true}
- height="calc(100vh - 280px)"
+ height="calc(100vh - 320px)"
onStart={handleStart}
onStop={handleStop}
onClear={handleClear}
diff --git a/frontend/src/routes/containers/components/ContainerNetwork.svelte b/frontend/src/routes/containers/components/ContainerNetwork.svelte
index 6d5509a29..2a83fccfd 100644
--- a/frontend/src/routes/containers/components/ContainerNetwork.svelte
+++ b/frontend/src/routes/containers/components/ContainerNetwork.svelte
@@ -25,16 +25,20 @@
}
</script>
-<section class="scroll-mt-20">
- <h2 class="mb-6 flex items-center gap-2 text-xl font-semibold">
- <NetworkIcon class="size-5" />
- {m.containers_networks_title()}
- </h2>
-
- <Card.Root class="rounded-lg border shadow-sm">
- <Card.Content class="p-6">
+<div class="space-y-6">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <NetworkIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_networks_title()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_networks_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
{#if container.networkSettings?.networks && Object.keys(container.networkSettings.networks).length > 0}
- <div class="space-y-6">
+ <div class="grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3">
{#each Object.entries(container.networkSettings.networks) as [networkName, rawNetworkConfig] (networkName)}
{@const networkConfig = ensureNetworkConfig({
IPAddress: rawNetworkConfig.ipAddress,
@@ -43,42 +47,85 @@
MacAddress: rawNetworkConfig.macAddress,
Aliases: rawNetworkConfig.aliases
})}
- <div class="rounded border p-4">
- <div class="mb-4 font-medium">{networkName}</div>
- <div class="grid grid-cols-2 gap-4 lg:grid-cols-4">
- <div>
- <div class="text-muted-foreground text-sm">{m.containers_ip_address()}</div>
- <div class="font-mono">{rawNetworkConfig.ipAddress || m.common_na()}</div>
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted/30 rounded-t-xl p-4">
+ <div class="flex items-center gap-3">
+ <div class="rounded-lg bg-blue-500/10 p-2.5">
+ <NetworkIcon class="size-5 text-blue-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <Card.Title class="text-base break-all">
+ {networkName}
+ </Card.Title>
+ <Card.Description class="text-xs">{m.network_interface()}</Card.Description>
+ </div>
+ </div>
+ </Card.Header>
+ <Card.Content class="space-y-4 pt-0">
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">
+ {m.containers_ip_address()}
+ </div>
+ <div
+ class="text-foreground cursor-pointer overflow-hidden font-mono text-sm font-medium break-all select-all"
+ title="Click to select"
+ >
+ {rawNetworkConfig.ipAddress || m.common_na()}
+ </div>
</div>
- <div>
- <div class="text-muted-foreground text-sm">{m.containers_gateway()}</div>
- <div class="font-mono">{rawNetworkConfig.gateway || m.common_na()}</div>
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">{m.containers_gateway()}</div>
+ <div
+ class="text-foreground cursor-pointer overflow-hidden font-mono text-sm font-medium break-all select-all"
+ title="Click to select"
+ >
+ {rawNetworkConfig.gateway || m.common_na()}
+ </div>
</div>
- <div>
- <div class="text-muted-foreground text-sm">{m.containers_mac_address()}</div>
- <div class="font-mono">{rawNetworkConfig.macAddress || m.common_na()}</div>
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">
+ {m.containers_mac_address()}
+ </div>
+ <div
+ class="text-foreground cursor-pointer overflow-hidden font-mono text-sm font-medium break-all select-all"
+ title="Click to select"
+ >
+ {rawNetworkConfig.macAddress || m.common_na()}
+ </div>
</div>
- <div>
- <div class="text-muted-foreground text-sm">{m.containers_subnet()}</div>
- <div class="font-mono">
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">{m.containers_subnet()}</div>
+ <div
+ class="text-foreground cursor-pointer overflow-hidden font-mono text-sm font-medium break-all select-all"
+ title="Click to select"
+ >
{rawNetworkConfig.ipPrefixLen
? `${rawNetworkConfig.ipAddress}/${rawNetworkConfig.ipPrefixLen}`
: m.common_na()}
</div>
</div>
{#if rawNetworkConfig.aliases && rawNetworkConfig.aliases.length > 0}
- <div class="col-span-2">
- <div class="text-muted-foreground text-sm">{m.containers_aliases()}</div>
- <div class="font-mono">{rawNetworkConfig.aliases.join(', ')}</div>
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">
+ {m.containers_aliases()}
+ </div>
+ <div
+ class="text-foreground cursor-pointer overflow-hidden font-mono text-sm font-medium break-all select-all"
+ title="Click to select"
+ >
+ {rawNetworkConfig.aliases.join(', ')}
+ </div>
</div>
{/if}
- </div>
- </div>
+ </Card.Content>
+ </Card.Root>
{/each}
</div>
{:else}
- <div class="text-muted-foreground py-12 text-center">{m.containers_no_networks_connected()}</div>
+ <div class="text-muted-foreground rounded-lg border border-dashed py-12 text-center">
+ <div class="text-sm">{m.containers_no_networks_connected()}</div>
+ </div>
{/if}
</Card.Content>
</Card.Root>
-</section>
+</div>
diff --git a/frontend/src/routes/containers/components/ContainerOverview.svelte b/frontend/src/routes/containers/components/ContainerOverview.svelte
index 308274e54..8bda40257 100644
--- a/frontend/src/routes/containers/components/ContainerOverview.svelte
+++ b/frontend/src/routes/containers/components/ContainerOverview.svelte
@@ -4,7 +4,8 @@
import ClockIcon from '@lucide/svelte/icons/clock';
import NetworkIcon from '@lucide/svelte/icons/network';
import TerminalIcon from '@lucide/svelte/icons/terminal';
- import Separator from '$lib/components/ui/separator/separator.svelte';
+ import InfoIcon from '@lucide/svelte/icons/info';
+ import CpuIcon from '@lucide/svelte/icons/cpu';
import StatusBadge from '$lib/components/badges/status-badge.svelte';
import { m } from '$lib/paraglide/messages';
import type { ContainerDetailsDto } from '$lib/types/container.type';
@@ -43,128 +44,135 @@
}
</script>
-<section class="scroll-mt-20">
- <h2 class="mb-6 flex items-center gap-2 text-xl font-semibold">
- <HardDriveIcon class="size-5" />
- {m.containers_details_title()}
- </h2>
+<Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <InfoIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_details_title()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_details_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ <div class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6">
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-blue-500/10 p-2">
+ <HardDriveIcon class="size-5 text-blue-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_image()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold break-all select-all sm:text-base" title="Click to select">
+ {container.image || m.common_na()}
+ </p>
+ </div>
+ </div>
- <div class="mb-6">
- <Card.Root class="rounded-lg border shadow-sm">
- <Card.Header class="pb-4">
- <Card.Title>{m.containers_details_title()}</Card.Title>
- <Card.Description class="text-muted-foreground text-sm">
- {m.containers_details_description()}
- </Card.Description>
- </Card.Header>
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-green-500/10 p-2">
+ <ClockIcon class="size-5 text-green-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_created()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {formatDockerDate(container?.created)}
+ </p>
+ </div>
+ </div>
- <Card.Content class="space-y-6">
- <div class="space-y-4">
- <div class="flex items-center gap-3">
- <div class="rounded bg-blue-50 p-2 dark:bg-blue-950/20">
- <HardDriveIcon class="size-4 text-blue-600" />
- </div>
- <div class="min-w-0 flex-1">
- <div class="text-muted-foreground text-sm">{m.common_image()}</div>
- <div class="truncate font-medium" title={container.image}>
- {container.image || m.common_na()}
- </div>
- </div>
- </div>
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-purple-500/10 p-2">
+ <NetworkIcon class="size-5 text-purple-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.containers_ip_address()}</p>
+ <p class="mt-1 cursor-pointer font-mono text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {primaryIpAddress}
+ </p>
+ </div>
+ </div>
- <div class="flex items-center gap-3">
- <div class="rounded bg-green-50 p-2 dark:bg-green-950/20">
- <ClockIcon class="size-4 text-green-600" />
- </div>
- <div class="min-w-0 flex-1">
- <div class="text-muted-foreground text-sm">{m.common_created()}</div>
- <div class="font-medium" title={formatDockerDate(container?.created)}>
- {formatDockerDate(container?.created)}
- </div>
- </div>
- </div>
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-500/10 p-2">
+ <CpuIcon class="size-5 text-gray-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_id()}</p>
+ <p class="mt-1 cursor-pointer font-mono text-xs font-semibold break-all select-all sm:text-sm" title="Click to select">
+ {container.id}
+ </p>
+ </div>
+ </div>
- <div class="flex items-center gap-3">
- <div class="rounded bg-purple-50 p-2 dark:bg-purple-950/20">
- <NetworkIcon class="size-4 text-purple-600" />
- </div>
- <div class="min-w-0 flex-1">
- <div class="text-muted-foreground text-sm">{m.containers_ip_address()}</div>
- <div class="font-medium">{primaryIpAddress}</div>
- </div>
+ {#if container.config?.workingDir}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 p-2">
+ <InfoIcon class="size-5 text-indigo-500" />
</div>
-
- <div class="flex items-center gap-3">
- <div class="rounded bg-amber-50 p-2 dark:bg-amber-950/20">
- <TerminalIcon class="size-4 text-amber-600" />
- </div>
- <div class="min-w-0 flex-1">
- <div class="text-muted-foreground text-sm">{m.containers_command()}</div>
- <div class="truncate font-medium" title={container.config?.cmd?.join(' ')}>
- {container.config?.cmd?.join(' ') || m.common_na()}
- </div>
- </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.containers_working_directory()}</p>
+ <p
+ class="mt-1 cursor-pointer font-mono text-xs font-semibold break-all select-all sm:text-sm"
+ title="Click to select"
+ >
+ {container.config.workingDir}
+ </p>
</div>
</div>
+ {/if}
- <Separator />
-
- <div class="space-y-3">
- <h4 class="text-sm font-semibold tracking-tight">{m.containers_system()}</h4>
+ {#if container.config?.user}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-orange-500/10 p-2">
+ <InfoIcon class="size-5 text-orange-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">User</p>
+ <p class="mt-1 cursor-pointer font-mono text-sm font-semibold select-all" title="Click to select">
+ {container.config.user}
+ </p>
+ </div>
+ </div>
+ {/if}
- <div class="grid grid-cols-1 gap-3 sm:grid-cols-2">
- <div class="space-y-1">
- <div class="text-muted-foreground text-xs">{m.common_id()}</div>
- <div class="bg-muted/50 max-w-full truncate rounded px-2 py-1.5 font-mono text-xs">
- {container.id}
- </div>
+ {#if container.state?.health}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-pink-500/10 p-2">
+ <InfoIcon class="size-5 text-pink-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">Health Status</p>
+ <div class="mt-2">
+ <StatusBadge
+ variant={container.state.health.status === 'healthy'
+ ? 'green'
+ : container.state.health.status === 'unhealthy'
+ ? 'red'
+ : 'amber'}
+ text={container.state.health.status}
+ size="sm"
+ />
</div>
+ </div>
+ </div>
+ {/if}
- {#if container.config?.workingDir}
- <div class="space-y-1">
- <div class="text-muted-foreground text-xs">{m.containers_working_directory()}</div>
- <div class="bg-muted/50 max-w-full truncate rounded px-2 py-1.5 font-mono text-xs">
- {container.config.workingDir}
- </div>
- </div>
- {/if}
-
- {#if container.config?.user}
- <div class="space-y-1">
- <div class="text-muted-foreground text-xs">{m.common_user()}</div>
- <div class="bg-muted/50 inline-flex rounded px-2 py-1.5 font-mono text-xs">
- {container.config.user}
- </div>
- </div>
- {/if}
-
- {#if container.state?.health}
- <div class="space-y-1 sm:col-span-2">
- <div class="text-muted-foreground text-xs">{m.containers_health_label()}</div>
- <div class="flex flex-wrap items-center gap-3">
- <StatusBadge
- variant={container.state.health.status === 'healthy'
- ? 'green'
- : container.state.health.status === 'unhealthy'
- ? 'red'
- : 'amber'}
- text={container.state.health.status}
- />
- {#if container.state.health.log && container.state.health.log.length > 0}
- {@const first = container.state.health.log[0]}
- {@const lastCheck = (first?.Start ?? first?.start) as string | undefined}
- {#if lastCheck}
- <span class="text-muted-foreground text-xs">
- {m.containers_health_last_check({ time: formatDockerDate(lastCheck) })}
- </span>
- {/if}
- {/if}
- </div>
- </div>
- {/if}
+ {#if container.config?.cmd && container.config.cmd.length > 0}
+ <div class="col-span-1 flex items-start gap-3 sm:col-span-2 lg:col-span-3 xl:col-span-4 2xl:col-span-6">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-amber-500/10 p-2">
+ <TerminalIcon class="size-5 text-amber-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.containers_command()}</p>
+ <p
+ class="mt-1 cursor-pointer font-mono text-xs leading-relaxed font-medium break-all select-all sm:text-sm"
+ title="Click to select"
+ >
+ {container.config.cmd.join(' ')}
+ </p>
</div>
</div>
- </Card.Content>
- </Card.Root>
- </div>
-</section>
+ {/if}
+ </div>
+ </Card.Content>
+</Card.Root>
diff --git a/frontend/src/routes/containers/components/ContainerStats.svelte b/frontend/src/routes/containers/components/ContainerStats.svelte
index 3e585c5f9..f8a64b253 100644
--- a/frontend/src/routes/containers/components/ContainerStats.svelte
+++ b/frontend/src/routes/containers/components/ContainerStats.svelte
@@ -1,7 +1,6 @@
<script lang="ts">
import * as Card from '$lib/components/ui/card/index.js';
import ActivityIcon from '@lucide/svelte/icons/activity';
- import NetworkIcon from '@lucide/svelte/icons/network';
import { Progress } from '$lib/components/ui/progress/index.js';
import { m } from '$lib/paraglide/messages';
import bytes from 'bytes';
@@ -31,113 +30,135 @@
}: Props = $props();
</script>
-<section class="scroll-mt-20">
- <h2 class="mb-6 flex items-center gap-2 text-xl font-semibold">
- <ActivityIcon class="size-5" />
- {m.containers_resource_metrics()}
- </h2>
+<Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <ActivityIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_resource_metrics()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_resource_metrics_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ {#if stats && container.state?.running}
+ <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
+ <div class="col-span-1 sm:col-span-2 lg:col-span-1 xl:col-span-2">
+ <div class="space-y-3">
+ <div class="flex items-center justify-between">
+ <span class="text-foreground text-base font-bold">{m.dashboard_meter_cpu()}</span>
+ <span class="text-muted-foreground text-sm font-semibold">{cpuUsagePercent.toFixed(2)}%</span>
+ </div>
+ <Progress
+ value={cpuUsagePercent}
+ max={100}
+ class="h-3 {cpuUsagePercent > 80 ? '[&>div]:bg-destructive' : cpuUsagePercent > 60 ? '[&>div]:bg-warning' : ''}"
+ />
+ </div>
+ </div>
- <Card.Root class="rounded-lg border shadow-sm">
- <Card.Content class="p-6">
- {#if stats && container.state?.running}
- <div class="grid grid-cols-1 gap-8 lg:grid-cols-2">
- <div class="space-y-6">
- <div class="space-y-2">
- <div class="flex justify-between">
- <span class="text-sm font-medium">{m.dashboard_meter_cpu()}</span>
- <span class="text-muted-foreground text-sm">{cpuUsagePercent.toFixed(2)}%</span>
+ <div class="col-span-1 sm:col-span-2 lg:col-span-1 xl:col-span-2">
+ <div class="space-y-3">
+ <div class="flex items-start justify-between">
+ <span class="text-foreground text-base font-bold">{m.dashboard_meter_memory()}</span>
+ <div class="text-right">
+ <div class="text-muted-foreground text-sm font-semibold">{memoryUsagePercent.toFixed(1)}%</div>
+ <div class="text-muted-foreground text-xs">{memoryUsageFormatted} / {memoryLimitFormatted}</div>
</div>
- <Progress
- value={cpuUsagePercent}
- max={100}
- class="h-2 {cpuUsagePercent > 80 ? '[&>div]:bg-destructive' : cpuUsagePercent > 60 ? '[&>div]:bg-warning' : ''}"
- />
</div>
+ <Progress
+ value={memoryUsagePercent}
+ max={100}
+ class="h-3 {memoryUsagePercent > 80
+ ? '[&>div]:bg-destructive'
+ : memoryUsagePercent > 60
+ ? '[&>div]:bg-warning'
+ : ''}"
+ />
+ </div>
+ </div>
- <div class="space-y-2">
- <div class="flex justify-between">
- <span class="text-sm font-medium">{m.dashboard_meter_memory()}</span>
- <span class="text-muted-foreground text-sm"
- >{memoryUsageFormatted} / {memoryLimitFormatted} ({memoryUsagePercent.toFixed(1)}%)</span
- >
+ {#if stats.pids_stats && stats.pids_stats.current !== undefined}
+ <div class="col-span-1">
+ <div class="bg-muted/30 flex h-full flex-col justify-center rounded-lg p-4">
+ <div class="text-muted-foreground mb-2 text-xs font-semibold tracking-wide uppercase">
+ {m.containers_process_count()}
</div>
- <Progress
- value={memoryUsagePercent}
- max={100}
- class="h-2 {memoryUsagePercent > 80
- ? '[&>div]:bg-destructive'
- : memoryUsagePercent > 60
- ? '[&>div]:bg-warning'
- : ''}"
- />
+ <div class="text-foreground text-2xl font-bold">{stats.pids_stats.current}</div>
</div>
</div>
+ {/if}
- <div class="space-y-6">
- <div>
- <h4 class="mb-4 flex items-center gap-2 font-medium">
- <NetworkIcon class="size-4" />
- {m.containers_network_io()}
- </h4>
- <div class="grid grid-cols-2 gap-4">
- <div class="bg-muted/30 rounded p-4">
- <div class="text-muted-foreground text-sm">{m.containers_network_received()}</div>
- <div class="mt-1 font-medium">
- {bytes.format(stats.networks?.eth0?.rx_bytes || 0)}
- </div>
+ <div class="col-span-1 sm:col-span-2 lg:col-span-3 xl:col-span-1">
+ <div class="bg-muted/30 h-full rounded-lg p-4">
+ <div class="text-muted-foreground mb-3 text-xs font-semibold tracking-wide uppercase">
+ {m.containers_network_io()}
+ </div>
+ <div class="grid grid-cols-2 gap-3">
+ <div>
+ <div class="text-muted-foreground text-xs font-medium">
+ {m.containers_network_received()}
</div>
- <div class="bg-muted/30 rounded p-4">
- <div class="text-muted-foreground text-sm">{m.containers_network_transmitted()}</div>
- <div class="mt-1 font-medium">
- {bytes.format(stats.networks?.eth0?.tx_bytes || 0)}
- </div>
+ <div class="text-foreground text-sm font-bold">
+ {bytes.format(stats.networks?.eth0?.rx_bytes || 0)}
</div>
</div>
- </div>
-
- {#if stats.blkio_stats && stats.blkio_stats.io_service_bytes_recursive && stats.blkio_stats.io_service_bytes_recursive.length > 0}
<div>
- <h4 class="mb-4 font-medium">{m.containers_block_io()}</h4>
- <div class="grid grid-cols-2 gap-4">
- <div class="bg-muted/30 rounded p-4">
- <div class="text-muted-foreground text-sm">{m.containers_block_io_read()}</div>
- <div class="mt-1 font-medium">
- {bytes.format(
- stats.blkio_stats.io_service_bytes_recursive
- .filter((item) => item.op === 'Read')
- .reduce((acc, item) => acc + item.value, 0)
- )}
- </div>
- </div>
- <div class="bg-muted/30 rounded p-4">
- <div class="text-muted-foreground text-sm">{m.containers_block_io_write()}</div>
- <div class="mt-1 font-medium">
- {bytes.format(
- stats.blkio_stats.io_service_bytes_recursive
- .filter((item) => item.op === 'Write')
- .reduce((acc, item) => acc + item.value, 0)
- )}
- </div>
- </div>
+ <div class="text-muted-foreground text-xs font-medium">
+ {m.containers_network_transmitted()}
+ </div>
+ <div class="text-foreground text-sm font-bold">
+ {bytes.format(stats.networks?.eth0?.tx_bytes || 0)}
</div>
</div>
- {/if}
+ </div>
</div>
</div>
- {#if stats.pids_stats && stats.pids_stats.current !== undefined}
- <div class="mt-6 border-t pt-6">
- <div class="text-sm">
- <span class="text-muted-foreground">{m.containers_process_count()}</span>
- <span class="ml-2 font-medium">{stats.pids_stats.current}</span>
+ {#if stats.blkio_stats && stats.blkio_stats.io_service_bytes_recursive && stats.blkio_stats.io_service_bytes_recursive.length > 0}
+ <div class="col-span-1 sm:col-span-2 lg:col-span-3 xl:col-span-1">
+ <div class="bg-muted/30 h-full rounded-lg p-4">
+ <div class="text-muted-foreground mb-3 text-xs font-semibold tracking-wide uppercase">
+ {m.containers_block_io()}
+ </div>
+ <div class="grid grid-cols-2 gap-3">
+ <div>
+ <div class="text-muted-foreground text-xs font-medium">
+ {m.containers_block_io_read()}
+ </div>
+ <div class="text-foreground text-sm font-bold">
+ {bytes.format(
+ stats.blkio_stats.io_service_bytes_recursive
+ .filter((item) => item.op === 'Read')
+ .reduce((acc, item) => acc + item.value, 0)
+ )}
+ </div>
+ </div>
+ <div>
+ <div class="text-muted-foreground text-xs font-medium">
+ {m.containers_block_io_write()}
+ </div>
+ <div class="text-foreground text-sm font-bold">
+ {bytes.format(
+ stats.blkio_stats.io_service_bytes_recursive
+ .filter((item) => item.op === 'Write')
+ .reduce((acc, item) => acc + item.value, 0)
+ )}
+ </div>
+ </div>
+ </div>
</div>
</div>
{/if}
- {:else if !container.state?.running}
- <div class="text-muted-foreground py-12 text-center">{m.containers_stats_unavailable()}</div>
- {:else}
- <div class="text-muted-foreground py-12 text-center">{m.containers_stats_loading()}</div>
- {/if}
- </Card.Content>
- </Card.Root>
-</section>
+ </div>
+ {:else if !container.state?.running}
+ <div class="text-muted-foreground rounded-lg border border-dashed py-12 text-center">
+ <div class="text-sm">{m.containers_stats_unavailable()}</div>
+ </div>
+ {:else}
+ <div class="text-muted-foreground rounded-lg border border-dashed py-12 text-center">
+ <div class="text-sm">{m.containers_stats_loading()}</div>
+ </div>
+ {/if}
+ </Card.Content>
+</Card.Root>
diff --git a/frontend/src/routes/containers/components/ContainerStorage.svelte b/frontend/src/routes/containers/components/ContainerStorage.svelte
index 7e8d9c952..db12ff1ee 100644
--- a/frontend/src/routes/containers/components/ContainerStorage.svelte
+++ b/frontend/src/routes/containers/components/ContainerStorage.svelte
@@ -14,79 +14,91 @@
let { container }: Props = $props();
</script>
-<section class="scroll-mt-20">
- <h2 class="mb-6 flex items-center gap-2 text-xl font-semibold">
- <DatabaseIcon class="size-5" />
- {m.containers_storage_title()}
- </h2>
-
- <Card.Root class="rounded-lg border shadow-sm">
- <Card.Content class="p-6">
+<div class="space-y-6">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <DatabaseIcon class="text-primary size-5" />
+ <h2>
+ {m.containers_storage_title()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.containers_storage_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
{#if container.mounts && container.mounts.length > 0}
- <div class="space-y-4">
+ <div class="grid grid-cols-1 gap-6 lg:grid-cols-2 xl:grid-cols-3">
{#each container.mounts as mount (mount.destination)}
- <div class="overflow-hidden rounded border">
- <div class="bg-muted/20 flex items-center justify-between p-4">
- <div class="flex items-center gap-3">
- <div
- class="rounded p-2 {mount.type === 'volume'
- ? 'bg-purple-100 dark:bg-purple-950'
- : mount.type === 'bind'
- ? 'bg-blue-100 dark:bg-blue-950'
- : 'bg-amber-100 dark:bg-amber-950'}"
- >
- {#if mount.type === 'volume'}
- <DatabaseIcon class="size-4 text-purple-600" />
- {:else if mount.type === 'bind'}
- <HardDriveIcon class="size-4 text-blue-600" />
- {:else}
- <TerminalIcon class="size-4 text-amber-600" />
- {/if}
- </div>
- <div>
- <div class="font-medium">
- {mount.type === 'tmpfs'
- ? m.containers_mount_type_tmpfs()
- : mount.type === 'volume'
- ? mount.name || m.containers_mount_type_volume()
- : m.containers_mount_type_bind()}
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted/30 rounded-t-xl p-4">
+ <div class="flex items-center justify-between">
+ <div class="flex items-center gap-3">
+ <div
+ class="rounded-lg p-2.5 {mount.type === 'volume'
+ ? 'bg-purple-500/10'
+ : mount.type === 'bind'
+ ? 'bg-blue-500/10'
+ : 'bg-amber-500/10'}"
+ >
+ {#if mount.type === 'volume'}
+ <DatabaseIcon class="size-5 text-purple-500" />
+ {:else if mount.type === 'bind'}
+ <HardDriveIcon class="size-5 text-blue-500" />
+ {:else}
+ <TerminalIcon class="size-5 text-amber-500" />
+ {/if}
</div>
- <div class="text-muted-foreground text-sm">
- {mount.type} mount {mount.rw ? `(${m.common_rw()})` : `(${m.common_ro()})`}
+ <div class="min-w-0 flex-1">
+ <Card.Title class="text-base break-all">
+ {mount.type === 'tmpfs'
+ ? m.containers_mount_type_tmpfs()
+ : mount.type === 'volume'
+ ? mount.name || m.containers_mount_type_volume()
+ : m.containers_mount_type_bind()}
+ </Card.Title>
+ <Card.Description class="text-xs">
+ {mount.type} mount
+ </Card.Description>
</div>
</div>
+ <Badge variant={mount.rw ? 'outline' : 'secondary'} class="text-xs font-semibold">
+ {mount.rw ? m.common_rw() : m.common_ro()}
+ </Badge>
</div>
- <Badge variant={mount.rw ? 'outline' : 'secondary'}>
- {mount.rw ? m.common_rw() : m.common_ro()}
- </Badge>
- </div>
- <div class="space-y-3 p-4">
- <div class="flex">
- <span class="text-muted-foreground w-24 font-medium">{m.containers_mount_label_container()}</span>
- <span class="bg-muted/50 flex-1 rounded px-2 py-1 font-mono">{mount.destination}</span>
+ </Card.Header>
+ <Card.Content class="pt-0 space-y-4">
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">
+ {m.containers_mount_label_container()}
+ </div>
+ <div class="text-foreground overflow-hidden font-mono text-sm font-medium break-all select-all cursor-pointer" title="Click to select">
+ {mount.destination}
+ </div>
</div>
- <div class="flex">
- <span class="text-muted-foreground w-24 font-medium">
+ <div class="space-y-2">
+ <div class="text-muted-foreground text-xs font-semibold uppercase">
{mount.type === 'volume'
? m.containers_mount_label_volume()
: mount.type === 'bind'
? m.containers_mount_label_host()
: m.containers_mount_label_source()}
- </span>
- <span class="bg-muted/50 flex-1 rounded px-2 py-1 font-mono">{mount.source}</span>
+ </div>
+ <div class="text-foreground overflow-hidden font-mono text-sm font-medium break-all select-all cursor-pointer" title="Click to select">
+ {mount.source}
+ </div>
</div>
- </div>
- </div>
+ </Card.Content>
+ </Card.Root>
{/each}
</div>
{:else}
- <div class="py-12 text-center">
- <div class="bg-muted/50 mx-auto mb-4 flex size-16 items-center justify-center rounded-full">
+ <div class="rounded-lg border border-dashed py-12 text-center">
+ <div class="bg-muted/30 mx-auto mb-4 flex size-16 items-center justify-center rounded-full">
<DatabaseIcon class="text-muted-foreground size-6" />
</div>
- <div class="text-muted-foreground">{m.containers_no_mounts_configured()}</div>
+ <div class="text-muted-foreground text-sm">{m.containers_no_mounts_configured()}</div>
</div>
{/if}
</Card.Content>
</Card.Root>
-</section>
+</div>
diff --git a/frontend/src/routes/containers/container-table.svelte b/frontend/src/routes/containers/container-table.svelte
index aaccbe53f..89e1011bc 100644
--- a/frontend/src/routes/containers/container-table.svelte
+++ b/frontend/src/routes/containers/container-table.svelte
@@ -22,7 +22,7 @@
import type { ContainerSummaryDto } from '$lib/types/container.type';
import type { ColumnSpec } from '$lib/components/arcane-table';
import { m } from '$lib/paraglide/messages';
- import PortBadges from '$lib/components/port-badges.svelte';
+ import { PortBadge } from '$lib/components/badges/index.js';
import { containerService } from '$lib/services/container-service';
let {
@@ -137,7 +137,7 @@
</script>
{#snippet PortsCell({ item }: { item: ContainerSummaryDto })}
- <PortBadges ports={item.ports ?? []} {baseServerUrl} />
+ <PortBadge ports={item.ports ?? []} {baseServerUrl} />
{/snippet}
{#snippet NameCell({ item }: { item: ContainerSummaryDto })}
diff --git a/frontend/src/routes/images/[imageId]/+page.svelte b/frontend/src/routes/images/[imageId]/+page.svelte
index dc298cc88..11a26d294 100644
--- a/frontend/src/routes/images/[imageId]/+page.svelte
+++ b/frontend/src/routes/images/[imageId]/+page.svelte
@@ -6,6 +6,8 @@
import LayersIcon from '@lucide/svelte/icons/layers';
import HashIcon from '@lucide/svelte/icons/hash';
import CpuIcon from '@lucide/svelte/icons/cpu';
+ import InfoIcon from '@lucide/svelte/icons/info';
+ import SettingsIcon from '@lucide/svelte/icons/settings';
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
import { goto } from '$app/navigation';
import { Separator } from '$lib/components/ui/separator/index.js';
@@ -84,7 +86,7 @@
</Breadcrumb.List>
</Breadcrumb.Root>
<div class="mt-2 flex items-center gap-2">
- <h1 class="break-all text-2xl font-bold tracking-tight">
+ <h1 class="text-2xl font-bold tracking-tight break-all">
{image?.repoTags?.[0] || shortId()}
</h1>
</div>
@@ -103,101 +105,165 @@
{#if image}
<div class="space-y-6">
- <Card.Root class="border shadow-sm">
- <Card.Header>
- <Card.Title>{m.images_details_title()}</Card.Title>
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <InfoIcon class="text-primary size-5" />
+ {m.images_details_title()}
+ </Card.Title>
+ <Card.Description>{m.images_details_description()}</Card.Description>
</Card.Header>
- <Card.Content>
- <div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
- <!-- ID -->
+ <Card.Content class="p-4">
+ <div class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6">
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-500/10 p-2">
<HashIcon class="size-5 text-gray-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_id()}</p>
- <p class="mt-1 truncate text-base font-semibold" title={image.id}>{shortId()}</p>
+ <p
+ class="mt-1 cursor-pointer font-mono text-xs font-semibold break-all select-all sm:text-sm"
+ title="Click to select"
+ >
+ {shortId()}
+ </p>
</div>
</div>
- <!-- Size -->
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-blue-500/10 p-2">
<HardDriveIcon class="size-5 text-blue-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.images_size()}</p>
- <p class="mt-1 text-base font-semibold">{imageSize()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {imageSize()}
+ </p>
</div>
</div>
- <!-- Created -->
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-green-500/10 p-2">
<ClockIcon class="size-5 text-green-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_created()}</p>
- <p class="mt-1 text-base font-semibold">{createdDate()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {createdDate()}
+ </p>
</div>
</div>
- <!-- Architecture -->
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-orange-500/10 p-2">
<CpuIcon class="size-5 text-orange-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.images_architecture()}</p>
- <p class="mt-1 text-base font-semibold">{architecture()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {architecture()}
+ </p>
</div>
</div>
- <!-- OS -->
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-indigo-500/10 p-2">
<LayersIcon class="size-5 text-indigo-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.images_os()}</p>
- <p class="mt-1 text-base font-semibold">{osName()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {osName()}
+ </p>
</div>
</div>
+
+ {#if image?.dockerVersion}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-purple-500/10 p-2">
+ <InfoIcon class="size-5 text-purple-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_docker_version()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">
+ {image.dockerVersion}
+ </p>
+ </div>
+ </div>
+ {/if}
+
+ {#if image?.author}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-pink-500/10 p-2">
+ <InfoIcon class="size-5 text-pink-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_author()}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold break-all select-all sm:text-base" title="Click to select">
+ {image.author}
+ </p>
+ </div>
+ </div>
+ {/if}
+
+ {#if image.config?.workingDir}
+ <div class="flex items-start gap-3">
+ <div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-amber-500/10 p-2">
+ <InfoIcon class="size-5 text-amber-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <p class="text-muted-foreground text-sm font-medium">{m.common_working_dir()}</p>
+ <p
+ class="mt-1 cursor-pointer font-mono text-xs font-semibold break-all select-all sm:text-sm"
+ title="Click to select"
+ >
+ {image.config.workingDir}
+ </p>
+ </div>
+ </div>
+ {/if}
</div>
</Card.Content>
</Card.Root>
- <!-- Tags Card -->
{#if image.repoTags && image.repoTags.length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header>
- <Card.Title class="flex items-center gap-2"
- ><TagIcon class="text-muted-foreground size-5" /> {m.images_tags_title()}</Card.Title
- >
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <TagIcon class="text-primary size-5" />
+ {m.images_tags_title()}
+ </Card.Title>
+ <Card.Description>{m.images_tags_description()}</Card.Description>
</Card.Header>
- <Card.Content>
+ <Card.Content class="p-4">
<div class="flex flex-wrap gap-2">
{#each image.repoTags as tag (tag)}
- <Badge variant="secondary">{tag}</Badge>
+ <Badge variant="secondary" class="cursor-pointer text-sm select-all" title="Click to select">{tag}</Badge>
{/each}
</div>
</Card.Content>
</Card.Root>
{/if}
- <!-- Environment Variables Card -->
{#if image.config?.env && image.config.env.length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header>
- <Card.Title>{m.images_env_vars_title()}</Card.Title>
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <SettingsIcon class="text-primary size-5" />
+ {m.images_env_vars_title()}
+ </Card.Title>
+ <Card.Description>{m.images_env_vars_description()}</Card.Description>
</Card.Header>
- <Card.Content class="space-y-2">
+ <Card.Content class="space-y-2 p-4">
{#each image.config.env as env (env)}
{@const [key, ...valueParts] = env.split('=')}
{@const value = valueParts.join('=')}
<div class="flex flex-col text-sm sm:flex-row sm:items-center">
- <span class="text-muted-foreground w-full break-all font-medium sm:w-1/4">{key}:</span>
- <span class="w-full break-all font-mono text-xs sm:w-3/4 sm:text-sm">{value}</span>
+ <span class="text-muted-foreground w-full font-medium break-all sm:w-1/4">{key}:</span>
+ <span
+ class="w-full cursor-pointer font-mono text-xs break-all select-all sm:w-3/4 sm:text-sm"
+ title="Click to select">{value}</span
+ >
</div>
{#if env !== image.config.env[image.config.env.length - 1]}
<Separator class="my-2" />
diff --git a/frontend/src/routes/networks/[networkId]/+page.svelte b/frontend/src/routes/networks/[networkId]/+page.svelte
index 611c19584..c92336f10 100644
--- a/frontend/src/routes/networks/[networkId]/+page.svelte
+++ b/frontend/src/routes/networks/[networkId]/+page.svelte
@@ -12,6 +12,7 @@
import SettingsIcon from '@lucide/svelte/icons/settings';
import ListTreeIcon from '@lucide/svelte/icons/list-tree';
import ContainerIcon from '@lucide/svelte/icons/container';
+ import InfoIcon from '@lucide/svelte/icons/info';
import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js';
import * as Alert from '$lib/components/ui/alert/index.js';
import StatusBadge from '$lib/components/badges/status-badge.svelte';
@@ -141,23 +142,23 @@
{#if network}
<div class="space-y-6">
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
- <NetworkIcon class="text-primary size-5" />
+ <InfoIcon class="text-primary size-5" />
{m.networks_details_title()}
</Card.Title>
<Card.Description>{m.networks_details_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
- <div class="grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-2 lg:grid-cols-3">
+ <Card.Content class="p-4">
+ <div class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6">
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-500/10 p-2">
<HashIcon class="size-5 text-gray-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.networks_id()}</p>
- <p class="mt-1 truncate text-base font-semibold" title={network.id}>{network.id}</p>
+ <p class="mt-1 cursor-pointer font-mono text-xs font-semibold break-all select-all sm:text-sm" title="Click to select">{network.id}</p>
</div>
</div>
@@ -167,7 +168,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.networks_name()}</p>
- <p class="mt-1 break-words text-base font-semibold">{network.name}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold break-all select-all sm:text-base" title="Click to select">{network.name}</p>
</div>
</div>
@@ -177,7 +178,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.networks_driver()}</p>
- <p class="mt-1 text-base font-semibold">{network.driver}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">{network.driver}</p>
</div>
</div>
@@ -187,7 +188,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.networks_scope()}</p>
- <p class="mt-1 text-base font-semibold capitalize">{network.scope}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold capitalize select-all sm:text-base" title="Click to select">{network.scope}</p>
</div>
</div>
@@ -197,7 +198,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.networks_created()}</p>
- <p class="mt-1 text-base font-semibold">{createdDate}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">{createdDate}</p>
</div>
</div>
@@ -250,15 +251,15 @@
</Card.Root>
{#if network.ipam?.Config && network.ipam.Config.length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<SettingsIcon class="text-primary size-5" />
{m.networks_ipam_title()}
</Card.Title>
<Card.Description>{m.networks_ipam_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
{#each network.ipam.Config as config, i (i)}
<div class="bg-card/50 mb-4 rounded-lg border p-4 last:mb-0">
<div class="space-y-2">
@@ -268,7 +269,7 @@
>{m.networks_ipam_subnet_label()}:</span
>
<code
- class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm"
+ class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm cursor-pointer select-all" title="Click to select"
>
{config.Subnet}
</code>
@@ -281,7 +282,7 @@
>{m.networks_ipam_gateway_label()}:</span
>
<code
- class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm"
+ class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm cursor-pointer select-all" title="Click to select"
>
{config.Gateway}
</code>
@@ -294,7 +295,7 @@
>{m.networks_ipam_iprange_label()}:</span
>
<code
- class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm"
+ class="bg-muted text-muted-foreground mt-1 rounded px-1.5 py-0.5 font-mono text-xs sm:mt-0 sm:text-sm cursor-pointer select-all" title="Click to select"
>
{config.IPRange}
</code>
@@ -308,7 +309,7 @@
{#each Object.entries(config.AuxiliaryAddresses ?? config.AuxAddress ?? {}) as [name, addr] (name)}
<li class="flex font-mono text-xs">
<span class="text-muted-foreground mr-2">{name}:</span>
- <code class="bg-muted text-muted-foreground rounded px-1 py-0.5">{addr}</code>
+ <code class="bg-muted text-muted-foreground rounded px-1 py-0.5 cursor-pointer select-all" title="Click to select">{addr}</code>
</li>
{/each}
</ul>
@@ -343,8 +344,8 @@
{/if}
{#if connectedContainers.length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<ContainerIcon class="text-primary size-5" />
{m.networks_connected_containers_title()}
@@ -353,7 +354,7 @@
>{m.networks_connected_containers_description({ count: connectedContainers.length })}</Card.Description
>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
<div class="bg-card divide-y rounded-lg border">
{#each connectedContainers as container (container.id)}
<div class="flex flex-col p-3 sm:flex-row sm:items-center">
@@ -364,9 +365,9 @@
</a>
</div>
<div class="w-full pl-0 sm:w-2/3 sm:pl-4">
- <code class="bg-muted text-muted-foreground break-all rounded px-1.5 py-0.5 font-mono text-xs sm:text-sm">
- {container.IPv4Address || container.IPv6Address || m.common_unknown()}
- </code>
+ <code class="bg-muted text-muted-foreground break-all rounded px-1.5 py-0.5 font-mono text-xs sm:text-sm cursor-pointer select-all" title="Click to select">
+ {container.IPv4Address || container.IPv6Address || m.common_unknown()}
+ </code>
</div>
</div>
{/each}
@@ -376,22 +377,22 @@
{/if}
{#if network.labels && Object.keys(network.labels).length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<TagIcon class="text-primary size-5" />
{m.networks_labels_title()}
</Card.Title>
<Card.Description>{m.networks_labels_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
<div class="bg-card divide-y rounded-lg border">
{#each Object.entries(network.labels) as [key, value] (key)}
<div class="flex flex-col p-3 sm:flex-row">
<div class="text-muted-foreground mb-2 w-full break-all font-medium sm:mb-0 sm:w-1/3">
{key}
</div>
- <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm">
+ <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm cursor-pointer select-all" title="Click to select">
{value}
</div>
</div>
@@ -402,22 +403,22 @@
{/if}
{#if network.options && Object.keys(network.options).length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<SettingsIcon class="text-primary size-5" />
{m.networks_options_title()}
</Card.Title>
<Card.Description>{m.networks_options_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
<div class="bg-card divide-y rounded-lg border">
{#each Object.entries(network.options) as [key, value] (key)}
<div class="flex flex-col p-3 sm:flex-row">
<div class="text-muted-foreground mb-2 w-full break-all font-medium sm:mb-0 sm:w-1/3">
{key}
</div>
- <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm">
+ <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm cursor-pointer select-all" title="Click to select">
{value}
</div>
</div>
diff --git a/frontend/src/routes/projects/[projectId]/+page.svelte b/frontend/src/routes/projects/[projectId]/+page.svelte
index 48d487958..c54d9fcaf 100644
--- a/frontend/src/routes/projects/[projectId]/+page.svelte
+++ b/frontend/src/routes/projects/[projectId]/+page.svelte
@@ -275,9 +275,7 @@
<Tabs.Content value="logs" class="h-full">
{#if project.status == 'running'}
- <div class="h-full">
- <ProjectsLogsPanel projectId={project.id} bind:autoScroll={autoScrollStackLogs} />
- </div>
+ <ProjectsLogsPanel projectId={project.id} bind:autoScroll={autoScrollStackLogs} />
{:else}
<div class="text-muted-foreground py-12 text-center">{m.compose_logs_title()} Unavailable</div>
{/if}
diff --git a/frontend/src/routes/projects/components/CodePanel.svelte b/frontend/src/routes/projects/components/CodePanel.svelte
index a216e31a3..d0984bfbe 100644
--- a/frontend/src/routes/projects/components/CodePanel.svelte
+++ b/frontend/src/routes/projects/components/CodePanel.svelte
@@ -1,5 +1,7 @@
<script lang="ts">
+ import * as Card from '$lib/components/ui/card/index.js';
import CodeEditor from '$lib/components/code-editor/editor.svelte';
+ import FileTextIcon from '@lucide/svelte/icons/file-text';
type CodeLanguage = 'yaml' | 'env';
@@ -20,12 +22,19 @@
} = $props();
</script>
-<div class="flex items-center justify-between py-2">
- <h3 class="text-xs font-semibold sm:text-sm">{title}</h3>
-</div>
-<div class="min-h-[560px] w-full overflow-hidden pb-4 [&_.cm-content]:text-xs sm:[&_.cm-content]:text-sm">
- <CodeEditor bind:value {language} {placeholder} height="full" />
- {#if error}
- <p class="text-destructive mt-2 text-xs">{error}</p>
- {/if}
-</div>
+<Card.Root class="gap-0 p-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <FileTextIcon class="text-primary size-5" />
+ {title}
+ </Card.Title>
+ </Card.Header>
+ <Card.Content class="p-0">
+ <div class="min-h-[500px] w-full overflow-hidden [&_.cm-content]:text-xs sm:[&_.cm-content]:text-sm">
+ <CodeEditor bind:value {language} {placeholder} height="full" class="rounded-t-none rounded-b-xl" />
+ {#if error}
+ <p class="text-destructive mt-2 text-xs">{error}</p>
+ {/if}
+ </div>
+ </Card.Content>
+</Card.Root>
diff --git a/frontend/src/routes/projects/components/ProjectLogsPanel.svelte b/frontend/src/routes/projects/components/ProjectLogsPanel.svelte
index ac5c65644..5427cad89 100644
--- a/frontend/src/routes/projects/components/ProjectLogsPanel.svelte
+++ b/frontend/src/routes/projects/components/ProjectLogsPanel.svelte
@@ -27,107 +27,76 @@
function onToggleAutoScroll() {}
</script>
-<div class="mb-3 flex flex-col gap-3 sm:hidden">
- <div class="flex items-center justify-between">
- <div class="flex items-center gap-2">
- <TerminalIcon class="size-5" />
- <h2 class="text-lg font-semibold">{m.compose_logs_title()}</h2>
- </div>
- {#if isStreaming}
+<Card.Root class="gap-0 p-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div class="flex items-center gap-2">
- <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
- <span class="text-sm font-medium text-green-600">{m.common_live()}</span>
+ <TerminalIcon class="text-primary size-5" />
+ <Card.Title class="text-lg">{m.compose_logs_title()}</Card.Title>
+ {#if isStreaming}
+ <div class="flex items-center gap-2">
+ <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
+ <span class="text-xs font-semibold text-green-600 sm:text-sm">{m.common_live()}</span>
+ </div>
+ {/if}
</div>
- {/if}
- </div>
-
- <div class="flex items-center justify-between gap-3">
- <label class="flex items-center gap-2 text-sm">
- <input type="checkbox" bind:checked={autoScroll} class="size-4" />
- {m.common_autoscroll()}
- </label>
- <div class="flex items-center gap-2">
- <Button variant="outline" size="sm" onclick={() => viewer?.clearLogs()}>{m.common_clear()}</Button>
- {#if isStreaming}
- <Button variant="outline" size="sm" onclick={() => viewer?.stopLogStream()}>
- {m.common_stop()}
- </Button>
- {:else}
- <Button variant="outline" size="sm" onclick={() => viewer?.startLogStream()} disabled={!projectId}>
- {m.common_start()}
- </Button>
- {/if}
- <Button
- variant="outline"
- size="sm"
- onclick={() => {
- viewer?.stopLogStream();
- viewer?.startLogStream();
- }}
- aria-label="Refresh logs"
- title="Refresh"
- >
- <RefreshCwIcon class="size-4" />
- </Button>
- </div>
- </div>
-</div>
-<div class="mb-3 hidden items-center justify-between sm:flex">
- <div class="flex items-center gap-3">
- <TerminalIcon class="size-5" />
- <h2 class="text-xl font-semibold">{m.compose_logs_title()}</h2>
- {#if isStreaming}
- <div class="flex items-center gap-2">
- <div class="size-2 animate-pulse rounded-full bg-green-500"></div>
- <span class="text-sm font-medium text-green-600">{m.common_live()}</span>
- </div>
- {/if}
- </div>
- <div class="flex items-center gap-3">
- <label class="flex items-center gap-2">
- <input type="checkbox" bind:checked={autoScroll} class="size-4" />
- {m.common_autoscroll()}
- </label>
- <Button variant="outline" size="sm" onclick={() => viewer?.clearLogs()}>{m.common_clear()}</Button>
- {#if isStreaming}
- <Button variant="outline" size="sm" onclick={() => viewer?.stopLogStream()}>{m.common_stop()}</Button>
- {:else}
- <Button variant="outline" size="sm" onclick={() => viewer?.startLogStream()} disabled={!projectId}>
- {m.common_start()}
- </Button>
- {/if}
- <Button
- variant="outline"
- size="sm"
- onclick={() => {
- viewer?.stopLogStream();
- viewer?.startLogStream();
- }}
- aria-label="Refresh logs"
- title="Refresh"
- >
- <RefreshCwIcon class="size-4" />
- </Button>
- </div>
-</div>
+ <div class="flex flex-col gap-3 sm:flex-row sm:items-center">
+ <label class="flex items-center gap-2">
+ <input type="checkbox" bind:checked={autoScroll} class="size-4" />
+ <span class="text-sm font-medium">{m.common_autoscroll()}</span>
+ </label>
-<Card.Root class="overflow-hidden border">
- <Card.Content class="p-0">
- <div class="w-full overflow-hidden">
- <LogViewer
- bind:this={viewer}
- bind:autoScroll
- {projectId}
- type="project"
- maxLines={500}
- showTimestamps={true}
- height="calc(100vh - 280px)"
- {onStart}
- {onStop}
- {onClear}
- {onToggleAutoScroll}
- />
+ <div class="flex items-center gap-2">
+ <Button variant="outline" size="sm" class="text-xs font-medium" onclick={() => viewer?.clearLogs()}>
+ {m.common_clear()}
+ </Button>
+ {#if isStreaming}
+ <Button variant="outline" size="sm" class="text-xs font-medium" onclick={() => viewer?.stopLogStream()}>
+ {m.common_stop()}
+ </Button>
+ {:else}
+ <Button
+ variant="outline"
+ size="sm"
+ class="text-xs font-medium"
+ onclick={() => viewer?.startLogStream()}
+ disabled={!projectId}
+ >
+ {m.common_start()}
+ </Button>
+ {/if}
+ <Button
+ variant="outline"
+ size="sm"
+ class="px-2"
+ onclick={() => {
+ viewer?.stopLogStream();
+ viewer?.startLogStream();
+ }}
+ aria-label="Refresh logs"
+ title="Refresh"
+ >
+ <RefreshCwIcon class="size-4" />
+ </Button>
+ </div>
+ </div>
</div>
+ <Card.Description>Real-time project logs</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-0">
+ <LogViewer
+ bind:this={viewer}
+ bind:autoScroll
+ {projectId}
+ type="project"
+ maxLines={500}
+ showTimestamps={true}
+ height="calc(100vh - 320px)"
+ {onStart}
+ {onStop}
+ {onClear}
+ {onToggleAutoScroll}
+ />
</Card.Content>
</Card.Root>
diff --git a/frontend/src/routes/projects/components/ServicesGrid.svelte b/frontend/src/routes/projects/components/ServicesGrid.svelte
index 0fd3cee4c..bebfc0526 100644
--- a/frontend/src/routes/projects/components/ServicesGrid.svelte
+++ b/frontend/src/routes/projects/components/ServicesGrid.svelte
@@ -1,4 +1,5 @@
<script lang="ts">
+ import * as Card from '$lib/components/ui/card/index.js';
import LayersIcon from '@lucide/svelte/icons/layers';
import StatusBadge from '$lib/components/badges/status-badge.svelte';
import { getStatusVariant } from '$lib/utils/status.utils';
@@ -14,52 +15,77 @@
let { services }: { services?: Service[] } = $props();
</script>
-{#if services && services.length > 0}
- <div class="bg-card rounded-lg border">
- <div class="grid grid-cols-1 gap-2 p-4 sm:grid-cols-2 lg:grid-cols-3">
- {#each services as service (service.container_id || service.name)}
- {@const status = service.status || 'unknown'}
- {@const variant = getStatusVariant(status)}
+<Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
+ <Card.Title class="flex items-center gap-2 text-lg">
+ <LayersIcon class="text-primary size-5" />
+ <h2>
+ {m.compose_services()}
+ </h2>
+ </Card.Title>
+ <Card.Description>{m.compose_services_description()}</Card.Description>
+ </Card.Header>
+ <Card.Content class="p-4">
+ {#if services && services.length > 0}
+ <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
+ {#each services as service (service.container_id || service.name)}
+ {@const status = service.status || 'unknown'}
+ {@const variant = getStatusVariant(status)}
- {#if service.container_id}
- <a
- href={`/containers/${service.container_id}`}
- class="bg-background hover:bg-muted/50 group flex items-center gap-3 rounded-lg border p-3 transition-all"
- >
- <div class="bg-primary/10 rounded-full p-2">
- <LayersIcon class="text-primary size-3" />
- </div>
- <div class="min-w-0 flex-1">
- <div class="flex items-center justify-between">
- <p class="truncate text-sm font-medium" title={service.name}>{service.name}</p>
- </div>
- <div class="mt-1 flex items-center gap-2">
- <StatusBadge {variant} text={capitalizeFirstLetter(status)} class="text-xs" />
- </div>
- </div>
- </a>
- {:else}
- <div class="bg-muted/10 flex items-center gap-3 rounded-lg border p-3">
- <div class="bg-muted/50 rounded-full p-2">
- <LayersIcon class="text-muted-foreground size-3" />
- </div>
- <div class="min-w-0 flex-1">
- <p class="truncate text-sm font-medium" title={service.name}>{service.name}</p>
- <div class="mt-1 flex items-center gap-2">
- <StatusBadge {variant} text={capitalizeFirstLetter(status)} class="text-xs" />
- <span class="text-muted-foreground text-xs">{m.compose_service_not_created()}</span>
- </div>
- </div>
- </div>
- {/if}
- {/each}
- </div>
- </div>
-{:else}
- <div class="py-12 text-center">
- <div class="bg-muted/50 mx-auto mb-4 flex size-16 items-center justify-center rounded-full">
- <LayersIcon class="text-muted-foreground size-6" />
- </div>
- <div class="text-muted-foreground">{m.compose_no_services_found()}</div>
- </div>
-{/if}
+ {#if service.container_id}
+ <a href={`/containers/${service.container_id}`} class="group">
+ <Card.Root
+ class="group-hover:border-border/60 h-full cursor-pointer transition-all duration-200 group-hover:shadow-sm"
+ >
+ <Card.Content class="p-6 py-2">
+ <div class="flex items-start gap-4">
+ <div class="rounded-lg bg-blue-500/10 p-2.5 transition-colors group-hover:bg-blue-500/15">
+ <LayersIcon class="size-5 text-blue-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <h3 class="text-foreground text-lg font-semibold transition-colors">
+ {service.name}
+ </h3>
+ <div class="mt-3 flex items-center gap-2">
+ <StatusBadge {variant} text={capitalizeFirstLetter(status)} />
+ </div>
+ <p class="text-muted-foreground mt-2 text-sm">{m.compose_active_container()}</p>
+ </div>
+ </div>
+ </Card.Content>
+ </Card.Root>
+ </a>
+ {:else}
+ <Card.Root class="h-full opacity-75">
+ <Card.Content class="p-6 py-2">
+ <div class="flex items-start gap-4">
+ <div class="rounded-lg bg-amber-500/10 p-2.5">
+ <LayersIcon class="size-5 text-amber-500" />
+ </div>
+ <div class="min-w-0 flex-1">
+ <h3 class="text-foreground text-lg font-semibold">
+ {service.name}
+ </h3>
+ <div class="mt-3 flex items-center gap-2">
+ <StatusBadge {variant} text={capitalizeFirstLetter(status)} />
+ </div>
+ <p class="text-muted-foreground mt-2 text-sm">
+ {m.compose_service_not_created()}
+ </p>
+ </div>
+ </div>
+ </Card.Content>
+ </Card.Root>
+ {/if}
+ {/each}
+ </div>
+ {:else}
+ <div class="rounded-lg border border-dashed py-12 text-center">
+ <div class="bg-muted/50 mx-auto mb-4 flex size-16 items-center justify-center rounded-full">
+ <LayersIcon class="text-muted-foreground size-6" />
+ </div>
+ <div class="text-muted-foreground text-sm">{m.compose_no_services_found()}</div>
+ </div>
+ {/if}
+ </Card.Content>
+</Card.Root>
diff --git a/frontend/src/routes/settings/+page.svelte b/frontend/src/routes/settings/+page.svelte
index 1e523833a..299afb693 100644
--- a/frontend/src/routes/settings/+page.svelte
+++ b/frontend/src/routes/settings/+page.svelte
@@ -10,7 +10,7 @@
import { Button } from '$lib/components/ui/button';
import { Card } from '$lib/components/ui/card';
import { m } from '$lib/paraglide/messages';
- import UiConfigDisabledTag from '$lib/components/ui-config-disabled-tag.svelte';
+ import { UiConfigDisabledTag } from '$lib/components/badges/index.js';
interface SettingMeta {
key: string;
@@ -313,7 +313,7 @@
<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 -right-10 -top-10 size-40 rounded-full blur-3xl"></div>
+ <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">
@@ -336,15 +336,15 @@
</div>
<div class="relative mt-4 w-full sm:mt-6 sm:max-w-md">
- <SearchIcon class="text-muted-foreground absolute left-3 top-1/2 z-10 size-4 -translate-y-1/2" />
+ <SearchIcon class="text-muted-foreground absolute top-1/2 left-3 z-10 size-4 -translate-y-1/2" />
<input
type="text"
placeholder="Search settings..."
bind:value={searchQuery}
- class="bg-background/50 border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 pl-10 text-sm backdrop-blur-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
+ class="bg-background/50 border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 pl-10 text-sm backdrop-blur-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
/>
{#if showSearchResults}
- <Button variant="ghost" size="sm" onclick={clearSearch} class="absolute right-2 top-1/2 h-6 w-6 -translate-y-1/2 p-0">
+ <Button variant="ghost" size="sm" onclick={clearSearch} class="absolute top-1/2 right-2 h-6 w-6 -translate-y-1/2 p-0">
×
</Button>
{/if}
@@ -367,7 +367,7 @@
<Icon class="size-5 sm:size-6" />
</div>
<div class="min-w-0 flex-1">
- <h3 class="text-sm font-semibold leading-tight sm:text-base">{category.title}</h3>
+ <h3 class="text-sm leading-tight font-semibold sm:text-base">{category.title}</h3>
<p class="text-muted-foreground mt-1 text-xs leading-relaxed sm:text-sm">{category.description}</p>
</div>
</div>
diff --git a/frontend/src/routes/volumes/[volumeName]/+page.svelte b/frontend/src/routes/volumes/[volumeName]/+page.svelte
index 476a86373..d3ecef158 100644
--- a/frontend/src/routes/volumes/[volumeName]/+page.svelte
+++ b/frontend/src/routes/volumes/[volumeName]/+page.svelte
@@ -110,23 +110,23 @@
{#if volume}
<div class="space-y-6">
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
- <DatabaseIcon class="text-primary size-5" />
+ <InfoIcon class="text-primary size-5" />
{m.volumes_details_title()}
</Card.Title>
<Card.Description>{m.volumes_details_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
- <div class="grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-2 lg:grid-cols-3">
+ <Card.Content class="p-4">
+ <div class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-6">
<div class="flex items-start gap-3">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-500/10 p-2">
<DatabaseIcon class="size-5 text-gray-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_name()}</p>
- <p class="mt-1 break-words text-base font-semibold">{volume.name}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold break-all select-all sm:text-base" title="Click to select">{volume.name}</p>
</div>
</div>
@@ -136,7 +136,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_driver()}</p>
- <p class="mt-1 text-base font-semibold">{volume.driver}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">{volume.driver}</p>
</div>
</div>
@@ -146,7 +146,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_created()}</p>
- <p class="mt-1 text-base font-semibold">{createdDate}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold select-all sm:text-base" title="Click to select">{createdDate}</p>
</div>
</div>
@@ -156,7 +156,7 @@
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_scope()}</p>
- <p class="mt-1 text-base font-semibold capitalize">{volume.scope}</p>
+ <p class="mt-1 cursor-pointer text-sm font-semibold capitalize select-all sm:text-base" title="Click to select">{volume.scope}</p>
</div>
</div>
@@ -176,13 +176,13 @@
</div>
</div>
- <div class="col-span-1 flex items-start gap-3 sm:col-span-2 lg:col-span-3">
+ <div class="col-span-1 flex items-start gap-3 sm:col-span-2 lg:col-span-3 xl:col-span-4 2xl:col-span-6">
<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-teal-500/10 p-2">
<LayersIcon class="size-5 text-teal-500" />
</div>
<div class="min-w-0 flex-1">
<p class="text-muted-foreground text-sm font-medium">{m.common_mountpoint()}</p>
- <div class="bg-muted/50 mt-2 rounded-lg border p-3">
+ <div class="bg-muted/50 mt-2 rounded-lg border p-3 cursor-pointer select-all" title="Click to select">
<code class="break-all font-mono text-sm">{volume.mountpoint}</code>
</div>
</div>
@@ -191,15 +191,15 @@
</Card.Content>
</Card.Root>
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
- <HardDriveIcon class="text-primary size-5" />
+ <ContainerIcon class="text-primary size-5" />
{m.volumes_containers_using_title()}
</Card.Title>
<Card.Description>{m.volumes_containers_using_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
{#if containersDetailed.length > 0}
<div class="bg-card divide-y rounded-lg border">
{#each containersDetailed as c (c.id)}
@@ -211,7 +211,7 @@
</a>
</div>
<div class="w-full pl-0 sm:w-2/3 sm:pl-4">
- <code class="bg-muted text-muted-foreground break-all rounded px-1.5 py-0.5 font-mono text-xs sm:text-sm">
+ <code class="bg-muted text-muted-foreground break-all rounded px-1.5 py-0.5 font-mono text-xs sm:text-sm cursor-pointer select-all" title="Click to select">
{truncateString(c.id, 48)}
</code>
</div>
@@ -235,22 +235,22 @@
</Card.Root>
{#if volume.labels && Object.keys(volume.labels).length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<TagIcon class="text-primary size-5" />
{m.common_labels()}
</Card.Title>
<Card.Description>{m.volumes_labels_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
<div class="bg-card divide-y rounded-lg border">
{#each Object.entries(volume.labels) as [key, value] (key)}
<div class="flex flex-col p-3 sm:flex-row">
<div class="text-muted-foreground mb-2 w-full break-all font-medium sm:mb-0 sm:w-1/3">
{key}
</div>
- <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm">
+ <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm cursor-pointer select-all" title="Click to select">
{value}
</div>
</div>
@@ -261,22 +261,22 @@
{/if}
{#if volume.options && Object.keys(volume.options).length > 0}
- <Card.Root class="border shadow-sm">
- <Card.Header class="pb-0">
+ <Card.Root class="pt-0">
+ <Card.Header class="bg-muted rounded-t-xl p-4">
<Card.Title class="flex items-center gap-2 text-lg">
<HardDriveIcon class="text-primary size-5" />
{m.common_driver_options()}
</Card.Title>
<Card.Description>{m.volumes_driver_options_description()}</Card.Description>
</Card.Header>
- <Card.Content class="pt-6">
+ <Card.Content class="p-4">
<div class="bg-card divide-y rounded-lg border">
{#each Object.entries(volume.options) as [key, value] (key)}
<div class="flex flex-col p-3 sm:flex-row">
<div class="text-muted-foreground mb-2 w-full break-all font-medium sm:mb-0 sm:w-1/3">
{key}
</div>
- <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm">
+ <div class="bg-muted/50 w-full break-all rounded p-2 font-mono text-xs sm:w-2/3 sm:text-sm cursor-pointer select-all" title="Click to select">
{value}
</div>
</div>