Remove the need to provide a bucket ID to each API call

This commit is contained in:
2023-05-30 15:51:10 +02:00
parent 2647a22c91
commit 0299b730a5
23 changed files with 95 additions and 96 deletions

View File

@@ -12,9 +12,7 @@ let create_dir = () => {
let form = new FormData()
form.append("type", "dir")
fs_mkdir(
state.root.id, state.base.path+"/"+new_dir_name,
).then(resp => {
fs_mkdir(state.base.path+"/"+new_dir_name).then(resp => {
new_dir_name = "" // Clear input field
}).catch(err => {
if (err.value && err.value === "node_already_exists") {

View File

@@ -75,7 +75,7 @@ const delete_selected = () => {
let promises = []
state.children.forEach(child => {
if (!child.fm_selected) { return }
promises.push(fs_delete(state.root.id, child.path))
promises.push(fs_delete(child.path))
})
// Wait for all the promises to finish

View File

@@ -19,7 +19,7 @@ export let show_hidden = false
<div
class="icon_container"
class:cover={fs_node_type(child) === "image" || fs_node_type(child) === "video"}
style='background-image: url("{fs_node_icon(state.root.id, child, 256, 256)}");'>
style='background-image: url("{fs_node_icon(child, 256, 256)}");'>
</div>
{child.name}
</a>

View File

@@ -25,7 +25,7 @@ export let show_hidden = false
class:hidden={child.name.startsWith(".") && !show_hidden}
>
<td>
<img src={fs_node_icon(state.root.id, child, 32, 32)} class="node_icon" alt="icon"/>
<img src={fs_node_icon(child, 32, 32)} class="node_icon" alt="icon"/>
</td>
<td class="node_name">
{child.name}