Add export button for channel data and update API integration
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user