Add bulk download button for filesystem
This commit is contained in:
@@ -4,18 +4,15 @@ import { onMount } from "svelte"
|
||||
let ad_type = ""
|
||||
|
||||
onMount(() => {
|
||||
// 30% pixeldrain socials
|
||||
// 20% reviews
|
||||
// 10% ad block promo
|
||||
// 40% patreon
|
||||
// 40% pixeldrain socials
|
||||
// 10% reviews
|
||||
// 50% patreon
|
||||
|
||||
let rand = Math.random()
|
||||
if (rand < 0.3) {
|
||||
if (rand < 0.4) {
|
||||
ad_type = "socials"
|
||||
} else if (rand < 0.5) {
|
||||
ad_type = "reviews"
|
||||
} else if (rand < 0.6) {
|
||||
ad_type = "ad_block"
|
||||
} else {
|
||||
ad_type = "patreon_support"
|
||||
}
|
||||
|
@@ -637,8 +637,7 @@ const keyboard_event = evt => {
|
||||
.headerbar > * {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
margin: 3px;
|
||||
}
|
||||
.headerbar > .file_viewer_headerbar_title {
|
||||
flex-grow: 1;
|
||||
|
@@ -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 () => {
|
||||
|
@@ -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}>
|
||||
|
Reference in New Issue
Block a user