mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-16 09:12:48 +09:00
improve: transition between folders with previewable items (i.e, images) less rough
This commit is contained in:
@@ -32,8 +32,11 @@
|
|||||||
if(preview_url != null) return;
|
if(preview_url != null) return;
|
||||||
if(fs_id == null) return;
|
if(fs_id == null) return;
|
||||||
let url = await fs.get_url(fs_id);
|
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>
|
</script>
|
||||||
|
|||||||
@@ -286,7 +286,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<div class="absolute inset-0 overflow-auto bg-slate-50"
|
<div class="absolute inset-0 overflow-auto bg-slate-50"
|
||||||
on:drop={on_drop} on:dragover={on_drop_over} bind:this={node_ref}>
|
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}>
|
on:contextmenu|self={show_void_menu}>
|
||||||
{#if sorted_items}
|
{#if sorted_items}
|
||||||
{#each sorted_items as item (item.id)}
|
{#each sorted_items as item (item.id)}
|
||||||
|
|||||||
Reference in New Issue
Block a user