From 2124238751df5354e312fb8fa3dbe8f7c131b9b0 Mon Sep 17 00:00:00 2001 From: yiling Date: Wed, 10 Jun 2026 09:35:15 +0800 Subject: [PATCH] fix(webui): address various UI issues in signup, settings, and sidebar --- packages/webui/components/folder-tree.tsx | 2 +- packages/webui/routes/__root.tsx | 26 ++- packages/webui/routes/signup.tsx | 2 +- .../webui/routes/teams/$teamId/settings.tsx | 162 +++++++++--------- 4 files changed, 97 insertions(+), 95 deletions(-) diff --git a/packages/webui/components/folder-tree.tsx b/packages/webui/components/folder-tree.tsx index fa37c92e..00c8e46d 100644 --- a/packages/webui/components/folder-tree.tsx +++ b/packages/webui/components/folder-tree.tsx @@ -531,7 +531,7 @@ export function FolderTree({ {!hideShares && (
diff --git a/packages/webui/routes/__root.tsx b/packages/webui/routes/__root.tsx index ca31d281..62a916b7 100644 --- a/packages/webui/routes/__root.tsx +++ b/packages/webui/routes/__root.tsx @@ -5,7 +5,6 @@ import { TopNav } from '@/ui/components/top-nav' import { HomeIcon, NotificationFillIcon, UploadCloudIcon } from '@/ui/components/ui/icons' import { Toaster } from '@/ui/components/ui/sonner' import { UploadTasks } from '@/ui/components/upload-tasks' -import { usePermissions } from '@/ui/hooks/use-permissions' import { useAuthStore } from '@/ui/stores/auth' import { useTeamContextStore } from '@/ui/stores/team-context' import { useUploadStore } from '@/ui/stores/upload' @@ -21,7 +20,6 @@ import { useEffect } from 'react' function RootComponent() { const user = useAuthStore((state) => state.user) const { uploading } = useUploadStore() - const { canEdit } = usePermissions() const pathname = useRouterState({ select: (s) => s.location.pathname }) const navigate = useNavigate() @@ -90,19 +88,17 @@ function RootComponent() { } label="Notifications" badge={badge}> - {canEdit && ( - 0} - className={uploading > 0 ? 'text-blue-500' : ''} - /> - } - label="Uploads" - > - - - )} + 0} + className={uploading > 0 ? 'text-blue-500' : ''} + /> + } + label="Uploads" + > + +
diff --git a/packages/webui/routes/signup.tsx b/packages/webui/routes/signup.tsx index 44e3ddd3..230b9a5b 100644 --- a/packages/webui/routes/signup.tsx +++ b/packages/webui/routes/signup.tsx @@ -157,7 +157,7 @@ function SignupPage() { 👋 {inviteInfo.inviterName} invited you to join{' '} - {inviteInfo.teamName || inviteInfo.projectName} as a{' '} + {inviteInfo.projectName || inviteInfo.teamName} as a{' '} {inviteInfo.role}.
diff --git a/packages/webui/routes/teams/$teamId/settings.tsx b/packages/webui/routes/teams/$teamId/settings.tsx index 1b06d64e..ea8c7267 100644 --- a/packages/webui/routes/teams/$teamId/settings.tsx +++ b/packages/webui/routes/teams/$teamId/settings.tsx @@ -233,21 +233,23 @@ function TeamSettingsPage() { )} - + {me?.role === 'admin' && ( + + )} -
- AI -
+ {me?.role === 'admin' && ( + <> +
+ AI +
- + - + - + - + + + )}