feat(fed): add ural

This commit is contained in:
vl.arkhangelskii
2026-09-21 06:29:08 +03:00
parent 946b77540f
commit 1c1d3ff4bc
11 changed files with 194 additions and 30 deletions
+9 -7
View File
@@ -23,8 +23,14 @@ const STATUS_LABELS: Record<string, string> = {
Failed: "ошибка"
};
function formatStatus(value?: string): string {
return STATUS_LABELS[value ?? ""] ?? value ?? "—";
function sourceBanner(item: SourceItem): string {
if (item.status === "Failed") {
const detail = item.lastError?.trim();
return detail
? `Сборка «${item.name}» не удалась: ${detail}`
: `Сборка «${item.name}» не удалась. Повтор — рестарт сервиса или POST /api/v1/sync/${item.id}.`;
}
return `Тайлы источника «${item.name}» ещё не готовы (${formatStatus(item.status)}). Первый прогон может занять часы.`;
}
function formatDate(value?: string | null): string {
@@ -179,11 +185,7 @@ export function App() {
styleKeyRef.current = styleKey;
const pending = selectedSources.find((item) => item.status !== "Ready");
setBanner(
pending
? `Тайлы источника «${pending.name}» ещё не готовы (${formatStatus(pending.status)}). Первый прогон может занять часы.`
: ""
);
setBanner(pending ? sourceBanner(pending) : "");
}, [access, personal, selectedSourceIds, sources, source, styleName, syncGotoFromMap, updateHud]);
const refresh = useCallback(async () => {
+2 -2
View File
@@ -444,8 +444,8 @@ dd {
.banner {
position: absolute;
z-index: var(--hud-z);
left: var(--space);
top: 5.4rem;
right: var(--space);
top: 10em;
max-width: min(34rem, calc(100vw - 24px));
background: rgba(42, 31, 18, 0.92);
color: #ffe0c2;