完善节目管理与回放播放体验

This commit is contained in:
admin committed 2026-08-17 09:59:04 +08:00
1 parent b265518084
commit a493ef2309
14 files changed
+446 -96

No files matched your search

+6 -6
View File
@@ -22,7 +22,7 @@ export default function StreamList() {
async function loadData() {
setLoading(true)
try { setStreams(await fetchStreams()) } catch { message.error('加载失败') }
try { setStreams(await fetchStreams(true)) } catch { message.error('加载失败') }
setLoading(false)
}
async function handleDelete(id: number) {
@@ -49,7 +49,7 @@ export default function StreamList() {
<Space size={4}>
<Tooltip title="复制推流码">
<Button size="small" icon={<LinkOutlined />}
onClick={() => { navigator.clipboard.writeText(r.stream_key); message.success('已复制') }} />
onClick={() => { if (r.stream_key) navigator.clipboard.writeText(r.stream_key); message.success('已复制') }} />
</Tooltip>
{r.status !== 'live' ? (
<Tooltip title="开播"><Button size="small" type="primary" ghost icon={<PlayCircleOutlined />} onClick={() => handleGoLive(r.id)} /></Tooltip>
@@ -69,11 +69,11 @@ export default function StreamList() {
<div>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', marginBottom: 28 }}>
<div>
<Title level={2} style={{ margin: '0 0 4px', fontWeight: 600, fontSize: 28, letterSpacing: '-0.02em' }}>直播列表</Title>
<Text style={{ color: '#949088', fontSize: 14 }}>管理所有直播流</Text>
<Title level={2} style={{ margin: '0 0 4px', fontWeight: 600, fontSize: 28, letterSpacing: '-0.02em' }}>节目列表</Title>
<Text style={{ color: '#949088', fontSize: 14 }}>管理直播、排期与回放节目</Text>
</div>
<Button type="primary" icon={<PlusOutlined />} size="large" onClick={() => navigate('/admin/streams/new')}>
创建直播
创建节目
</Button>
</div>
<div style={{
@@ -82,7 +82,7 @@ export default function StreamList() {
}}>
<Table dataSource={streams} columns={columns} rowKey="id" loading={loading}
pagination={{ pageSize: 15, showSizeChanger: false }} size="middle"
locale={{ emptyText: '暂无直播,创建第一条直播吧' }} />
locale={{ emptyText: '暂无节目,创建第一个节目吧' }} />
</div>
</div>
)