fix loading indicator for traversing warrens

This commit is contained in:
2025-07-18 14:45:21 +02:00
parent 4c3e54daca
commit 48cbd532c2
4 changed files with 33 additions and 16 deletions

View File

@@ -47,20 +47,28 @@ async function submitDelete(force: boolean = false) {
async function openRenameDialog() {
renameDialog.openDialog(entry);
}
async function onClick() {
if (warrenStore.loading) {
return;
}
warrenStore.addToCurrentWarrenPath(entry.name);
}
</script>
<template>
<ContextMenu>
<ContextMenuTrigger>
<button
:disabled="warrenStore.loading"
:class="[
'bg-accent/30 border-border flex w-52 flex-row gap-4 overflow-hidden rounded-md border-1 px-4 py-2 select-none',
{
'pointer-events-none':
disabled || entry.fileType === 'file',
'pointer-events-none': entry.fileType === 'file',
},
]"
@click="() => warrenStore.addToCurrentWarrenPath(entry.name)"
@click="onClick"
>
<div class="flex flex-row items-center">
<Icon class="size-6" :name="getFileIcon(entry.mimeType)" />