web/ProcessingQueue: remove estimated storage usage

it's broken in pretty much all browsers and shows inaccurate info
This commit is contained in:
wukko 2025-04-23 23:09:32 +06:00
parent 84e8160999
commit 064de55b3b
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -3,8 +3,7 @@
import { t } from "$lib/i18n/translations"; import { t } from "$lib/i18n/translations";
import { onNavigate } from "$app/navigation"; import { onNavigate } from "$app/navigation";
import { formatFileSize } from "$lib/util"; import { clearFileStorage } from "$lib/storage";
import { clearFileStorage, getStorageQuota } from "$lib/storage";
import { queueVisible } from "$lib/state/queue-visibility"; import { queueVisible } from "$lib/state/queue-visibility";
import { currentTasks } from "$lib/state/task-manager/current-tasks"; import { currentTasks } from "$lib/state/task-manager/current-tasks";
@ -18,13 +17,6 @@
import IconX from "@tabler/icons-svelte/IconX.svelte"; import IconX from "@tabler/icons-svelte/IconX.svelte";
let quotaUsage = 0;
const updateQuota = async () => {
const storageInfo = await getStorageQuota();
quotaUsage = storageInfo?.usage || 0;
}
const popoverAction = () => { const popoverAction = () => {
$queueVisible = !$queueVisible; $queueVisible = !$queueVisible;
}; };
@ -50,10 +42,6 @@
$: indeterminate = queue.length > 0 && totalProgress === 0; $: indeterminate = queue.length > 0 && totalProgress === 0;
$: if ($queueVisible) {
updateQuota();
}
onNavigate(() => { onNavigate(() => {
$queueVisible = false; $queueVisible = false;
}); });
@ -88,7 +76,6 @@
{#if queue.length} {#if queue.length}
<button class="clear-button" on:click={() => { <button class="clear-button" on:click={() => {
clearQueue(); clearQueue();
updateQuota();
}}> }}>
<IconX /> <IconX />
{$t("button.clear")} {$t("button.clear")}
@ -96,12 +83,6 @@
{/if} {/if}
</div> </div>
</div> </div>
{#if quotaUsage}
<div class="storage-info">
{$t("queue.estimated_storage_usage")} {formatFileSize(quotaUsage)}
</div>
{/if}
</div> </div>
<div id="processing-list"> <div id="processing-list">
{#each queue as [id, item]} {#each queue as [id, item]}
@ -162,12 +143,6 @@
gap: 6px; gap: 6px;
} }
.storage-info {
font-size: 12px;
font-weight: 500;
color: var(--gray);
}
.header-buttons { .header-buttons {
display: flex; display: flex;
flex-direction: row; flex-direction: row;