Files
rayd1o 5bfc790dec
ci / backend (push) Has been cancelled
ci / frontend (push) Has been cancelled
release / images (push) Has been cancelled
ci / delivery (push) Has been cancelled
release: bump version to 0.75.0
2026-09-23 21:20:12 +08:00

30 lines
870 B
JavaScript

import { createHUDSelectMenu } from "./hud-select-menu.js";
import { earthMessage, formatEarthMessage } from "./i18n.js";
export function createTVSourceMenu({ triggers, onSelect, loadPage, formatSource }) {
return createHUDSelectMenu({
id: "tv-source-menu",
triggers,
onSelect,
loadPage,
formatSource,
searchable: true,
showCount: true,
labels: {
menu: "选择新闻直播源",
list: "频道列表",
search: "搜索频道、地区…",
empty: "暂无可用频道",
noMatch: "无匹配频道",
unavailable: "暂无可用频道",
defaultLabel: "默认",
loading: "正在加载频道…",
loadFailed: "加载频道失败,点击重试",
count: ({ count, total }) => formatEarthMessage(earthMessage("tv.channelResults", {
count,
total,
})),
},
});
}