From abd4d1d891f0f65403c03b7efa8b03d936f1d00a Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Mon, 29 Sep 2025 17:46:50 +0800 Subject: [PATCH] feat: add upage logo --- app/components/header/Header.tsx | 10 +++- .../header/connections/NetlifyConnection.tsx | 58 +++++++++---------- .../header/connections/_1PanelConnection.tsx | 12 ++-- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/app/components/header/Header.tsx b/app/components/header/Header.tsx index eba8f8a..cfde437 100644 --- a/app/components/header/Header.tsx +++ b/app/components/header/Header.tsx @@ -1,8 +1,10 @@ import { useStore } from '@nanostores/react'; import classNames from 'classnames'; +import { useMemo } from 'react'; import { ClientOnly } from 'remix-utils/client-only'; import { useAuth } from '~/lib/hooks'; import { aiState } from '~/lib/stores/ai-state'; +import { themeStore } from '~/lib/stores/theme'; import { HistorySwitch } from '../sidebar/HistorySwitch'; import { ThemeSwitch } from '../ui/ThemeSwitch'; import { ChatDescription } from './ChatDescription.client'; @@ -12,6 +14,8 @@ import { MinimalAvatarDropdown } from './MinimalAvatarDropdown'; export function Header() { const { isAuthenticated } = useAuth(); const { chatStarted } = useStore(aiState); + const theme = useStore(themeStore); + const logoSrc = useMemo(() => (theme === 'dark' ? '/logo-dark.png' : '/logo.png'), [theme]); return ( <> @@ -26,9 +30,11 @@ export function Header() { >