Update to svelte 5
This commit is contained in:
@@ -5,17 +5,23 @@ import type { FSNavigator } from "filesystem/FSNavigator";
|
||||
import { FileAction } from "./FileManagerLib";
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
export let nav: FSNavigator
|
||||
export let show_hidden = false
|
||||
export let large_icons = false
|
||||
let {
|
||||
nav,
|
||||
show_hidden = false,
|
||||
large_icons = false
|
||||
}: {
|
||||
nav: FSNavigator;
|
||||
show_hidden?: boolean;
|
||||
large_icons?: boolean;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div class="gallery">
|
||||
{#each $nav.children as child, index (child.path)}
|
||||
<a class="file"
|
||||
href={"/d"+fs_encode_path(child.path)}
|
||||
on:click={e => dispatch("file", {index: index, action: FileAction.Click, original: e})}
|
||||
on:contextmenu={e => dispatch("file", {index: index, action: FileAction.Context, original: e})}
|
||||
onclick={e => dispatch("file", {index: index, action: FileAction.Click, original: e})}
|
||||
oncontextmenu={e => dispatch("file", {index: index, action: FileAction.Context, original: e})}
|
||||
class:selected={child.fm_selected}
|
||||
class:hidden={child.name.startsWith(".") && !show_hidden}
|
||||
class:large_icons
|
||||
|
||||
Reference in New Issue
Block a user