mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 11:56:18 -05:00
Feature/127 archive UI rework (#131)
* Archives have their own page. Delete/etc buttons are moved into ArchivePage. * Alternatives for an Archive are displayed in the ArchivePage. * ArchiveDownloader returns the location. * Removing color from Details button. * Making Archive screenshot and title a link. * Preserving next_download when updating a Channel. * Removing button icons from Archive page.
This commit is contained in:
parent
2314c3462f
commit
0765890b8b
12 changed files with 238 additions and 99 deletions
|
|
@ -430,6 +430,21 @@ export async function fetchDomains() {
|
|||
}
|
||||
}
|
||||
|
||||
export async function getArchive(archiveId) {
|
||||
const response = await apiGet(`${ARCHIVES_API}/${archiveId}`);
|
||||
if (response.status === 200) {
|
||||
const data = await response.json();
|
||||
return [data['archive'], data['alternatives']];
|
||||
} else {
|
||||
toast({
|
||||
type: 'error',
|
||||
title: 'Archive Error',
|
||||
description: 'Unable to get Archive. See server logs.',
|
||||
time: 5000,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function postDownload(urls, downloader) {
|
||||
let body = {urls: urls, downloader: downloader};
|
||||
let response = await apiPost(`${API_URI}/download`, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue