refactor(web-ui): remove automatic page headers
Docker / Docker Build & Push (push) Successful in 3m42s

This commit is contained in:
Gabriel20xx committed 2026-10-08 12:55:54 +00:00
1 parent c7840936a3
commit f7ccb4a173
6 files changed
+2 -106

No files matched your search

@@ -4,7 +4,6 @@
import type { NavItem } from '../types';
import Header from './Header.svelte';
import NotificationStack from './NotificationStack.svelte';
import PageHeader from './PageHeader.svelte';
import { initPrimaryColor, setPrimaryColorUser } from '../primary-color.svelte';
let {
@@ -22,8 +21,6 @@
onNavigate,
onProfile,
onSettings,
pageHeaderActions,
showPageHeader = true,
showSettings = true,
theme = 'dark',
username = '',
@@ -42,19 +39,11 @@
onNavigate?: (item: NavItem) => void;
onProfile?: () => void;
onSettings?: () => void;
pageHeaderActions?: Snippet;
showPageHeader?: boolean;
showSettings?: boolean;
theme?: 'dark' | 'light' | 'system';
username?: string;
} = $props();
const activeNavItem = $derived(
navItems.find((item) =>
item.href === '/' ? currentPath === '/' : currentPath === item.href || currentPath.startsWith(`${item.href}/`),
),
);
$effect(() => {
setPrimaryColorUser(username);
});
@@ -83,14 +72,6 @@
/>
<main class="sc-main">
{#if showPageHeader && activeNavItem?.href !== '/about'}
<PageHeader
title={activeNavItem?.label ?? brand}
description={activeNavItem?.description ??
`Explore the ${activeNavItem?.label?.toLowerCase() ?? 'application'} section.`}
actions={pageHeaderActions}
/>
{/if}
{@render children?.()}
</main>
</div>
@@ -1,35 +0,0 @@
<script lang="ts">
import type { Snippet } from 'svelte';
let {
actions,
children,
description = '',
subtitle = '',
title
}: {
actions?: Snippet;
children?: Snippet;
description?: string;
subtitle?: string;
title: string;
} = $props();
const supportingText = $derived(description || subtitle);
</script>
<div class="sc-page-header">
<div>
<h1>{title}</h1>
{#if supportingText}
<p>{supportingText}</p>
{/if}
{@render children?.()}
</div>
{#if actions}
<div>
{@render actions()}
</div>
{/if}
</div>
-1
View File
@@ -11,7 +11,6 @@ export { default as Metric } from './components/Metric.svelte';
export { default as MediaPlayer } from './components/MediaPlayer.svelte';
export { default as MediaPlayerControls } from './components/MediaPlayerControls.svelte';
export { default as NotificationStack } from './components/NotificationStack.svelte';
export { default as PageHeader } from './components/PageHeader.svelte';
export { default as Pagination } from './components/Pagination.svelte';
export { default as ProfileDialog } from './components/ProfileDialog.svelte';
export { default as PrimaryColorPicker } from './components/PrimaryColorPicker.svelte';
-24
View File
@@ -225,21 +225,6 @@ html[data-wide-layout='true'] .sc-header {
display: none;
}
.sc-page-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1rem;
padding: 1rem 1.25rem;
background: var(--sc-surface);
border: 1px solid var(--sc-border);
border-radius: var(--sc-radius-lg);
box-shadow: var(--sc-shadow-sm);
}
.sc-page-header h1,
.sc-page-header h2,
.sc-dialog-title,
.sc-auth-card h1 {
margin: 0;
@@ -248,11 +233,6 @@ html[data-wide-layout='true'] .sc-header {
letter-spacing: -0.025em;
}
.sc-page-header h1 {
font-size: clamp(1.5rem, 3vw, 2.25rem);
}
.sc-page-header p,
.sc-dialog-description,
.sc-auth-subtitle,
.sc-muted {
@@ -1293,8 +1273,4 @@ html[data-wide-layout='true'] .sc-header {
width: min(100% - 1.25rem, 90rem);
padding-top: 1.25rem;
}
.sc-page-header {
flex-direction: column;
}
}