v0.42.4_fixes

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-27 13:56:59 +01:00
1 parent efc6eda4cd
commit 51631810e1
29 files changed
+1192 -394

No files matched your search

+17 -11
View File
@@ -201,17 +201,23 @@
}
function syncColumnPicker() {
const picker = $("log-column-options");
picker.replaceChildren(...columns.map(column => {
const label = el("label", undefined, "check log-column-option");
const input = document.createElement("input"); input.type = "checkbox"; input.checked = visibleColumns.has(column.id); input.dataset.column = column.id;
const text = el("span", t(column.label)); text.dataset.i18n = column.label;
input.addEventListener("change", () => {
if (!input.checked && visibleColumns.size === 1) { input.checked = true; toast(t("logColumnsRequired"), true); return; }
if (input.checked) visibleColumns.add(column.id); else visibleColumns.delete(column.id);
syncHeaders(); render(); void savePreferences();
});
label.append(input, text); return label;
}));
for (const column of columns) {
let input = [...picker.querySelectorAll("input[data-column]")].find(node => node.dataset.column === column.id);
if (!input) {
const label = el("label", undefined, "check log-column-option");
input = document.createElement("input"); input.type = "checkbox"; input.dataset.column = column.id;
const caption = el("span"); caption.dataset.i18n = column.label;
input.addEventListener("change", () => {
if (!input.checked && visibleColumns.size === 1) { input.checked = true; toast(t("logColumnsRequired"), true); return; }
if (input.checked) visibleColumns.add(column.id); else visibleColumns.delete(column.id);
syncHeaders(); render(); void savePreferences();
});
label.append(input, caption); picker.append(label);
}
input.checked = visibleColumns.has(column.id);
const caption = input.nextElementSibling, label = t(column.label);
if (caption.textContent !== label) caption.textContent = label;
}
}
function applyPreferences(preferences) {
if (!preferences) return;