BUILD127 — новый порядок верхних вкладок
This commit is contained in:
2
app.py
2
app.py
@@ -29,7 +29,7 @@ from ui_builder import install_ui_builder
|
|||||||
from khl_site.khl_data_center import APP as khl_site_app
|
from khl_site.khl_data_center import APP as khl_site_app
|
||||||
|
|
||||||
BASE_DIR = Path(__file__).resolve().parent
|
BASE_DIR = Path(__file__).resolve().parent
|
||||||
BUILD_VERSION = "2026.08.27.2"
|
BUILD_VERSION = "2026.08.27.3"
|
||||||
# compatibility: BUILD_VERSION = "2026.08.26.1"
|
# compatibility: BUILD_VERSION = "2026.08.26.1"
|
||||||
# compatibility: BUILD_VERSION = "2026.08.25.1"
|
# compatibility: BUILD_VERSION = "2026.08.25.1"
|
||||||
# compatibility: BUILD_VERSION = "2026.08.24.15"
|
# compatibility: BUILD_VERSION = "2026.08.24.15"
|
||||||
|
|||||||
@@ -783,7 +783,7 @@
|
|||||||
project_name: "Хоккей — назначения удалений",
|
project_name: "Хоккей — назначения удалений",
|
||||||
data_source: "vmix_demo",
|
data_source: "vmix_demo",
|
||||||
canvas: { ...state.config.canvas, width: 1440, height: 760, background: "#060d17", show_grid: true, snap_enabled: true },
|
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],
|
components: [gameTimer, board, shootout, referees, statistics, schedule, standings],
|
||||||
triggers: []
|
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.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");
|
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: "Игра" }];
|
if (!state.config.tabs.length) state.config.tabs = [{ id: "main", label: "Игра" }];
|
||||||
// BUILD86: "Заготовки" is always the final top-level runtime tab.
|
// BUILD127: canonical top-level hockey tab order.
|
||||||
// Reorder it on every config normalisation as older published configs may
|
// Keep the underlying schedule component/data intact, but do not expose the
|
||||||
// already contain the tab near "Игра" from BUILD84/85.
|
// legacy Schedule tab in the operator top navigation.
|
||||||
state.config.tabs = state.config.tabs.filter((tab) => !["lines", "prepared_titles"].includes(tab?.id));
|
const hockeyTopTabs = [
|
||||||
// BUILD122: line/five sorting is a first-class operator workspace.
|
{ id: "main", label: "Игра" },
|
||||||
state.config.tabs.push({ id: "lines", label: "Пятёрки" });
|
{ id: "lines", label: "Пятёрки" },
|
||||||
state.config.tabs.push({ id: "prepared_titles", label: "Заготовки" });
|
{ id: "referees", label: "Судьи" },
|
||||||
if (state.activeTab === "prematch") state.activeTab = state.config.tabs.find((tab) => tab.id === "main")?.id || state.config.tabs[0].id;
|
{ 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() {
|
function ensureConfig() {
|
||||||
|
|||||||
Reference in New Issue
Block a user