improve: transition between folders with previewable items (i.e, images) less rough

This commit is contained in:
Bao Nguyen
2023-02-18 15:11:59 +07:00
parent 31f63bcc87
commit dce1d6a055
2 changed files with 6 additions and 3 deletions

View File

@@ -32,8 +32,11 @@
if(preview_url != null) return;
if(fs_id == null) return;
let url = await fs.get_url(fs_id);
// console.log('load', fs_id, 'with url', url);
preview_url = `url(${url})`;
let image = new Image();
image.src = url;
image.onload = () => preview_url = `url(${url})`;
}
</script>

View File

@@ -286,7 +286,7 @@
</style>
<div class="absolute inset-0 overflow-auto bg-slate-50"
on:drop={on_drop} on:dragover={on_drop_over} bind:this={node_ref}>
<div class="w-full min-h-full" class:hidden={id == null}
<div class="w-full min-h-[90%]" class:hidden={id == null}
on:contextmenu|self={show_void_menu}>
{#if sorted_items}
{#each sorted_items as item (item.id)}