From 75ac91eecca720c4d4962fc33d3266b8258407ef Mon Sep 17 00:00:00 2001 From: TheOnlyMace <0815cracky@gmail.com> Date: Wed, 22 Jul 2026 19:44:55 +0200 Subject: [PATCH] Add new features and enhancements to the WebUI and dashboard components - Updated package.json to include new dependencies: `@radix-ui/react-dialog` and `cmdk`. - Enhanced global styles in globals.css for improved visual depth in dark mode. - Refactored dashboard page components to improve layout and accessibility, including new icons and responsive design adjustments. - Implemented suspense handling in commands page for better loading states. - Improved sidebar navigation with new icons and mobile responsiveness. - Added FieldAnchor components across various forms for better accessibility and structure. - Enhanced commands manager with search parameter handling for improved user experience. - Updated multiple module forms to include FieldAnchor for consistent layout and accessibility. --- apps/webui/package.json | 2 + .../app/dashboard/[guildId]/commands/page.tsx | 5 +- .../src/app/dashboard/[guildId]/page.tsx | 138 ++- apps/webui/src/app/globals.css | 7 + .../layout/dashboard-command-palette.tsx | 176 ++++ .../src/components/layout/dashboard-shell.tsx | 47 +- .../src/components/layout/field-anchor.tsx | 47 + apps/webui/src/components/layout/sidebar.tsx | 130 ++- .../src/components/modules/automod-form.tsx | 45 +- .../src/components/modules/birthdays-form.tsx | 11 + .../src/components/modules/cases-table.tsx | 3 + .../components/modules/commands-manager.tsx | 51 +- .../src/components/modules/economy-form.tsx | 19 + .../src/components/modules/feeds-manager.tsx | 3 + .../webui/src/components/modules/fun-form.tsx | 5 + .../components/modules/giveaways-manager.tsx | 6 + .../modules/guild-backup-manager.tsx | 3 + .../src/components/modules/leveling-form.tsx | 25 + .../src/components/modules/logging-form.tsx | 13 + .../components/modules/moderation-form.tsx | 119 +-- .../components/modules/scheduler-manager.tsx | 3 + .../components/modules/selfroles-manager.tsx | 6 + .../src/components/modules/starboard-form.tsx | 13 + .../src/components/modules/stats-form.tsx | 9 + .../modules/suggestions-config-form.tsx | 11 + .../modules/suggestions-list-manager.tsx | 3 + .../src/components/modules/tags-manager.tsx | 6 + .../src/components/modules/tempvoice-form.tsx | 11 + .../modules/ticket-categories-manager.tsx | 3 + .../components/modules/ticket-config-form.tsx | 15 + .../components/modules/verification-form.tsx | 15 + .../src/components/modules/welcome-form.tsx | 29 + .../src/components/owner/owner-shell.tsx | 40 +- .../src/components/owner/owner-sidebar.tsx | 41 +- .../components/settings/access-rules-form.tsx | 122 +-- .../settings/general-settings-form.tsx | 107 ++- apps/webui/src/components/ui/command.tsx | 135 +++ apps/webui/src/components/ui/dialog.tsx | 90 ++ apps/webui/src/components/ui/sheet.tsx | 59 ++ .../src/lib/dashboard-search-index.test.ts | 53 ++ apps/webui/src/lib/dashboard-search-index.ts | 847 ++++++++++++++++++ apps/webui/src/messages/de.json | 11 + apps/webui/src/messages/en.json | 11 + docs/PHASE-TRACKING.md | 21 + landingpage/assets/style.css | 179 +++- landingpage/includes/layout.php | 3 + landingpage/index.php | 13 +- landingpage/lang/de.php | 1 + landingpage/lang/en.php | 1 + 49 files changed, 2393 insertions(+), 320 deletions(-) create mode 100644 apps/webui/src/components/layout/dashboard-command-palette.tsx create mode 100644 apps/webui/src/components/layout/field-anchor.tsx create mode 100644 apps/webui/src/components/ui/command.tsx create mode 100644 apps/webui/src/components/ui/dialog.tsx create mode 100644 apps/webui/src/components/ui/sheet.tsx create mode 100644 apps/webui/src/lib/dashboard-search-index.test.ts create mode 100644 apps/webui/src/lib/dashboard-search-index.ts diff --git a/apps/webui/package.json b/apps/webui/package.json index d2486ad..278a552 100644 --- a/apps/webui/package.json +++ b/apps/webui/package.json @@ -15,6 +15,7 @@ "@nexumi/shared": "workspace:^", "@prisma/client": "^5.22.0", "@radix-ui/react-avatar": "^1.2.3", + "@radix-ui/react-dialog": "^1.1.20", "@radix-ui/react-dropdown-menu": "^2.1.21", "@radix-ui/react-label": "^2.1.12", "@radix-ui/react-select": "^2.3.4", @@ -24,6 +25,7 @@ "bullmq": "^5.34.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "cmdk": "^1.1.1", "dotenv": "^16.4.7", "ioredis": "^5.4.2", "lucide-react": "^1.25.0", diff --git a/apps/webui/src/app/dashboard/[guildId]/commands/page.tsx b/apps/webui/src/app/dashboard/[guildId]/commands/page.tsx index 4362d01..e6bcfaa 100644 --- a/apps/webui/src/app/dashboard/[guildId]/commands/page.tsx +++ b/apps/webui/src/app/dashboard/[guildId]/commands/page.tsx @@ -1,3 +1,4 @@ +import { Suspense } from 'react'; import { CommandsManager } from '@/components/modules/commands-manager'; import { getLocale, t } from '@/lib/i18n'; import { listCommandOverridesDashboard } from '@/lib/module-configs/commands'; @@ -16,7 +17,9 @@ export default async function CommandsPage({ params }: CommandsPageProps) {
{t(locale, 'modulePages.commands.description')}
-+ {t(locale, 'dashboard.overview.activityHint')} +
+{t(locale, 'dashboard.overview.activityMessages')}
-{activitySummary.messageCount.toLocaleString(locale === 'de' ? 'de-DE' : 'en-US')}
++ {t(locale, 'dashboard.overview.activityMessages')} +
++ {activitySummary.messageCount.toLocaleString(numberLocale)} +
+{t(locale, 'dashboard.overview.activityVoiceMinutes')}
-{activitySummary.voiceMinutes.toLocaleString(locale === 'de' ? 'de-DE' : 'en-US')}
++ {t(locale, 'dashboard.overview.activityVoiceMinutes')} +
++ {activitySummary.voiceMinutes.toLocaleString(numberLocale)} +
+{t(locale, 'dashboard.overview.activityActiveUsers')}
-{activitySummary.activeUserCount.toLocaleString(locale === 'de' ? 'de-DE' : 'en-US')}
++ {t(locale, 'dashboard.overview.activityActiveUsers')} +
++ {activitySummary.activeUserCount.toLocaleString(numberLocale)} +
+{t(locale, 'dashboard.overview.activityHint')}
+ {enabledCount}/{modules.length} {t(locale, 'common.enabled').toLowerCase()} +
+ ) : null} +{t(locale, 'dashboard.overview.moduleStatusEmpty')}
+{t(locale, 'dashboard.overview.auditEmpty')}
++ {t(locale, 'dashboard.overview.auditEmpty')} +
) : ({entry.action}
- {entry.path &&{entry.path}
} + {entry.path ?{entry.path}
: null}{t('modulePages.feeds.addFeed')}
{t('modulePages.leveling.multiplierHint')}
{t('modulePages.leveling.multiplierHint')}
{t('modulePages.logging.idsHint')}
{t('modulePages.logging.idsHint')}
{t('modulePages.logging.retentionHint')}
{t('modulePages.moderation.enabledHint')}
+{t('modulePages.moderation.enabledHint')}
+{t('modulePages.moderation.noEscalations')}
- )} - {value.escalations.map((rule) => ( -{t('modulePages.moderation.noEscalations')}
+ )} + {value.escalations.map((rule) => ( +{t('modulePages.tempvoice.defaultLimitHint')}
{t('modulePages.welcome.placeholdersHint')}
+
{t('owner.nav.title')}
- {LINKS.map((link) => { + {OWNER_LINKS.map((link) => { const active = link.href === '/owner' ? pathname === '/owner' : pathname.startsWith(link.href); const Icon = link.icon; return ( -{t('access.roleIdHint')}
+{t('access.roleIdHint')}
-{t('access.noRules')}
} + {value.length === 0 && ( + <> +{t('access.noRules')}
+{t('settings.general.localeHint')}
-{t('settings.general.timezoneHint')}
-{t('settings.general.moderationHint')}
+{t('settings.general.localeHint')}
{t('settings.general.snipeHint')}
+{t('settings.general.timezoneHint')}
{t('settings.general.moderationHint')}
+{t('settings.general.snipeHint')}
+= h(t($messages, 'landing.subtitle')) ?>
+= h(t($messages, 'landing.headline')) ?>
+= h(t($messages, 'landing.subtitle')) ?>
= h(t($messages, 'landing.stats_guilds')) ?>
= h($formatNumber($guildCount)) ?>
= h(t($messages, 'landing.stats_users')) ?>
= h($formatNumber($userCount)) ?>
= h($module['label']) ?>
= h($module['description']) ?>