fix(webui): 「视频转主页」只在抖音工作区出现
它整条链路都是抖音的(aweme/detail + sec_uid 拼主页),小红书没有对应的 接口模块。换到小红书还摆着这个按钮,点开只会一条条报错。
This commit is contained in:
@@ -28,7 +28,7 @@ export function MonitorDashboard() {
|
||||
|
||||
const cookieOk = cookieStatus?.present ?? false
|
||||
const webhookOk = webhookStatus?.configured ?? false
|
||||
const { isWired, isLoading: platformLoading } = useCurrentPlatform()
|
||||
const { platform, isWired, isLoading: platformLoading } = useCurrentPlatform()
|
||||
|
||||
const [selectedTaskId, setSelectedTaskId] = useState<number | null>(null)
|
||||
const [editorOpen, setEditorOpen] = useState(false)
|
||||
@@ -90,16 +90,19 @@ export function MonitorDashboard() {
|
||||
监控任务
|
||||
</span>
|
||||
<div className="flex items-center gap-1">
|
||||
{/* 手上只有一条作品链接时,先把它的号找出来 —— 建任务要的是主页里的 sec_uid。 */}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setLinkToolOpen(true)}
|
||||
title="粘贴视频链接,换出博主主页"
|
||||
>
|
||||
<Link2 className="w-3 h-3 mr-1" />
|
||||
视频转主页
|
||||
</Button>
|
||||
{/* 手上只有一条作品链接时,先把它的号找出来 —— 建任务要的是主页里的 sec_uid。
|
||||
只有抖音接得上:小红书没有对应的接口模块,那条路要走子进程爬虫。 */}
|
||||
{platform === 'dy' && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => setLinkToolOpen(true)}
|
||||
title="粘贴视频链接,换出博主主页"
|
||||
>
|
||||
<Link2 className="w-3 h-3 mr-1" />
|
||||
视频转主页
|
||||
</Button>
|
||||
)}
|
||||
<Button size="sm" onClick={openCreate}>
|
||||
<Plus className="w-3 h-3 mr-1" />
|
||||
新建
|
||||
@@ -231,7 +234,9 @@ export function MonitorDashboard() {
|
||||
</div>
|
||||
|
||||
<TaskEditorDialog open={editorOpen} onOpenChange={setEditorOpen} task={editingTask} />
|
||||
<VideoLinkTool open={linkToolOpen} onOpenChange={setLinkToolOpen} />
|
||||
{platform === 'dy' && (
|
||||
<VideoLinkTool open={linkToolOpen} onOpenChange={setLinkToolOpen} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user