This commit is contained in:
eric
2026-03-29 02:57:08 -05:00
parent ef87c43b33
commit e3ac026710
15 changed files with 799 additions and 222 deletions

View File

@@ -241,7 +241,11 @@ export function LiveYoutubeUnmannedView({
setChannels((prev) => {
const next = prev.map((x) => (x.id === activeCh ? { ...x, urlLines: c } : x));
saveYoutubeProChannels(next);
void pushYoutubeProChannelsRemote(fetchJson, next).catch(() => {});
void pushYoutubeProChannelsRemote(fetchJson, next).catch((e) => {
notify(
`${t("多频道列表未同步到服务器", "Channel list not saved on server")}: ${(e as Error).message}`,
);
});
return next;
});
}
@@ -311,9 +315,13 @@ export function LiveYoutubeUnmannedView({
(next: YoutubeProChannel[]) => {
setChannels(next);
saveYoutubeProChannels(next);
void pushYoutubeProChannelsRemote(fetchJson, next).catch(() => {});
void pushYoutubeProChannelsRemote(fetchJson, next).catch((e) => {
notify(
`${t("多频道列表未同步到服务器", "Channel list not saved on server")}: ${(e as Error).message}`,
);
});
},
[fetchJson],
[fetchJson, notify, t],
);
const active = channels.find((c) => c.id === activeCh) || channels[0];
@@ -633,10 +641,10 @@ export function LiveYoutubeUnmannedView({
target: "live_youtube",
},
{
label: "Neko",
sub: t("Chromium 工作室", "Chromium"),
label: "Android",
sub: t("ADB 设备", "ADB"),
gradient: "from-emerald-400 to-teal-500",
target: "services",
target: "android",
},
]}
/>