mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
added not_found
This commit is contained in:
@@ -127,6 +127,7 @@ const WaifuImage = (taglist) => {
|
||||
'download': ImageState('downloading', 'Downloading image'),
|
||||
'done': ImageState('done', 'Finished!'),
|
||||
'error': ImageState('error', 'Error'),
|
||||
'notfound': ImageState('error', 'Not found!'),
|
||||
},
|
||||
});
|
||||
const downloadIndicator = MarginRevealer({
|
||||
@@ -204,6 +205,10 @@ const WaifuImage = (taglist) => {
|
||||
thisBlock.attribute.imageData = imageData;
|
||||
const { status, signature, url, extension, source, dominant_color, is_nsfw, width, height, tags } = thisBlock.attribute.imageData;
|
||||
thisBlock.attribute.isNsfw = is_nsfw;
|
||||
if (status == 404) {
|
||||
downloadState.shown = 'notfound';
|
||||
return;
|
||||
}
|
||||
if (status != 200) {
|
||||
downloadState.shown = 'error';
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user