Add bulk download button for filesystem

This commit is contained in:
2024-05-08 18:29:59 +02:00
parent 1cf6c90c2e
commit 7bc35e912c
4 changed files with 14 additions and 16 deletions

View File

@@ -94,7 +94,11 @@ const keydown = e => {
};
const download = () => {
download_frame.src = fs_path_url(state.base.path) + "?attach"
if (state.base.type === "file") {
download_frame.src = fs_path_url(state.base.path) + "?attach"
} else if (state.base.type === "dir") {
download_frame.src = fs_path_url(state.base.path) + "?bulk_download"
}
}
const search = async () => {

View File

@@ -112,12 +112,10 @@ let expand = e => {
<div class="separator hidden_horizontal"></div>
{#if state.base.type === "file"}
<button on:click={() => dispatch("download")}>
<i class="icon">save</i>
<span>Download</span>
</button>
{/if}
<button on:click={() => dispatch("download")}>
<i class="icon">save</i>
<span>Download</span>
</button>
{#if share_url !== ""}
<button on:click={copy_link} class:button_highlight={link_copied}>