Rebounce navigation events
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { global_navigator } from "filesystem/FSNavigator";
|
||||
import { fs_encode_path, FSNode } from "lib/FilesystemAPI.svelte";
|
||||
import { highlight_current_page } from "lib/HighlightCurrentPage";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
let siblings: FSNode[] = $state([])
|
||||
@@ -25,9 +26,9 @@ onMount(() => {
|
||||
<div class="row">
|
||||
<a class="button" href="/d{fs_encode_path(node.path)}">
|
||||
{#if node.is_shared()}
|
||||
<i class="icon">folder_shared</i>
|
||||
<i class="icon small">folder_shared</i>
|
||||
{:else}
|
||||
<i class="icon">folder</i>
|
||||
<i class="icon small">folder</i>
|
||||
{/if}
|
||||
<span>{node.name}</span>
|
||||
</a>
|
||||
@@ -52,11 +53,13 @@ onMount(() => {
|
||||
{#each siblings as node}
|
||||
{#if !node.is_hidden()}
|
||||
<div class="row">
|
||||
<a class="button" href="/d{fs_encode_path(node.path)}">
|
||||
{#if node.type === "dir"}
|
||||
<i class="icon">folder</i>
|
||||
<a class="button" href="/d{fs_encode_path(node.path)}" use:highlight_current_page>
|
||||
{#if node.is_shared()}
|
||||
<i class="icon small">folder_shared</i>
|
||||
{:else if node.type === "dir"}
|
||||
<i class="icon small">folder</i>
|
||||
{:else}
|
||||
<i class="icon">image</i>
|
||||
<i class="icon small">image</i>
|
||||
{/if}
|
||||
<span>{node.name}</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user