feat: export filtered library to csv or json
CI / test (push) Successful in 5m14s

This commit is contained in:
strsv committed 2026-11-06 20:44:25 +03:00
1 parent 2828ec48c8
commit 88c4beabcd
10 files changed
+234 -98

No files matched your search

+8
View File
@@ -1346,6 +1346,14 @@ function applyLayout(mode) {
button.setAttribute("aria-pressed", String(mode !== "grid"));
}
$("#exportLibrary").addEventListener("click", () => {
const params = filterParams();
params.delete("page");
params.delete("per_page");
params.set("format", "csv");
window.location.href = `/api/export?${params}`;
});
$("#layoutToggle").addEventListener("click", () => {
const current = grid.dataset.layout || "grid";
const mode = current === "grid" ? "list" : current === "list" ? "table" : "grid";
+2
View File
@@ -217,6 +217,8 @@ try {
</select>
<button id="layoutToggle" class="ghost toolbar-select" type="button"
aria-pressed="false" title="Компактный список" aria-keyshortcuts="g">список</button>
<button id="exportLibrary" class="ghost toolbar-select" type="button"
title="Экспорт текущего фильтра в CSV">экспорт</button>
<button id="selectMode" class="ghost toolbar-select" type="button">выбрать</button>
<span class="count" id="count" aria-live="polite"></span>
</div>