Change filesystem navigator into a class with a svelte store implementation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user