diff --git a/surfsense_web/components/assistant-ui/thread.tsx b/surfsense_web/components/assistant-ui/thread.tsx index 4bc1a2e0e..7994af8ac 100644 --- a/surfsense_web/components/assistant-ui/thread.tsx +++ b/surfsense_web/components/assistant-ui/thread.tsx @@ -735,7 +735,7 @@ const Composer: FC = () => { /> )} -
+
{clipboardInitialText && ( = ({ isBlockedByOtherUser = false const isSendDisabled = isComposerEmpty || !hasModelConfigured || isBlockedByOtherUser; return ( -
+
{!isDesktop ? ( <> diff --git a/surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx b/surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx index e5bb18054..87e160029 100644 --- a/surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx +++ b/surfsense_web/components/layout/ui/sidebar/SidebarUserProfile.tsx @@ -31,7 +31,9 @@ import { } from "@/components/ui/dropdown-menu"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; +import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; import { useLocaleContext } from "@/contexts/LocaleContext"; +import { useMediaQuery } from "@/hooks/use-media-query"; import { usePlatform } from "@/hooks/use-platform"; import { GITHUB_RELEASES_URL, usePrimaryDownload } from "@/lib/desktop-download-utils"; import { APP_VERSION } from "@/lib/env-config"; @@ -133,15 +135,15 @@ function UserAvatar({ bgColor: string; size?: "sm" | "md"; }) { - const sizeClass = size === "md" ? "h-9 w-9" : "h-8 w-8"; + const sizeClass = size === "md" ? "h-10 w-10" : "h-8 w-8"; if (avatarUrl) { return ( User avatar { setLocale(newLocale); @@ -204,100 +208,140 @@ export function SidebarUserProfile({ // Collapsed view - just show avatar with dropdown if (isCollapsed) { return ( -
- - - - - - - - -
- -
-

{displayName}

-

{user.email}

-
-
-
- - - - - - {t("user_settings")} - - - {onAnnouncements && ( - - - What's New - {announcementUnreadCount > 0 && ( - - {formatAnnouncementCount(announcementUnreadCount)} - +
+
+ {showDownloadCta && ( + + + + + + {downloadLabel} + + + )} + + + + + + + +
+ +
+

{displayName}

+

{user.email}

+
+
+
+ + + + + + {t("user_settings")} + + + {onAnnouncements && ( + + + What's New + {announcementUnreadCount > 0 && ( + + {formatAnnouncementCount(announcementUnreadCount)} + + )} + + )} + + {setTheme && ( + + + + {t("theme")} + + + + {THEMES.map((themeOption) => { + const Icon = themeOption.icon; + const isSelected = theme === themeOption.value; + return ( + handleThemeChange(themeOption.value)} + className={cn( + "mb-1 last:mb-0 transition-all", + "hover:bg-accent hover:text-accent-foreground", + isSelected && "text-primary" + )} + > + + {t(themeOption.value)} + {isSelected && } + + ); + })} + + + + )} - {setTheme && ( - - {t("theme")} + + {t("language")} - {THEMES.map((themeOption) => { - const Icon = themeOption.icon; - const isSelected = theme === themeOption.value; + {LANGUAGES.map((language) => { + const isSelected = locale === language.code; return ( handleThemeChange(themeOption.value)} + key={language.code} + onClick={() => handleLanguageChange(language.code)} className={cn( "mb-1 last:mb-0 transition-all", "hover:bg-accent hover:text-accent-foreground", isSelected && "text-primary" )} > - - {t(themeOption.value)} + {language.flag} + {language.name} {isSelected && } ); @@ -305,81 +349,52 @@ export function SidebarUserProfile({ - )} - - - - {t("language")} - - - - {LANGUAGES.map((language) => { - const isSelected = locale === language.code; - return ( - handleLanguageChange(language.code)} - className={cn( - "mb-1 last:mb-0 transition-all", - "hover:bg-accent hover:text-accent-foreground", - isSelected && "text-primary" - )} - > - {language.flag} - {language.name} - {isSelected && } + + + + {t("learn_more")} + + + + {LEARN_MORE_LINKS.map((link) => ( + + + {t(link.key)} + + - ); - })} - - - + ))} + +

+ v{APP_VERSION} +

+
+
+
- - - - {t("learn_more")} - - - - {LEARN_MORE_LINKS.map((link) => ( - - - {t(link.key)} - - - - ))} - -

- v{APP_VERSION} -

-
-
-
- - {!isDesktop && ( - - - - {downloadLabel} - - - )} - - - - - {isLoggingOut ? ( - - ) : ( - + {!isDesktop && ( + + + + {downloadLabel} + + )} - {isLoggingOut ? t("loggingOut") : t("logout")} - -
-
+ + + + + {isLoggingOut ? ( + + ) : ( + + )} + {isLoggingOut ? t("loggingOut") : t("logout")} + + + +
); } @@ -387,21 +402,23 @@ export function SidebarUserProfile({ // Expanded view return (