refactor(web-ui): remove automatic page headers
Docker / Docker Build & Push (push) Successful in 3m42s
Docker / Docker Build & Push (push) Successful in 3m42s
This commit is contained in:
1 parent
c7840936a3
commit
f7ccb4a173
6 files changed
+2
-106
No files matched your search
+2
-3
@@ -29,12 +29,12 @@ The single source of truth for code reused across every project in this workspac
|
|||||||
|
|
||||||
### Public `web-ui` components
|
### Public `web-ui` components
|
||||||
|
|
||||||
These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (23 components):
|
These are the complete Svelte component exports from `packages/web-ui/src/lib/index.ts` (22 components):
|
||||||
|
|
||||||
| Component | Includes |
|
| Component | Includes |
|
||||||
|---|---|
|
|---|---|
|
||||||
| `AboutDialog` | About modal with application branding, description, version, links, and custom content. |
|
| `AboutDialog` | About modal with application branding, description, version, links, and custom content. |
|
||||||
| `AppShell` | Application layout that composes the header, page header, notification stack, theme, and primary-color handling. |
|
| `AppShell` | Application layout that composes the header, notification stack, theme, and primary-color handling. |
|
||||||
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
|
| `AuthPage` | Login, first-time setup, password-reset, and optional TOTP authentication flows. |
|
||||||
| `Badge` | Small inline label with default, primary, success, warning, and danger variants. |
|
| `Badge` | Small inline label with default, primary, success, warning, and danger variants. |
|
||||||
| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. |
|
| `Button` | Button with primary, secondary, outline, ghost, and danger variants; multiple sizes and full-width mode. |
|
||||||
@@ -46,7 +46,6 @@ These are the complete Svelte component exports from `packages/web-ui/src/lib/in
|
|||||||
| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. |
|
| `MediaPlayerControls` | Reusable media controls for playback, seeking, volume, quality, fullscreen, optional graph toggling, and custom end controls. |
|
||||||
| `Metric` | Labeled metric/value display with optional detail and semantic variants. |
|
| `Metric` | Labeled metric/value display with optional detail and semantic variants. |
|
||||||
| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. |
|
| `NotificationStack` | Global stack of dismissible success, error, warning, and informational notifications. |
|
||||||
| `PageHeader` | Page title with optional subtitle/description, child content, and action area. |
|
|
||||||
| `Pagination` | Page navigation and page-size selection with total/item counts. |
|
| `Pagination` | Page navigation and page-size selection with total/item counts. |
|
||||||
| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. |
|
| `PrimaryColorPicker` | Per-project primary-color selector backed by the shared color persistence helpers. |
|
||||||
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
|
| `ProfileDialog` | Profile username/email/password editing and TOTP settings. |
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
import type { NavItem } from '../types';
|
import type { NavItem } from '../types';
|
||||||
import Header from './Header.svelte';
|
import Header from './Header.svelte';
|
||||||
import NotificationStack from './NotificationStack.svelte';
|
import NotificationStack from './NotificationStack.svelte';
|
||||||
import PageHeader from './PageHeader.svelte';
|
|
||||||
import { initPrimaryColor, setPrimaryColorUser } from '../primary-color.svelte';
|
import { initPrimaryColor, setPrimaryColorUser } from '../primary-color.svelte';
|
||||||
|
|
||||||
let {
|
let {
|
||||||
@@ -22,8 +21,6 @@
|
|||||||
onNavigate,
|
onNavigate,
|
||||||
onProfile,
|
onProfile,
|
||||||
onSettings,
|
onSettings,
|
||||||
pageHeaderActions,
|
|
||||||
showPageHeader = true,
|
|
||||||
showSettings = true,
|
showSettings = true,
|
||||||
theme = 'dark',
|
theme = 'dark',
|
||||||
username = '',
|
username = '',
|
||||||
@@ -42,19 +39,11 @@
|
|||||||
onNavigate?: (item: NavItem) => void;
|
onNavigate?: (item: NavItem) => void;
|
||||||
onProfile?: () => void;
|
onProfile?: () => void;
|
||||||
onSettings?: () => void;
|
onSettings?: () => void;
|
||||||
pageHeaderActions?: Snippet;
|
|
||||||
showPageHeader?: boolean;
|
|
||||||
showSettings?: boolean;
|
showSettings?: boolean;
|
||||||
theme?: 'dark' | 'light' | 'system';
|
theme?: 'dark' | 'light' | 'system';
|
||||||
username?: string;
|
username?: string;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
const activeNavItem = $derived(
|
|
||||||
navItems.find((item) =>
|
|
||||||
item.href === '/' ? currentPath === '/' : currentPath === item.href || currentPath.startsWith(`${item.href}/`),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
setPrimaryColorUser(username);
|
setPrimaryColorUser(username);
|
||||||
});
|
});
|
||||||
@@ -83,14 +72,6 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<main class="sc-main">
|
<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?.()}
|
{@render children?.()}
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</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>
|
|
||||||
@@ -11,7 +11,6 @@ export { default as Metric } from './components/Metric.svelte';
|
|||||||
export { default as MediaPlayer } from './components/MediaPlayer.svelte';
|
export { default as MediaPlayer } from './components/MediaPlayer.svelte';
|
||||||
export { default as MediaPlayerControls } from './components/MediaPlayerControls.svelte';
|
export { default as MediaPlayerControls } from './components/MediaPlayerControls.svelte';
|
||||||
export { default as NotificationStack } from './components/NotificationStack.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 Pagination } from './components/Pagination.svelte';
|
||||||
export { default as ProfileDialog } from './components/ProfileDialog.svelte';
|
export { default as ProfileDialog } from './components/ProfileDialog.svelte';
|
||||||
export { default as PrimaryColorPicker } from './components/PrimaryColorPicker.svelte';
|
export { default as PrimaryColorPicker } from './components/PrimaryColorPicker.svelte';
|
||||||
|
|||||||
@@ -225,21 +225,6 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
display: none;
|
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-dialog-title,
|
||||||
.sc-auth-card h1 {
|
.sc-auth-card h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -248,11 +233,6 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sc-page-header h1 {
|
|
||||||
font-size: clamp(1.5rem, 3vw, 2.25rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sc-page-header p,
|
|
||||||
.sc-dialog-description,
|
.sc-dialog-description,
|
||||||
.sc-auth-subtitle,
|
.sc-auth-subtitle,
|
||||||
.sc-muted {
|
.sc-muted {
|
||||||
@@ -1293,8 +1273,4 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
width: min(100% - 1.25rem, 90rem);
|
width: min(100% - 1.25rem, 90rem);
|
||||||
padding-top: 1.25rem;
|
padding-top: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sc-page-header {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -225,21 +225,6 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
display: none;
|
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-dialog-title,
|
||||||
.sc-auth-card h1 {
|
.sc-auth-card h1 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -248,11 +233,6 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
letter-spacing: -0.025em;
|
letter-spacing: -0.025em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sc-page-header h1 {
|
|
||||||
font-size: clamp(1.5rem, 3vw, 2.25rem);
|
|
||||||
}
|
|
||||||
|
|
||||||
.sc-page-header p,
|
|
||||||
.sc-dialog-description,
|
.sc-dialog-description,
|
||||||
.sc-auth-subtitle,
|
.sc-auth-subtitle,
|
||||||
.sc-muted {
|
.sc-muted {
|
||||||
@@ -975,8 +955,4 @@ html[data-wide-layout='true'] .sc-header {
|
|||||||
width: min(100% - 1.25rem, 90rem);
|
width: min(100% - 1.25rem, 90rem);
|
||||||
padding-top: 1.25rem;
|
padding-top: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sc-page-header {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user