Remove the need to provide a bucket ID to each API call
This commit is contained in:
@@ -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") {
|
||||
|
@@ -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
|
||||
|
@@ -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>
|
||||
|
@@ -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}
|
||||
|
Reference in New Issue
Block a user