From 88013f627fefc3f1ee6063ae030e2684f0062b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Fri, 15 May 2026 16:47:44 +0200 Subject: [PATCH 1/4] display version badge in navbar --- .../components/Navigation/Navigation.tsx | 4 +++ .../shared/components/Navigation/style.scss | 30 +++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/web/src/shared/components/Navigation/Navigation.tsx b/web/src/shared/components/Navigation/Navigation.tsx index 54b90b983..30cf102e8 100644 --- a/web/src/shared/components/Navigation/Navigation.tsx +++ b/web/src/shared/components/Navigation/Navigation.tsx @@ -223,11 +223,15 @@ export const Navigation = () => { })); }, [aliasesCount, destinationsCount, rulesCount]); + const rawVersion = useApp((s) => s.appInfo.version); + const semverVersion = rawVersion ? rawVersion.split('+')[0] : null; + if (!isAdmin || !isOpen) return null; return (
+ {semverVersion && {semverVersion}}
.top { + &>.top { display: flex; flex-flow: row nowrap; align-items: center; @@ -23,7 +23,19 @@ padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) var(--spacing-lg); width: 100%; - & > .control { + &>.version-badge { + display: flex; + justify-content: center; + align-items: center; + margin-left: var(--spacing-md); + font: var(--t-body-xxs-500); + color: var(--fg-neutral); + background-color: var(--bg-emphasis); + border-radius: var(--radius-sm); + padding: 2px var(--spacing-xs); + } + + &>.control { margin-left: auto; .icon[icon-kind='hamburger'] path { @@ -32,7 +44,7 @@ } } - & > .groups { + &>.groups { display: flex; flex-flow: column; row-gap: var(--spacing-lg); @@ -41,7 +53,7 @@ width: 100%; } - & > .bottom { + &>.bottom { width: 100%; margin-top: auto; box-sizing: border-box; @@ -60,7 +72,7 @@ user-select: none; width: 100%; - & > .track { + &>.track { display: flex; flex-flow: row nowrap; align-items: center; @@ -81,7 +93,7 @@ .fold-content { padding-top: var(--spacing-xs); - & > .items { + &>.items { display: flex; flex-flow: column; row-gap: var(--spacing-xs); @@ -118,13 +130,13 @@ --color: var(--fg-action); } - & > .icon path { + &>.icon path { fill: var(--color); @include animate(fill); } - & > span { + &>span { font: var(--t-body-sm-500); color: inherit; } @@ -137,4 +149,4 @@ justify-content: center; row-gap: var(--spacing-xxs); } -} +} \ No newline at end of file From 5c247ecc5c8bce52d44cf7dea00ee03e4642d126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Fri, 15 May 2026 18:40:50 +0200 Subject: [PATCH 2/4] formatting --- .../shared/components/Navigation/style.scss | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/shared/components/Navigation/style.scss b/web/src/shared/components/Navigation/style.scss index 897fe35f7..090cad52f 100644 --- a/web/src/shared/components/Navigation/style.scss +++ b/web/src/shared/components/Navigation/style.scss @@ -14,7 +14,7 @@ justify-content: flex-start; min-height: 100dvh; - &>.top { + & > .top { display: flex; flex-flow: row nowrap; align-items: center; @@ -23,7 +23,7 @@ padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) var(--spacing-lg); width: 100%; - &>.version-badge { + & > .version-badge { display: flex; justify-content: center; align-items: center; @@ -35,7 +35,7 @@ padding: 2px var(--spacing-xs); } - &>.control { + & > .control { margin-left: auto; .icon[icon-kind='hamburger'] path { @@ -44,7 +44,7 @@ } } - &>.groups { + & > .groups { display: flex; flex-flow: column; row-gap: var(--spacing-lg); @@ -53,7 +53,7 @@ width: 100%; } - &>.bottom { + & > .bottom { width: 100%; margin-top: auto; box-sizing: border-box; @@ -72,7 +72,7 @@ user-select: none; width: 100%; - &>.track { + & > .track { display: flex; flex-flow: row nowrap; align-items: center; @@ -93,7 +93,7 @@ .fold-content { padding-top: var(--spacing-xs); - &>.items { + & > .items { display: flex; flex-flow: column; row-gap: var(--spacing-xs); @@ -130,13 +130,13 @@ --color: var(--fg-action); } - &>.icon path { + & > .icon path { fill: var(--color); @include animate(fill); } - &>span { + & > span { font: var(--t-body-sm-500); color: inherit; } @@ -149,4 +149,4 @@ justify-content: center; row-gap: var(--spacing-xxs); } -} \ No newline at end of file +} From 6d00d31e236382a13f970bd98b1bc6a089d7f34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Fri, 15 May 2026 20:36:38 +0200 Subject: [PATCH 3/4] use a monospace font --- web/src/shared/components/Navigation/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/shared/components/Navigation/style.scss b/web/src/shared/components/Navigation/style.scss index 090cad52f..f02cb800c 100644 --- a/web/src/shared/components/Navigation/style.scss +++ b/web/src/shared/components/Navigation/style.scss @@ -29,6 +29,7 @@ align-items: center; margin-left: var(--spacing-md); font: var(--t-body-xxs-500); + font-family: var(--font-family-jetbrains); color: var(--fg-neutral); background-color: var(--bg-emphasis); border-radius: var(--radius-sm); From eee3cc3f590fd4399e048c56d6a7fa2c33adb01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Fri, 15 May 2026 23:14:35 +0200 Subject: [PATCH 4/4] make version typing more explicit --- web/src/shared/api/types.ts | 2 +- web/src/shared/hooks/useApp.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/shared/api/types.ts b/web/src/shared/api/types.ts index b3a4a1554..3aa00ffcf 100644 --- a/web/src/shared/api/types.ts +++ b/web/src/shared/api/types.ts @@ -487,7 +487,7 @@ export interface LdapInfo { } export interface ApplicationInfo { - version: string; + version: string | null; network_present: boolean; smtp_enabled: boolean; external_openid_enabled: boolean; diff --git a/web/src/shared/hooks/useApp.tsx b/web/src/shared/hooks/useApp.tsx index 8863d4c00..ad8c6bb03 100644 --- a/web/src/shared/hooks/useApp.tsx +++ b/web/src/shared/hooks/useApp.tsx @@ -20,7 +20,7 @@ const defaults: StoreValues = { }, network_present: false, smtp_enabled: false, - version: '', + version: null, }, settingsEssentials: undefined, wizardState: undefined,