mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 01:18:27 +00:00
web/ProcessingQueue: remove estimated storage usage
it's broken in pretty much all browsers and shows inaccurate info
This commit is contained in:
parent
84e8160999
commit
064de55b3b
@ -3,8 +3,7 @@
|
||||
import { t } from "$lib/i18n/translations";
|
||||
import { onNavigate } from "$app/navigation";
|
||||
|
||||
import { formatFileSize } from "$lib/util";
|
||||
import { clearFileStorage, getStorageQuota } from "$lib/storage";
|
||||
import { clearFileStorage } from "$lib/storage";
|
||||
|
||||
import { queueVisible } from "$lib/state/queue-visibility";
|
||||
import { currentTasks } from "$lib/state/task-manager/current-tasks";
|
||||
@ -18,13 +17,6 @@
|
||||
|
||||
import IconX from "@tabler/icons-svelte/IconX.svelte";
|
||||
|
||||
let quotaUsage = 0;
|
||||
|
||||
const updateQuota = async () => {
|
||||
const storageInfo = await getStorageQuota();
|
||||
quotaUsage = storageInfo?.usage || 0;
|
||||
}
|
||||
|
||||
const popoverAction = () => {
|
||||
$queueVisible = !$queueVisible;
|
||||
};
|
||||
@ -50,10 +42,6 @@
|
||||
|
||||
$: indeterminate = queue.length > 0 && totalProgress === 0;
|
||||
|
||||
$: if ($queueVisible) {
|
||||
updateQuota();
|
||||
}
|
||||
|
||||
onNavigate(() => {
|
||||
$queueVisible = false;
|
||||
});
|
||||
@ -88,7 +76,6 @@
|
||||
{#if queue.length}
|
||||
<button class="clear-button" on:click={() => {
|
||||
clearQueue();
|
||||
updateQuota();
|
||||
}}>
|
||||
<IconX />
|
||||
{$t("button.clear")}
|
||||
@ -96,12 +83,6 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if quotaUsage}
|
||||
<div class="storage-info">
|
||||
{$t("queue.estimated_storage_usage")} {formatFileSize(quotaUsage)}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="processing-list">
|
||||
{#each queue as [id, item]}
|
||||
@ -162,12 +143,6 @@
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.storage-info {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: var(--gray);
|
||||
}
|
||||
|
||||
.header-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
Loading…
Reference in New Issue
Block a user