UX: add proper delete dialog, add option to report images

This commit is contained in:
Pieter Vander Vennet 2024-11-05 00:18:16 +01:00
parent 8690ad35bb
commit 5b618dc367
18 changed files with 334 additions and 176 deletions

View file

@ -88,4 +88,12 @@ export default abstract class ImageProvider {
}): Promise<LicenseInfo>
public abstract apiUrls(): string[]
public static async offerImageAsDownload(image: ProvidedImage){
const response = await fetch(image.url_hd ?? image.url)
const blob = await response.blob()
Utils.offerContentsAsDownloadableFile(blob, new URL(image.url).pathname.split("/").at(-1), {
mimetype: "image/jpg",
})
}
}