diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 63854ff..eba56f6 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -3,6 +3,7 @@ import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
import { ConfigProvider } from 'antd'
import zhCN from 'antd/locale/zh_CN'
import theme from './theme/anthropic'
+import { BrandProvider, useBrand } from './brand/BrandContext'
import AdminLayout from './admin/AdminLayout'
import LoginPage from './admin/LoginPage'
import Dashboard from './admin/pages/Dashboard'
@@ -29,27 +30,37 @@ function AdminGuard({ children }: { children: React.ReactNode }) {
return <>{children}>
}
+function AppRoutes() {
+ const { brand } = useBrand()
+ useEffect(() => { document.title = brand.brand_name }, [brand.brand_name])
+ return (
+
+
+ } />
+ } />
+
+
+
+ }>
+ } />
+ } />
+ } />
+ } />
+ } />
+
+ } />
+
+
+ )
+}
+
export default function App() {
return (
-
-
- } />
- } />
-
-
-
- }>
- } />
- } />
- } />
- } />
- } />
-
- } />
-
-
+
+
+
)
}
diff --git a/frontend/src/admin/AdminLayout.tsx b/frontend/src/admin/AdminLayout.tsx
index a81fce7..2a8e2cd 100644
--- a/frontend/src/admin/AdminLayout.tsx
+++ b/frontend/src/admin/AdminLayout.tsx
@@ -6,6 +6,7 @@ import {
CloudServerOutlined, SettingOutlined, LogoutOutlined,
} from '@ant-design/icons'
import { clearToken } from '../api/client'
+import { useBrand } from '../brand/BrandContext'
const { Sider, Content, Header } = Layout
const { Text } = Typography
@@ -19,6 +20,7 @@ const menuItems = [
]
export default function AdminLayout() {
+ const { brand } = useBrand()
const [collapsed, setCollapsed] = useState(false)
const navigate = useNavigate()
const location = useLocation()
@@ -48,7 +50,7 @@ export default function AdminLayout() {
fontFamily: '"Source Serif 4", "Noto Serif SC", Georgia, serif',
color: '#C2693A',
}}>
- {collapsed ? 'SC' : 'StreamCore'}
+ {collapsed ? brand.brand_name.slice(0, 2) : brand.brand_name}