fix loading indicator for traversing warrens
This commit is contained in:
@@ -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)" />
|
||||
|
||||
Reference in New Issue
Block a user