Increase cache duration, fix bandwidth warning

This commit is contained in:
2021-11-24 11:51:39 +01:00
parent 55f7cf7307
commit 7b5931b963
7 changed files with 21 additions and 17 deletions

View File

@@ -439,17 +439,16 @@ const keyboard_event = evt => {
<div id="file_preview_window" class="file_preview_window">
<div id="toolbar" class="toolbar" class:toolbar_visible><div><div>
{#if view === "file"}
<FileStats file={file}></FileStats>
<hr/>
{/if}
{#if is_list}
<button on:click={toggle_gallery} class="toolbar_button button_full_width" class:button_highlight={view === "gallery"}>
<i class="icon">photo_library</i>
Gallery
</button>
<hr/>
{/if}
{#if view === "file"}
<FileStats file={file}></FileStats>
<hr/>
{/if}
{#if file.abuse_type === "" && view === "file"}
@@ -713,7 +712,7 @@ const keyboard_event = evt => {
text-align: center;
vertical-align: middle;
transition: left 0.5s, right 0.5s;
overflow: auto;
overflow: hidden;
box-shadow: inset 2px 2px 10px 2px var(--shadow_color);
border-radius: 16px;
}

View File

@@ -77,6 +77,9 @@ const delete_file = async index => {
.gallery{
padding: 16px;
box-sizing: border-box;
width: 100%;
height: 100%;
overflow: auto;
}
.file{
position: relative;

View File

@@ -9,6 +9,7 @@ export let file = {
name: "",
mime_type: "",
icon_href: "",
show_ads: false,
}
</script>
@@ -24,7 +25,7 @@ export let file = {
<i class="icon">save</i> Download
</button>
</div>
{#if file.size > 5e8}
{#if file.show_ads && file.size > 5e8}
<br/>
<div class="description" style="max-width: 700px; text-align: center;">
<!-- If the file is larger than 500 MB-->

View File

@@ -11,6 +11,7 @@ export let file = {
get_href: "",
icon_href: "",
allow_video_player: true,
show_ads: false,
}
$: loop = file.name.includes(".loop.")
@@ -84,7 +85,7 @@ let download = () => { dispatch("download", {}) }
<i class="icon">save</i> Download
</button>
</div>
{#if file.size > 5e8}
{#if file.show_ads && file.size > 5e8}
<br/>
<div class="description" style="max-width: 700px; text-align: center;">
<!-- If the file is larger than 500 MB-->