From 04791770de355874ba8e30d3059896aa84798767 Mon Sep 17 00:00:00 2001 From: Gabriel20xx Date: Sun, 9 Aug 2026 12:36:38 +0200 Subject: [PATCH] Update shared web UI --- .../web-ui/src/lib/components/AppShell.svelte | 5 ++++- .../web-ui/src/lib/components/AuthPage.svelte | 10 ++++++++-- .../web-ui/src/lib/components/Header.svelte | 16 +++++----------- shared/packages/web-ui/src/lib/styles.css | 19 ++++++++++--------- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/shared/packages/web-ui/src/lib/components/AppShell.svelte b/shared/packages/web-ui/src/lib/components/AppShell.svelte index f168a0b..204b5be 100644 --- a/shared/packages/web-ui/src/lib/components/AppShell.svelte +++ b/shared/packages/web-ui/src/lib/components/AppShell.svelte @@ -11,6 +11,7 @@ children, class: className = '', currentPath = '', + faviconHref = '/favicon.svg', headerActions, navItems = [], onAbout, @@ -29,6 +30,7 @@ children?: Snippet; class?: string; currentPath?: string; + faviconHref?: string; headerActions?: Snippet; navItems?: NavItem[]; onAbout?: () => void | Promise; @@ -51,10 +53,11 @@
item.label.toLowerCase() === 'about')?.href} + aboutHref={aboutHref ?? navItems.find((item) => item.label.toLowerCase() === 'about')?.href ?? '/about'} {brand} {brandHref} {currentPath} + {faviconHref} actions={headerActions} {navItems} {onAbout} diff --git a/shared/packages/web-ui/src/lib/components/AuthPage.svelte b/shared/packages/web-ui/src/lib/components/AuthPage.svelte index b93afdd..6827fb6 100644 --- a/shared/packages/web-ui/src/lib/components/AuthPage.svelte +++ b/shared/packages/web-ui/src/lib/components/AuthPage.svelte @@ -134,13 +134,18 @@
-
+
{brand}
-

{setupRequired ? 'Create your account' : 'Welcome back'}

+ {#if loading} +

Loading...

+ {:else} +

{setupRequired ? 'Create your account' : 'Welcome back'}

+ {/if} + {#if !loading} {#if tagline}

{tagline}

{/if} @@ -268,5 +273,6 @@ {/if} {/if} + {/if}
diff --git a/shared/packages/web-ui/src/lib/components/Header.svelte b/shared/packages/web-ui/src/lib/components/Header.svelte index 3203a63..a45b80c 100644 --- a/shared/packages/web-ui/src/lib/components/Header.svelte +++ b/shared/packages/web-ui/src/lib/components/Header.svelte @@ -5,7 +5,6 @@ BarChart3, Bot, Box, - ChevronDown, CircleAlert, CircleHelp, CircleUserRound, @@ -93,11 +92,11 @@ }; let { - aboutHref, + aboutHref = '/about', brand = 'Application', brandHref = '/', - brandIcon, currentPath = '', + faviconHref = '/favicon.svg', navItems = [], actions, onAbout, @@ -111,8 +110,8 @@ aboutHref?: string; brand?: string; brandHref?: string; - brandIcon?: Snippet; currentPath?: string; + faviconHref?: string; navItems?: NavItem[]; actions?: Snippet; onAbout?: () => void | Promise; @@ -162,11 +161,7 @@
{brand} @@ -207,7 +202,6 @@ >
diff --git a/shared/packages/web-ui/src/lib/styles.css b/shared/packages/web-ui/src/lib/styles.css index 678c57f..ccc8251 100644 --- a/shared/packages/web-ui/src/lib/styles.css +++ b/shared/packages/web-ui/src/lib/styles.css @@ -1,4 +1,4 @@ -@import '../../../design-tokens/theme.css'; +@import "@gabriel20xx/design-tokens/theme.css"; :where(.sc-root, .sc-root *) { box-sizing: border-box; @@ -62,6 +62,7 @@ } .sc-brand-mark { + overflow: hidden; display: grid; width: 2rem; height: 2rem; @@ -73,6 +74,14 @@ font-weight: 800; } +.sc-brand-icon { + width: 100%; + height: 100%; + padding: 0.25rem; + object-fit: contain; + border-radius: inherit; +} + .sc-nav { display: flex; flex: 1 1 auto; @@ -143,14 +152,6 @@ position: relative; } -.sc-profile-chevron { - transition: transform 140ms ease; -} - -.sc-profile-button[aria-expanded="true"] .sc-profile-chevron { - transform: rotate(180deg); -} - .sc-profile-dropdown { position: absolute; top: calc(100% + 0.5rem);