From f10408be22e70ba799e8026d8af91497b0edf0dc Mon Sep 17 00:00:00 2001 From: Maurus Decimus <11444311+mdecimus@users.noreply.github.com> Date: Fri, 30 Oct 2026 17:26:45 +0100 Subject: [PATCH] v2.0.4 --- CHANGELOG.md | 12 + index.html | 1 + package-lock.json | 34 +- package.json | 5 +- src/components/bootstrap/BootstrapScreens.tsx | 65 ++-- src/components/bootstrap/BootstrapWizard.tsx | 85 +++-- src/components/common/CommandPalette.tsx | 12 +- src/components/common/EnterpriseUpsell.tsx | 9 +- src/components/common/FloatingActionBar.tsx | 29 ++ src/components/common/HelpTooltip.tsx | 2 +- src/components/common/LoadingFallback.tsx | 11 +- src/components/common/Markdown.tsx | 2 +- src/components/common/ObjectPicker.tsx | 16 +- src/components/common/ObjectSearchPopover.tsx | 56 ++- .../expression/ExpressionEditor.tsx | 28 +- src/components/forms/CreatedValuesDialog.tsx | 10 +- src/components/forms/DynamicForm.tsx | 222 +++++++++--- src/components/forms/FieldRow.tsx | 61 ++-- src/components/forms/FormSections.tsx | 35 +- src/components/forms/SievepadButton.tsx | 6 +- src/components/forms/VariantSelect.tsx | 149 +++++++- src/components/forms/formContext.ts | 6 + src/components/forms/widgets/BlobWidget.tsx | 7 +- .../forms/widgets/BufferedInputs.tsx | 1 + .../forms/widgets/DateTimeWidget.tsx | 14 +- .../forms/widgets/EmbeddedObjectWidget.tsx | 74 ++-- src/components/forms/widgets/EnumWidgets.tsx | 21 +- src/components/forms/widgets/MapWidget.tsx | 194 ++++++---- .../forms/widgets/NumberWidgets.tsx | 2 +- .../forms/widgets/ObjectIdWidgets.tsx | 117 +++--- .../forms/widgets/ObjectListWidget.tsx | 121 +++++-- src/components/forms/widgets/OtpAuthField.tsx | 26 +- src/components/forms/widgets/RateWidget.tsx | 10 +- .../forms/widgets/RemovablePill.tsx | 8 +- src/components/forms/widgets/SetWidget.tsx | 7 +- .../forms/widgets/StringWidgets.tsx | 15 +- .../forms/widgets/UnsupportedWidget.tsx | 2 +- src/components/forms/widgets/registry.ts | 45 +-- src/components/layout/ErrorBoundary.tsx | 12 +- src/components/layout/MainContent.tsx | 4 +- src/components/layout/Sidebar.tsx | 71 ++-- src/components/layout/TopBar.tsx | 14 +- src/components/lists/ColumnHeader.tsx | 11 +- src/components/lists/DynamicList.tsx | 178 ++++----- src/components/lists/FilterBar.tsx | 50 ++- src/components/lists/FilterFields.tsx | 4 +- src/components/lists/ListStates.tsx | 17 +- src/components/lists/ListTable.tsx | 207 +++++------ src/components/lists/MassActionBar.tsx | 65 ++-- src/components/lists/Pagination.tsx | 11 +- src/components/lists/RowActions.tsx | 11 +- src/components/lists/SelectionBanner.tsx | 13 +- src/components/ui/alert-dialog.tsx | 6 +- src/components/ui/badge.tsx | 10 +- src/components/ui/button.tsx | 24 +- src/components/ui/calendar.tsx | 5 +- src/components/ui/card.tsx | 14 +- src/components/ui/chart.tsx | 12 +- src/components/ui/checkbox.tsx | 4 +- src/components/ui/combobox.tsx | 4 +- src/components/ui/command.tsx | 4 +- src/components/ui/dialog.tsx | 8 +- src/components/ui/dropdown-menu.tsx | 12 +- src/components/ui/input.tsx | 12 +- src/components/ui/popover.tsx | 2 +- src/components/ui/select.tsx | 16 +- src/components/ui/switch.tsx | 4 +- src/components/ui/tabs.tsx | 4 +- src/components/ui/textarea.tsx | 9 +- src/components/ui/toast.tsx | 14 +- src/components/ui/tooltip.tsx | 2 +- src/components/values/FieldValue.tsx | 17 +- src/components/values/ScalarValues.tsx | 25 +- src/components/views/DynamicView.tsx | 46 +-- src/components/views/DynamicViewPage.tsx | 27 +- src/features/actions/ActionPage.tsx | 4 +- .../actions/components/ActionForm.tsx | 66 ++-- .../actions/components/ActionPicker.tsx | 25 +- .../actions/components/ActionResult.tsx | 36 +- .../components/ChartSizedContainer.tsx | 26 +- .../dashboard/components/DashboardChart.tsx | 87 +++-- .../dashboard/components/DashboardView.tsx | 118 ++++-- .../dashboard/components/HeadlineTile.tsx | 46 +++ .../dashboard/components/NodeSelector.tsx | 4 +- .../dashboard/components/PeriodSelector.tsx | 11 +- .../dashboard/components/RankingTile.tsx | 62 ++++ .../dashboard/components/StatCard.tsx | 117 +++--- .../dashboard/components/TileHeader.tsx | 34 ++ src/features/dashboard/components/tone.ts | 72 ++++ src/features/dashboard/helpers.ts | 119 ++++-- src/features/dashboard/types/schema.ts | 37 ++ .../tracing/components/LiveTracingForm.tsx | 26 +- .../tracing/components/LiveTracingSession.tsx | 45 ++- .../tracing/components/TraceDetailView.tsx | 10 +- .../tracing/components/TraceSummaryCards.tsx | 20 +- .../tracing/components/TraceTimeline.tsx | 38 +- .../tracing/components/TraceValue.tsx | 17 +- .../components/DeliveryTraceForm.tsx | 18 +- .../components/DeliveryTraceResult.tsx | 48 +-- .../troubleshoot/components/StageRow.tsx | 72 ++-- src/i18n/en.json | 3 + src/index.css | 339 ++++++++++++++---- src/lib/utils.ts | 11 +- src/pages/AdminPanel.tsx | 4 +- src/pages/LoginPage.tsx | 94 ++--- src/pages/NotFound.tsx | 19 +- src/pages/OAuthCallback.tsx | 15 +- src/services/auth/oauth.ts | 16 +- vite.config.ts | 17 +- 109 files changed, 2750 insertions(+), 1395 deletions(-) create mode 100644 src/components/common/FloatingActionBar.tsx create mode 100644 src/features/dashboard/components/HeadlineTile.tsx create mode 100644 src/features/dashboard/components/RankingTile.tsx create mode 100644 src/features/dashboard/components/TileHeader.tsx create mode 100644 src/features/dashboard/components/tone.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b2a2a1..3185f95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.4] - Unreleased + +### Added +- New WebUI design with more pizzazz: + - Cleaner generated forms: two-column fields that stack on mobile, simpler nested objects, collapsible list items, segmented variant pickers, a section index on wide screens and a floating save bar. + - Dashboards support a layout with stat, chart, headline and ranking tiles, plus column and row spans, tones and delta polarity, all defined in the schema. +- Custom OAuth scopes can be requested through the `oauth-scopes` meta tag; they are added to the scopes required by the server. + +### Changed + +### Fixed + ## [2.0.3] - 2026-10-29 ### Added diff --git a/index.html b/index.html index c5a0dfd..5d7acc9 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ + Portal diff --git a/package-lock.json b/package-lock.json index cf2b24c..f62738b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,17 @@ { "name": "stalwart-webui", - "version": "2.0.3", + "version": "2.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "stalwart-webui", - "version": "2.0.3", + "version": "2.0.4", "dependencies": { "@daypicker/react": "^10.0.2", + "@fontsource-variable/inter": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", + "@fontsource-variable/plus-jakarta-sans": "^5.3.0", "@noble/hashes": "^2.4.0", "@radix-ui/react-alert-dialog": "^1.2.1", "@radix-ui/react-checkbox": "^1.4.1", @@ -584,6 +587,33 @@ "integrity": "sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==", "license": "MIT" }, + "node_modules/@fontsource-variable/inter": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.3.0.tgz", + "integrity": "sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/jetbrains-mono": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@fontsource-variable/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz", + "integrity": "sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/plus-jakarta-sans": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@fontsource-variable/plus-jakarta-sans/-/plus-jakarta-sans-5.3.0.tgz", + "integrity": "sha512-/l/4r0yyWK9JzAlmA0LiYgGgmJe/Gswt4jTJEzr5QhJfwMbvJZDmYWyW0M4X7yCK69BajMVlV/Lx8g7WDc1+sw==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, "node_modules/@humanfs/core": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", diff --git a/package.json b/package.json index 523f2e9..76b3a4a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stalwart-webui", "private": true, - "version": "2.0.3", + "version": "2.0.4", "stalwart": { "minServerVersion": "1.0.0" }, @@ -18,6 +18,9 @@ }, "dependencies": { "@daypicker/react": "^10.0.2", + "@fontsource-variable/inter": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", + "@fontsource-variable/plus-jakarta-sans": "^5.3.0", "@noble/hashes": "^2.4.0", "@radix-ui/react-alert-dialog": "^1.2.1", "@radix-ui/react-checkbox": "^1.4.1", diff --git a/src/components/bootstrap/BootstrapScreens.tsx b/src/components/bootstrap/BootstrapScreens.tsx index 0a18d9f..05d6d6f 100644 --- a/src/components/bootstrap/BootstrapScreens.tsx +++ b/src/components/bootstrap/BootstrapScreens.tsx @@ -7,18 +7,18 @@ import type { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Check } from 'lucide-react'; -import { Card, CardContent } from '@/components/ui/card'; +import { cn } from '@/lib/utils'; import { CopyButton } from '@/components/common/CopyButton'; import { DefaultLogo } from '@/components/common/Logo'; import type { Fields } from '@/types/schema'; export function WizardShell({ children }: { children: ReactNode }) { return ( -
-
+
+
-
+
{children}
@@ -29,15 +29,16 @@ export function ProgressIndicator({ total, current }: { total: number; current: const { t } = useTranslation(); return (
{Array.from({ length: total }, (_, i) => (
))}
@@ -62,14 +63,14 @@ export function SuccessScreen({ const hasCredentials = entries.length > 0; return ( -
-
-
- -
+
+
+ +
-

{t('bootstrap.complete', 'Setup complete')}

-

+

{t('bootstrap.complete', 'Setup complete')}

+

{hasCredentials ? t( 'bootstrap.credentialsCreated', @@ -81,26 +82,26 @@ export function SuccessScreen({

{hasCredentials && ( - - - {entries.map(([key, value]) => { - const field = fields.properties[key]; - const label = labelsByName.get(key) ?? field?.description?.split('\n')[0] ?? key; - return ( -
-
{label}
-
- {value} - -
+
+ {entries.map(([key, value]) => { + const field = fields.properties[key]; + const label = labelsByName.get(key) ?? field?.description?.split('\n')[0] ?? key; + return ( +
+
{label}
+
+ + {value} + +
- ); - })} - - +
+ ); + })} +
)} -
+

{t('bootstrap.nextStepLabel', 'Next step:')}{' '} {t( diff --git a/src/components/bootstrap/BootstrapWizard.tsx b/src/components/bootstrap/BootstrapWizard.tsx index 47b333a..08154ed 100644 --- a/src/components/bootstrap/BootstrapWizard.tsx +++ b/src/components/bootstrap/BootstrapWizard.tsx @@ -8,7 +8,7 @@ import { useCallback, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; -import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { cn } from '@/lib/utils'; import { ArrowLeft, ArrowRight, Loader2, Rocket } from 'lucide-react'; import { useSchemaStore } from '@/stores/schemaStore'; @@ -208,8 +208,8 @@ export function BootstrapWizard() { if (!schema || !resolved) { return ( -

- +
+
@@ -219,8 +219,8 @@ export function BootstrapWizard() { if (loading) { return ( -
- +
+
@@ -230,7 +230,7 @@ export function BootstrapWizard() { if (loadError) { return ( -
+

{loadError}

@@ -262,7 +262,7 @@ export function BootstrapWizard() { if (sections.length === 0) { return ( -
+
{t('bootstrap.emptyForm', 'Setup form is empty. The server did not return any bootstrap fields.')}
@@ -273,52 +273,47 @@ export function BootstrapWizard() { return ( -
-
-

{t('bootstrap.welcome', 'Welcome to Stalwart')}

-

- {t('bootstrap.welcomeSubtitle', "Let's get your server set up.")} -

+
+
+
+

{t('bootstrap.welcome', 'Welcome to Stalwart')}

+

+ {t('bootstrap.welcomeSubtitle', "Let's get your server set up.")} +

+
+
- - {generalError && ( -
-

{generalError}

+
+

{generalError}

)} - - {current.title && ( - - {current.title} - - )} - -
- - {current.fields.map(({ formField, field }) => ( - handleFieldChange(formField.name, v)} - error={fieldErrors[formField.name]} - /> - ))} - -
-
-
+
+ {current.title &&

{current.title}

} +
+ + {current.fields.map(({ formField, field }) => ( + handleFieldChange(formField.name, v)} + error={fieldErrors[formField.name]} + /> + ))} + +
+
-
+
-
+
{t('bootstrap.stepOf', 'Step {{current}} of {{total}}', { current: currentPage + 1, total: sections.length, @@ -326,13 +321,13 @@ export function BootstrapWizard() {
{isLastPage ? ( ) : ( )}
diff --git a/src/components/common/CommandPalette.tsx b/src/components/common/CommandPalette.tsx index 71ef05b..b22d144 100644 --- a/src/components/common/CommandPalette.tsx +++ b/src/components/common/CommandPalette.tsx @@ -50,7 +50,7 @@ export function CommandPalette({ open, onOpenChange }: CommandPaletteProps) {