mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-25 12:52:09 +00:00
added not_found
This commit is contained in:
parent
3456e27d25
commit
a612e7f3ef
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue