diff --git a/web/components/workbench-header.tsx b/web/components/workbench-header.tsx index 5e1c189..df0888b 100644 --- a/web/components/workbench-header.tsx +++ b/web/components/workbench-header.tsx @@ -21,7 +21,6 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" -import { WorkspaceSwitcher } from "@/components/workspace-switcher" import { useAuth } from "@/components/auth-provider" import { useNotifications } from "@/components/notification-provider" import { useI18n } from "@/i18n/provider" @@ -32,13 +31,7 @@ export function WorkbenchHeader() { return (
-
-
- -
+
diff --git a/web/components/workbench-rail.tsx b/web/components/workbench-rail.tsx index 5121589..7577234 100644 --- a/web/components/workbench-rail.tsx +++ b/web/components/workbench-rail.tsx @@ -6,6 +6,12 @@ import { usePathname } from "next/navigation" import { useI18n } from "@/i18n/provider" import { cn } from "@/lib/utils" +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip" +import { WorkspaceSwitcher } from "@/components/workspace-switcher" const workbenchRailItems = [ { @@ -22,34 +28,56 @@ const workbenchRailItems = [ }, ] +function normalizePath(path: string | null | undefined) { + if (!path) { + return "" + } + return path.length > 1 ? path.replace(/\/+$/, "") : path +} + export function WorkbenchRail() { const t = useI18n() const pathname = usePathname() + const currentPath = normalizePath(pathname) return (