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:
lrnselfreliance 2022-05-16 17:56:55 -06:00 • committed by Roland
parent 2314c3462f
commit 0765890b8b
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
12 changed files with 238 additions and 99 deletions

View file

@ -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);