web/PopoverContainer: refactor & simplify code

why the fuck was it that way in the first place
This commit is contained in:
wukko
2025-03-07 20:47:43 +06:00
parent 3935396709
commit 714e71751e
3 changed files with 14 additions and 20 deletions

View File

@@ -47,11 +47,14 @@
$: indeterminate = queue.length > 0 && totalProgress === 0;
const popoverAction = async () => {
const popoverAction = () => {
expanded = !expanded;
if (expanded) updateQuota();
};
$: if (expanded) {
updateQuota();
}
onNavigate(() => {
expanded = false;
});
@@ -59,21 +62,20 @@
onMount(() => {
// clear old files from storage on first page load
clearFileStorage();
})
});
</script>
<div id="processing-queue" class:expanded>
<ProcessingStatus
progress={totalProgress * 100}
{indeterminate}
expandAction={popover?.showPopover}
expandAction={popoverAction}
/>
<PopoverContainer
bind:this={popover}
id="processing-popover"
{expanded}
{popoverAction}
expandStart="right"
>
<div id="processing-header">