品牌化设置 + Claude米色衬线体主题 + 全站中文
- 品牌设置API: GET/PUT /api/settings/brand (名称/标语/Logo) - 管理页系统设置: 品牌编辑器表单(名称/标语/Logo URL) - 恢复Anthropic风格: 米色(#FBF9F6) 底色, Source Serif 4 + Noto Serif SC 衬线体 - 暖棕(#C2693A) 主色调, 更充裕的间距与留白, 庄重大气 - 全站中文: antd zhCN locale, 所有页面文本汉化 - 数据存储在 Config singleton, 运行时更新
This commit is contained in:
1 parent
409e5d314e
commit
efde5597bd
16 files changed
+403
-672
No files matched your search
@@ -1,13 +1,9 @@
|
||||
import { useState } from 'react'
|
||||
import { Outlet, useNavigate, useLocation, Link } from 'react-router-dom'
|
||||
import { Outlet, useNavigate, useLocation } from 'react-router-dom'
|
||||
import { Layout, Menu, Button, Typography } from 'antd'
|
||||
import {
|
||||
DashboardOutlined,
|
||||
VideoCameraOutlined,
|
||||
PlusOutlined,
|
||||
CloudServerOutlined,
|
||||
SettingOutlined,
|
||||
LogoutOutlined,
|
||||
DashboardOutlined, VideoCameraOutlined, PlusOutlined,
|
||||
CloudServerOutlined, SettingOutlined, LogoutOutlined,
|
||||
} from '@ant-design/icons'
|
||||
import { clearToken } from '../api/client'
|
||||
|
||||
@@ -15,11 +11,11 @@ const { Sider, Content, Header } = Layout
|
||||
const { Text } = Typography
|
||||
|
||||
const menuItems = [
|
||||
{ key: '/admin', icon: <DashboardOutlined />, label: 'Dashboard' },
|
||||
{ key: '/admin/streams', icon: <VideoCameraOutlined />, label: 'Streams' },
|
||||
{ key: '/admin/streams/new', icon: <PlusOutlined />, label: 'New Stream' },
|
||||
{ key: '/admin/nodes', icon: <CloudServerOutlined />, label: 'Nodes' },
|
||||
{ key: '/admin/settings', icon: <SettingOutlined />, label: 'Settings' },
|
||||
{ key: '/admin', icon: <DashboardOutlined />, label: '概览' },
|
||||
{ key: '/admin/streams', icon: <VideoCameraOutlined />, label: '直播列表' },
|
||||
{ key: '/admin/streams/new', icon: <PlusOutlined />, label: '创建直播' },
|
||||
{ key: '/admin/nodes', icon: <CloudServerOutlined />, label: '边缘节点' },
|
||||
{ key: '/admin/settings', icon: <SettingOutlined />, label: '系统设置' },
|
||||
]
|
||||
|
||||
export default function AdminLayout() {
|
||||
@@ -39,55 +35,36 @@ export default function AdminLayout() {
|
||||
return (
|
||||
<Layout style={{ minHeight: '100vh' }}>
|
||||
<Sider
|
||||
collapsible
|
||||
collapsed={collapsed}
|
||||
onCollapse={setCollapsed}
|
||||
collapsible collapsed={collapsed} onCollapse={setCollapsed}
|
||||
width={220}
|
||||
style={{
|
||||
borderRight: '1px solid #E8ECF1',
|
||||
background: '#FFFFFF',
|
||||
}}
|
||||
style={{ borderRight: '1px solid #E8E3D8', background: '#FBF9F6' }}
|
||||
>
|
||||
<div style={{
|
||||
height: 56,
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
borderBottom: '1px solid #E8ECF1',
|
||||
background: '#1E3A5F',
|
||||
color: '#FFFFFF',
|
||||
height: 60, display: 'flex', alignItems: 'center', justifyContent: 'center',
|
||||
borderBottom: '1px solid #E8E3D8',
|
||||
}}>
|
||||
<Text strong style={{
|
||||
fontSize: collapsed ? 14 : 18,
|
||||
letterSpacing: -0.5,
|
||||
color: '#FFFFFF',
|
||||
fontSize: collapsed ? 14 : 18, letterSpacing: -0.5,
|
||||
fontFamily: '"Source Serif 4", "Noto Serif SC", Georgia, serif',
|
||||
color: '#C2693A',
|
||||
}}>
|
||||
{collapsed ? 'SC' : 'StreamCore'}
|
||||
</Text>
|
||||
</div>
|
||||
<Menu
|
||||
mode="inline"
|
||||
selectedKeys={[selectedKey]}
|
||||
items={menuItems}
|
||||
mode="inline" selectedKeys={[selectedKey]} items={menuItems}
|
||||
onClick={({ key }) => navigate(key)}
|
||||
style={{ border: 'none', marginTop: 8 }}
|
||||
/>
|
||||
</Sider>
|
||||
<Layout>
|
||||
<Header style={{
|
||||
background: '#FFFFFF',
|
||||
borderBottom: '1px solid #E8ECF1',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
alignItems: 'center',
|
||||
padding: '0 32px',
|
||||
background: '#FBF9F6', borderBottom: '1px solid #E8E3D8',
|
||||
display: 'flex', justifyContent: 'flex-end', alignItems: 'center',
|
||||
padding: '0 40px',
|
||||
}}>
|
||||
<Button
|
||||
type="text"
|
||||
icon={<LogoutOutlined />}
|
||||
onClick={handleLogout}
|
||||
>
|
||||
Logout
|
||||
<Button type="text" icon={<LogoutOutlined />} onClick={handleLogout}>
|
||||
退出登录
|
||||
</Button>
|
||||
</Header>
|
||||
<Content style={{ padding: 32, overflow: 'auto' }}>
|
||||
|
||||
Reference in new issue
Block a user