fix: title

This commit is contained in:
2025-07-02 14:26:33 +01:00
parent a4a8c191b6
commit be302b77d4

View File

@ -52,12 +52,23 @@ const LoadingCircle: Component<{
export const ProcessingImages: Component = () => { export const ProcessingImages: Component = () => {
const notifications = useNotifications(); const notifications = useNotifications();
const processingNumber = () =>
Object.keys(notifications.state.ProcessingImages).length;
return ( return (
<Popover sameWidth gutter={4}> <Popover sameWidth gutter={4}>
<Popover.Trigger class="w-full flex justify-between rounded-xl bg-slate-800 text-gray-100 px-4 py-2"> <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 <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" />} fallback={<LoadingCircle status="loading" />}
> >
<LoadingCircle status="complete" /> <LoadingCircle status="complete" />