@@ -132,10 +132,6 @@ function render() {
|
||||
}
|
||||
function setLoaded(rows, source) {
|
||||
state.rows = rows;
|
||||
$("#statusDot").classList.add("ready");
|
||||
$("#statusTitle").textContent = "Baza załadowana";
|
||||
$("#statusText").textContent = source;
|
||||
$("#stats").textContent = `${rows.length} rekordów · ${new Set(rows.map((row) => row.model)).size} modeli`;
|
||||
render();
|
||||
renderSuggestions();
|
||||
}
|
||||
@@ -145,8 +141,7 @@ async function loadDefault() {
|
||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||
setLoaded(parseCsv(await response.text()), "Źródło: atut_baza.csv");
|
||||
} catch (error) {
|
||||
$("#statusTitle").textContent = "Nie udało się wczytać CSV";
|
||||
$("#statusText").textContent = "Uruchom aplikację przez lokalny serwer, aby wczytać bazę danych.";
|
||||
$("#results").innerHTML = `<div class="empty">Nie udało się wczytać bazy danych. Uruchom aplikację przez lokalny serwer.</div>`;
|
||||
}
|
||||
}
|
||||
document.querySelectorAll(".tab").forEach((tab) => tab.addEventListener("click", () => {
|
||||
|
||||
Reference in New Issue
Block a user