BUILD127 — новый порядок верхних вкладок
This commit is contained in:
@@ -783,7 +783,7 @@
|
||||
project_name: "Хоккей — назначения удалений",
|
||||
data_source: "vmix_demo",
|
||||
canvas: { ...state.config.canvas, width: 1440, height: 760, background: "#060d17", show_grid: true, snap_enabled: true },
|
||||
tabs: [{ id: "main", label: "Игра" }, { id: "shootout", label: "Буллиты" }, { id: "referees", label: "Судьи" }, { id: "statistics", label: "Статистика" }, { id: "schedule", label: "Расписание" }, { id: "standings", label: "Турнирная таблица" }],
|
||||
tabs: [{ id: "main", label: "Игра" }, { id: "lines", label: "Пятёрки" }, { id: "referees", label: "Судьи" }, { id: "statistics", label: "Статистика" }, { id: "standings", label: "Турнирная таблица" }, { id: "shootout", label: "Буллиты" }, { id: "prepared_titles", label: "Заготовки" }],
|
||||
components: [gameTimer, board, shootout, referees, statistics, schedule, standings],
|
||||
triggers: []
|
||||
};
|
||||
@@ -2594,14 +2594,23 @@ function startCustomTooltips() {
|
||||
state.config.tabs = (Array.isArray(state.config.tabs) ? state.config.tabs : []).filter((tab) => tab?.id !== "prematch");
|
||||
state.config.components = components.filter((component) => component?.type !== "hockey_prematch_panel" && component?.action_id !== "hockey_prematch_panel");
|
||||
if (!state.config.tabs.length) state.config.tabs = [{ id: "main", label: "Игра" }];
|
||||
// BUILD86: "Заготовки" is always the final top-level runtime tab.
|
||||
// Reorder it on every config normalisation as older published configs may
|
||||
// already contain the tab near "Игра" from BUILD84/85.
|
||||
state.config.tabs = state.config.tabs.filter((tab) => !["lines", "prepared_titles"].includes(tab?.id));
|
||||
// BUILD122: line/five sorting is a first-class operator workspace.
|
||||
state.config.tabs.push({ id: "lines", label: "Пятёрки" });
|
||||
state.config.tabs.push({ id: "prepared_titles", label: "Заготовки" });
|
||||
if (state.activeTab === "prematch") state.activeTab = state.config.tabs.find((tab) => tab.id === "main")?.id || state.config.tabs[0].id;
|
||||
// BUILD127: canonical top-level hockey tab order.
|
||||
// Keep the underlying schedule component/data intact, but do not expose the
|
||||
// legacy Schedule tab in the operator top navigation.
|
||||
const hockeyTopTabs = [
|
||||
{ id: "main", label: "Игра" },
|
||||
{ id: "lines", label: "Пятёрки" },
|
||||
{ id: "referees", label: "Судьи" },
|
||||
{ id: "statistics", label: "Статистика" },
|
||||
{ id: "standings", label: "Турнирная таблица" },
|
||||
{ id: "shootout", label: "Буллиты" },
|
||||
{ id: "prepared_titles", label: "Заготовки" },
|
||||
];
|
||||
const existingTabsById = new Map(state.config.tabs.map((tab) => [String(tab?.id || ""), tab]));
|
||||
state.config.tabs = hockeyTopTabs.map((tab) => ({ ...(existingTabsById.get(tab.id) || {}), ...tab }));
|
||||
if (!state.config.tabs.some((tab) => tab.id === state.activeTab)) {
|
||||
state.activeTab = state.config.tabs.find((tab) => tab.id === "main")?.id || state.config.tabs[0].id;
|
||||
}
|
||||
}
|
||||
|
||||
function ensureConfig() {
|
||||
|
||||
Reference in New Issue
Block a user