's'
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
import { Cable, Copy, Monitor, Radio } from "lucide-react";
|
||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||
|
||||
import { LiveProcessLiveLogCard } from "@/components/live-product/LiveProcessLiveLogCard";
|
||||
|
||||
type ProcessEntry = { pm2: string; script: string; label: string };
|
||||
|
||||
type TFn = (zh: string, en: string) => string;
|
||||
@@ -53,6 +55,10 @@ type Props = {
|
||||
setUrlConfig: (v: string) => void;
|
||||
douyinUrl: string;
|
||||
setDouyinUrl: (v: string) => void;
|
||||
businessYoutubeKey: string;
|
||||
setBusinessYoutubeKey: (v: string) => void;
|
||||
syncYoutubeIni: boolean;
|
||||
setSyncYoutubeIni: (v: boolean) => void;
|
||||
onRunProcess: (a: "start" | "stop" | "restart") => void;
|
||||
onSaveUrlConfig: (content?: string) => void;
|
||||
onSaveBusinessMeta: () => void;
|
||||
@@ -70,6 +76,10 @@ export function LiveTiktokHdmiView({
|
||||
setUrlConfig,
|
||||
douyinUrl,
|
||||
setDouyinUrl,
|
||||
businessYoutubeKey,
|
||||
setBusinessYoutubeKey,
|
||||
syncYoutubeIni,
|
||||
setSyncYoutubeIni,
|
||||
onRunProcess,
|
||||
onSaveUrlConfig,
|
||||
onSaveBusinessMeta,
|
||||
@@ -272,14 +282,37 @@ export function LiveTiktokHdmiView({
|
||||
</div>
|
||||
|
||||
<div className="rounded-2xl border border-white/[0.08] bg-zinc-950/50 p-6">
|
||||
<h3 className="text-sm font-semibold text-white">{t("抖音源站(业务元数据)", "Douyin source (hub metadata)")}</h3>
|
||||
<p className="mt-1 text-xs text-zinc-500">{t("写入 business JSON。", "Writes business JSON.")}</p>
|
||||
<h3 className="text-sm font-semibold text-white">{t("业务元数据(配置中心)", "Hub business metadata")}</h3>
|
||||
<p className="mt-1 text-xs text-zinc-500">
|
||||
{t("与 YouTube 页共用一份 business JSON;HDMI/TikTok 场景可只填抖音 URL。", "Shared business JSON with YouTube page.")}
|
||||
</p>
|
||||
<label className="mt-4 block text-xs text-zinc-400">{t("抖音直播间 URL", "Douyin live URL")}</label>
|
||||
<input
|
||||
className="mt-4 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm"
|
||||
className="mt-1 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 text-sm"
|
||||
value={douyinUrl}
|
||||
onChange={(e) => setDouyinUrl(e.target.value)}
|
||||
placeholder="https://live.douyin.com/..."
|
||||
/>
|
||||
<label className="mt-3 block text-xs text-zinc-400">
|
||||
{t("YouTube 串流密钥(声明式,可选)", "YouTube key (optional declarative)")}
|
||||
</label>
|
||||
<input
|
||||
className="mt-1 w-full rounded-xl border border-white/10 bg-black/40 px-4 py-3 font-mono text-sm text-zinc-200"
|
||||
spellCheck={false}
|
||||
autoComplete="off"
|
||||
value={businessYoutubeKey}
|
||||
onChange={(e) => setBusinessYoutubeKey(e.target.value)}
|
||||
placeholder="xxxx-xxxx…"
|
||||
/>
|
||||
<label className="mt-3 flex cursor-pointer items-start gap-2 text-xs text-zinc-300">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="mt-0.5 rounded border-white/20 bg-black/40"
|
||||
checked={syncYoutubeIni}
|
||||
onChange={(e) => setSyncYoutubeIni(e.target.checked)}
|
||||
/>
|
||||
<span>{t("同时写入 config/youtube.ini 的 key=", "Also sync key= to config/youtube.ini")}</span>
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
disabled={lock}
|
||||
@@ -328,6 +361,15 @@ export function LiveTiktokHdmiView({
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LiveProcessLiveLogCard
|
||||
t={t}
|
||||
currentProc={currentProc}
|
||||
fetchJson={fetchJson}
|
||||
urlListText={urlConfig}
|
||||
keySuffixUi=""
|
||||
showKeyRow={false}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user