全局整改: 布局重构、鉴权加固、API修复
- 首页/播放页: 去掉 antd Layout 改用 div 避免 flex 布局问题
- 播放页: 返回按钮改为 navigate('/') 替代 window.close()
- 后端登录/验证: 改用 POST JSON body 替代 query param
- 后端鉴权: require_auth 依赖注入保护所有管理接口
- nodes路由: 修复 /strategy 被 /{node_id} 拦截的顺序问题
- 前端 Settings: 策略更新改为 JSON body
This commit is contained in:
1 parent
f3b2a9cb46
commit
b81a7bf293
7 files changed
+110
-64
No files matched your search
@@ -1,12 +1,11 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import {
|
||||
Layout, Row, Col, Card, Typography, Tag, Button, Skeleton, Empty, Space,
|
||||
Row, Col, Card, Typography, Tag, Button, Skeleton, Empty, Space,
|
||||
} from 'antd'
|
||||
import { LoginOutlined, FireOutlined, ClockCircleOutlined } from '@ant-design/icons'
|
||||
import { fetchStreams, type StreamInfo } from '../../api/streams'
|
||||
|
||||
const { Header, Content } = Layout
|
||||
const { Title, Text } = Typography
|
||||
|
||||
const statusMeta: Record<string, { color: string; label: string; icon: React.ReactNode }> = {
|
||||
@@ -34,8 +33,8 @@ export default function HomePage() {
|
||||
})
|
||||
|
||||
return (
|
||||
<Layout style={{ minHeight: '100vh', background: '#FAF8F5' }}>
|
||||
<Header style={{
|
||||
<div style={{ minHeight: '100vh', background: '#FAF8F5' }}>
|
||||
<div style={{
|
||||
background: '#FFFFFF',
|
||||
borderBottom: '1px solid #E8E4DD',
|
||||
display: 'flex',
|
||||
@@ -57,13 +56,13 @@ export default function HomePage() {
|
||||
>
|
||||
管理后台
|
||||
</Button>
|
||||
</Header>
|
||||
<Content style={{ padding: '32px 48px', maxWidth: 1280, margin: '0 auto' }}>
|
||||
</div>
|
||||
<div style={{ maxWidth: 1280, margin: '0 auto', padding: '32px 48px' }}>
|
||||
<Title level={3} style={{ marginBottom: 24 }}>全部直播</Title>
|
||||
|
||||
{loading ? (
|
||||
<Row gutter={[24, 24]}>
|
||||
{[1,2,3,4,5,6].map((i) => (
|
||||
{[1, 2, 3, 4, 5, 6].map((i) => (
|
||||
<Col key={i} xs={24} sm={12} md={8} lg={8}>
|
||||
<Card><Skeleton active /></Card>
|
||||
</Col>
|
||||
@@ -120,7 +119,7 @@ export default function HomePage() {
|
||||
})}
|
||||
</Row>
|
||||
)}
|
||||
</Content>
|
||||
</Layout>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user