diff --git a/surfsense_web/components/homepage/navbar.tsx b/surfsense_web/components/homepage/navbar.tsx index 255134353..dec390567 100644 --- a/surfsense_web/components/homepage/navbar.tsx +++ b/surfsense_web/components/homepage/navbar.tsx @@ -9,7 +9,12 @@ import { Logo } from "@/components/Logo"; import { ThemeTogglerComponent } from "@/components/theme/theme-toggle"; import { cn } from "@/lib/utils"; -export const Navbar = () => { +interface NavbarProps { + /** Override the scrolled-state background classes (desktop & mobile). */ + scrolledBgClassName?: string; +} + +export const Navbar = ({ scrolledBgClassName }: NavbarProps = {}) => { const [isScrolled, setIsScrolled] = useState(false); const navItems = [ @@ -33,13 +38,21 @@ export const Navbar = () => { return (
- - + +
); }; -const DesktopNav = ({ navItems, isScrolled }: any) => { +const DesktopNav = ({ navItems, isScrolled, scrolledBgClassName }: any) => { const [hovered, setHovered] = useState(null); return ( { className={cn( "mx-auto hidden w-full max-w-7xl flex-row items-center justify-between self-start rounded-full px-4 py-2 lg:flex transition-all duration-300", isScrolled - ? "bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50" + ? (scrolledBgClassName ?? + "bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50") : "bg-transparent border border-transparent" )} > @@ -104,7 +118,7 @@ const DesktopNav = ({ navItems, isScrolled }: any) => { ); }; -const MobileNav = ({ navItems, isScrolled }: any) => { +const MobileNav = ({ navItems, isScrolled, scrolledBgClassName }: any) => { const [open, setOpen] = useState(false); const navRef = useRef(null); @@ -133,7 +147,8 @@ const MobileNav = ({ navItems, isScrolled }: any) => { className={cn( "relative mx-auto flex w-full max-w-[calc(100vw-2rem)] flex-col items-center justify-between px-4 py-2 lg:hidden transition-all duration-300", isScrolled - ? "bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50" + ? (scrolledBgClassName ?? + "bg-white/80 backdrop-blur-md border border-white/20 shadow-lg dark:bg-neutral-950/80 dark:border-neutral-800/50") : "bg-transparent border border-transparent" )} > diff --git a/surfsense_web/components/public-chat/public-chat-view.tsx b/surfsense_web/components/public-chat/public-chat-view.tsx index bfe370bf0..804dcbbf4 100644 --- a/surfsense_web/components/public-chat/public-chat-view.tsx +++ b/surfsense_web/components/public-chat/public-chat-view.tsx @@ -23,10 +23,12 @@ export function PublicChatView({ shareToken }: PublicChatViewProps) { const { data, isLoading, error } = usePublicChat(shareToken); const runtime = usePublicChatRuntime({ data }); + const navbarScrolledBg = "bg-main-panel/80 backdrop-blur-md border border-border/30 shadow-lg"; + if (isLoading) { return ( -
- +
+
@@ -39,8 +41,8 @@ export function PublicChatView({ shareToken }: PublicChatViewProps) { } return ( -
- +
+ {/* Tool UIs for rendering tool results */} diff --git a/surfsense_web/components/public-chat/public-thread.tsx b/surfsense_web/components/public-chat/public-thread.tsx index e88e5aae7..9b31a1a02 100644 --- a/surfsense_web/components/public-chat/public-thread.tsx +++ b/surfsense_web/components/public-chat/public-thread.tsx @@ -24,7 +24,7 @@ interface PublicThreadProps { export const PublicThread: FC = ({ footer }) => { return ( = ({ footer }) => { {footer && ( -
+
{footer}
)} diff --git a/surfsense_web/components/tool-ui/generate-report.tsx b/surfsense_web/components/tool-ui/generate-report.tsx index 20f465c0b..0d2cf4f8b 100644 --- a/surfsense_web/components/tool-ui/generate-report.tsx +++ b/surfsense_web/components/tool-ui/generate-report.tsx @@ -106,9 +106,7 @@ function ReportCancelledState() {

Report Cancelled

-

- Report generation was cancelled -

+

Report generation was cancelled

); @@ -229,8 +227,7 @@ function ReportCard({ ) : ( <> - {metadata.wordCount != null && - `${metadata.wordCount.toLocaleString()} words`} + {metadata.wordCount != null && `${metadata.wordCount.toLocaleString()} words`} {metadata.wordCount != null && metadata.versionLabel && ( )} @@ -250,8 +247,7 @@ function ReportCard({ className="max-h-[7rem] overflow-hidden [&_*]:!text-[24px]" style={{ maskImage: "linear-gradient(to bottom, black 50%, transparent 100%)", - WebkitMaskImage: - "linear-gradient(to bottom, black 50%, transparent 100%)", + WebkitMaskImage: "linear-gradient(to bottom, black 50%, transparent 100%)", }} >