Add export button for channel data and update API integration

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-25 22:12:14 +02:00
parent 612fa28ec6
commit be02eed378
3 changed files with 132 additions and 34 deletions
+8
View File
@@ -84,6 +84,14 @@ function renderChannels(channels) {
await refreshDashboard();
});
node.querySelector(".export-btn").addEventListener("click", async () => {
await api("/api/jobs/export-channel", {
method: "POST",
body: JSON.stringify({ channel_id: channel.channel_id }),
});
await refreshDashboard();
});
node.querySelector(".export-view-btn").addEventListener("click", () => {
window.location.href = `/viewer?channel=${encodeURIComponent(channel.channel_id)}`;
});
+1 -2
View File
@@ -194,8 +194,7 @@
<td class="last-date"></td>
<td>
<div class="action-row">
<button class="button button-small scrape-btn">Scrape</button>
<button class="button button-small export-view-btn">Viewer</button>
<button class="button button-small scrape-btn">Scrape</button> <button class="button button-small export-btn">Export</button> <button class="button button-small export-view-btn">Viewer</button>
<button class="button button-small media-btn">Rescrape media</button>
<button class="button button-small danger remove-btn">Удалить</button>
</div>