diff --git a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx index 3cdbe5b95..e99bae22d 100644 --- a/surfsense_web/components/layout/ui/shell/LayoutShell.tsx +++ b/surfsense_web/components/layout/ui/shell/LayoutShell.tsx @@ -369,7 +369,7 @@ export function LayoutShell({ aria-valuenow={50} tabIndex={0} onMouseDown={onResizeMouseDown} - className="hidden md:block h-full cursor-col-resize z-30" + className="hidden md:block h-full cursor-col-resize z-30 focus:outline-none" style={{ width: 8, marginLeft: -8, marginRight: -8 }} /> )} diff --git a/surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx index 101fc7b2a..eb75842ba 100644 --- a/surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/AllPrivateChatsSidebar.tsx @@ -31,13 +31,12 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, - DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; import { Spinner } from "@/components/ui/spinner"; -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/animated-tabs"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { useDebouncedValue } from "@/hooks/use-debounced-value"; import { useLongPress } from "@/hooks/use-long-press"; @@ -300,14 +299,11 @@ export function AllPrivateChatsSidebar({ setShowArchived(value === "archived")} - className="shrink-0 mx-4" + className="shrink-0 mx-4 mt-2" > - - - + + + Active @@ -315,11 +311,8 @@ export function AllPrivateChatsSidebar({ - - + + Archived @@ -383,7 +376,6 @@ export function AllPrivateChatsSidebar({ disabled={isBusy} className="flex items-center gap-2 flex-1 min-w-0 text-left overflow-hidden" > - {thread.title || "New Chat"} ) : ( @@ -395,7 +387,6 @@ export function AllPrivateChatsSidebar({ disabled={isBusy} className="flex items-center gap-2 flex-1 min-w-0 text-left overflow-hidden" > - {thread.title || "New Chat"} @@ -458,7 +449,6 @@ export function AllPrivateChatsSidebar({ )} - handleDeleteThread(thread.id)}> {t("delete") || "Delete"} diff --git a/surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx b/surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx index 2600d68aa..81c75f9d7 100644 --- a/surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/AllSharedChatsSidebar.tsx @@ -31,13 +31,12 @@ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, - DropdownMenuSeparator, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import { Input } from "@/components/ui/input"; import { Skeleton } from "@/components/ui/skeleton"; import { Spinner } from "@/components/ui/spinner"; -import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/animated-tabs"; import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { useDebouncedValue } from "@/hooks/use-debounced-value"; import { useLongPress } from "@/hooks/use-long-press"; @@ -300,14 +299,11 @@ export function AllSharedChatsSidebar({ setShowArchived(value === "archived")} - className="shrink-0 mx-4" + className="shrink-0 mx-4 mt-2" > - - - + + + Active @@ -315,11 +311,8 @@ export function AllSharedChatsSidebar({ - - + + Archived @@ -383,7 +376,6 @@ export function AllSharedChatsSidebar({ disabled={isBusy} className="flex items-center gap-2 flex-1 min-w-0 text-left overflow-hidden" > - {thread.title || "New Chat"} ) : ( @@ -395,7 +387,6 @@ export function AllSharedChatsSidebar({ disabled={isBusy} className="flex items-center gap-2 flex-1 min-w-0 text-left overflow-hidden" > - {thread.title || "New Chat"} @@ -458,7 +449,6 @@ export function AllSharedChatsSidebar({ )} - handleDeleteThread(thread.id)}> {t("delete") || "Delete"} diff --git a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx index eacaabda1..1db8f706b 100644 --- a/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx +++ b/surfsense_web/components/layout/ui/sidebar/Sidebar.tsx @@ -168,7 +168,7 @@ export function Sidebar({ @@ -224,7 +224,7 @@ export function Sidebar({ diff --git a/surfsense_web/components/ui/animated-tabs.tsx b/surfsense_web/components/ui/animated-tabs.tsx index 7d39ce1dd..980c3da34 100644 --- a/surfsense_web/components/ui/animated-tabs.tsx +++ b/surfsense_web/components/ui/animated-tabs.tsx @@ -77,14 +77,14 @@ const XScrollable = forwardRef< const dragging = useRef(false); const startX = useRef(0); const startScrollLeft = useRef(0); - const [scrollPos, setScrollPos] = useState<"start" | "middle" | "end">("start"); + const [scrollPos, setScrollPos] = useState<"start" | "middle" | "end" | "none">("none"); const updateScrollPos = useCallback(() => { const el = scrollRef.current; if (!el) return; const canScroll = el.scrollWidth > el.clientWidth + 1; if (!canScroll) { - setScrollPos("start"); + setScrollPos("none"); return; } const atStart = el.scrollLeft <= 2; @@ -130,9 +130,12 @@ const XScrollable = forwardRef< updateScrollPos(); }, [updateScrollPos]); - const maskStart = scrollPos === "start" ? "black" : "transparent"; - const maskEnd = scrollPos === "end" ? "black" : "transparent"; - const maskImage = `linear-gradient(to right, ${maskStart}, black 24px, black calc(100% - 24px), ${maskEnd})`; + const needsMask = scrollPos !== "none"; + const maskStart = scrollPos === "start" || scrollPos === "none" ? "black" : "transparent"; + const maskEnd = scrollPos === "end" || scrollPos === "none" ? "black" : "transparent"; + const maskImage = needsMask + ? `linear-gradient(to right, ${maskStart}, black 24px, black calc(100% - 24px), ${maskEnd})` + : undefined; return ( // biome-ignore lint/a11y/noStaticElementInteractions: drag-scroll container needs mouse events