Fix double navigation bug in breadcrumbs

This commit is contained in:
2026-01-27 15:33:25 +01:00
parent 70a22d4a06
commit 0723cb5331
9 changed files with 40 additions and 45 deletions

View File

@@ -1,5 +1,4 @@
<script lang="ts">
import { preventDefault } from 'svelte/legacy';
import { fs_encode_path } from "lib/FilesystemAPI.svelte";
import type { FSNavigator } from "./FSNavigator";
@@ -10,11 +9,7 @@ let { nav }: {
<div class="breadcrumbs">
{#each $nav.path as node, i (node.path)}
<a
href={"/d"+fs_encode_path(node.path)}
class="breadcrumb button flat"
onclick={preventDefault(() => {nav.navigate(node.path, true)})}
>
<a href={"/d"+fs_encode_path(node.path)} class="breadcrumb button flat">
{#if node.abuse_type !== undefined}
<i class="icon small">block</i>
{:else if node.is_shared()}