fix: title
This commit is contained in:
@ -52,12 +52,23 @@ const LoadingCircle: Component<{
|
||||
export const ProcessingImages: Component = () => {
|
||||
const notifications = useNotifications();
|
||||
|
||||
const processingNumber = () =>
|
||||
Object.keys(notifications.state.ProcessingImages).length;
|
||||
|
||||
return (
|
||||
<Popover sameWidth gutter={4}>
|
||||
<Popover.Trigger class="w-full flex justify-between rounded-xl bg-slate-800 text-gray-100 px-4 py-2">
|
||||
<p class="text-md">Processing Images</p>
|
||||
<Show
|
||||
when={Object.keys(notifications.state.ProcessingImages).length === 0}
|
||||
when={processingNumber() > 0}
|
||||
fallback={<p class="text-md">No images to process</p>}
|
||||
>
|
||||
<p class="text-md">
|
||||
Processing {processingNumber()}{" "}
|
||||
{processingNumber() === 1 ? "image" : "images"}
|
||||
</p>
|
||||
</Show>
|
||||
<Show
|
||||
when={processingNumber() === 0}
|
||||
fallback={<LoadingCircle status="loading" />}
|
||||
>
|
||||
<LoadingCircle status="complete" />
|
||||
|
Reference in New Issue
Block a user