mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Show error on error (#1500)
* changes * changes * formatting Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
ef027cf6a7
commit
4564a8136c
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user