Show error on error (#1500)

* changes

* changes

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
aliabid94 2022-06-10 12:55:30 -07:00 committed by GitHub
parent ef027cf6a7
commit 4564a8136c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View File

@ -253,6 +253,7 @@
})
.catch((error) => {
console.error(error);
loading_status.update(i, "error", 0, 0);
});
handled_dependencies[i] = [-1];
@ -302,6 +303,7 @@
})
.catch((error) => {
console.error(error);
loading_status.update(i, "error", 0, 0);
});
});

View File

@ -45,7 +45,6 @@
export let queue_position: number | null;
export let status: "complete" | "pending" | "error";
export let timer: boolean = true;
export let cover_all: boolean = false;
let el: HTMLDivElement;
@ -112,7 +111,6 @@
<div
class="wrap"
class:opacity-0={!status || status === "complete"}
class:z-50={cover_all}
bind:this={el}
>
{#if status === "pending"}
@ -141,7 +139,7 @@
<style lang="postcss">
.wrap {
@apply absolute inset-0 z-10 flex flex-col justify-center items-center bg-white dark:bg-gray-800 pointer-events-none transition-opacity max-h-screen;
@apply absolute inset-0 z-50 flex flex-col justify-center items-center bg-white dark:bg-gray-800 pointer-events-none transition-opacity max-h-screen;
}
:global(.dark) .wrap {

View File

@ -210,8 +210,7 @@ function create_custom_element() {
props: {
status: "pending",
timer: false,
queue_position: null,
cover_all: true
queue_position: null
}
});
@ -238,8 +237,7 @@ async function unscoped_mount() {
props: {
status: "pending",
timer: false,
queue_position: null,
cover_all: true
queue_position: null
}
});