Add path to bookmarks, add logout button
This commit is contained in:
@@ -14,6 +14,7 @@ import FsUploadWidget from "filesystem/upload_widget/FSUploadWidget.svelte";
|
||||
import EditWindow from "filesystem/edit_window/EditWindow.svelte";
|
||||
import { FileAction, type FileEvent } from "./FileManagerLib";
|
||||
import FileMenu from "./FileMenu.svelte";
|
||||
import { loading_finish, loading_start } from "lib/Loading";
|
||||
|
||||
export let nav: FSNavigator
|
||||
export let upload_widget: FsUploadWidget
|
||||
@@ -117,9 +118,9 @@ const delete_selected = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
nav.set_loading(true)
|
||||
|
||||
try {
|
||||
loading_start()
|
||||
|
||||
// Save all promises with deletion requests in an array
|
||||
let promises = []
|
||||
nav.children.forEach(child => {
|
||||
@@ -136,7 +137,7 @@ const delete_selected = async () => {
|
||||
alert("Delete failed: " + err.message + " ("+err.value+")")
|
||||
} finally {
|
||||
viewing_mode()
|
||||
nav.reload()
|
||||
loading_finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,11 +265,10 @@ const move_start = () => {
|
||||
}
|
||||
|
||||
const move_here = async () => {
|
||||
nav.set_loading(true)
|
||||
|
||||
let target_dir = nav.base.path + "/"
|
||||
|
||||
const target_dir = nav.base.path + "/"
|
||||
try {
|
||||
loading_start()
|
||||
|
||||
let promises = []
|
||||
moving_items.forEach(item => {
|
||||
console.log("moving", item.path, "to", target_dir + item.name)
|
||||
@@ -283,6 +283,7 @@ const move_here = async () => {
|
||||
} finally {
|
||||
viewing_mode()
|
||||
nav.reload()
|
||||
loading_finish()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,6 +425,7 @@ onMount(() => {
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
height: 100%; /* Used for drop target */
|
||||
}
|
||||
.width_container {
|
||||
position: sticky;
|
||||
|
Reference in New Issue
Block a user