Change filesystem navigator into a class with a svelte store implementation

This commit is contained in:
2024-08-09 13:02:07 +02:00
parent c481a89051
commit 69744e41a6
28 changed files with 534 additions and 530 deletions

View File

@@ -9,7 +9,7 @@ import SharingOptions from "./SharingOptions.svelte";
let dispatch = createEventDispatcher()
export let fs_navigator
export let nav
let file = {
path: "",
name: "",
@@ -117,9 +117,9 @@ const save = async (keep_editing = false) => {
}
if (open_after_edit) {
fs_navigator.navigate(file.path, false)
nav.navigate(file.path, false)
} else {
fs_navigator.reload()
nav.reload()
}
if (keep_editing) {
@@ -149,7 +149,7 @@ const save = async (keep_editing = false) => {
<div class="tab_content">
{#if tab === "file"}
<FileOptions
fs_navigator={fs_navigator}
nav={nav}
bind:file
bind:new_name
bind:visible