Make copyrighted files available to the uploader

This commit is contained in:
2023-04-04 16:00:14 +02:00
parent e5fa6cfc88
commit 782492de35
7 changed files with 41 additions and 33 deletions

View File

@@ -1,12 +1,18 @@
<script>
import { createEventDispatcher } from "svelte";
import IconBlock from "./IconBlock.svelte"
import TextBlock from "./TextBlock.svelte"
let dispatch = createEventDispatcher()
export const set_file = f => file = f
let file = {
id: "",
name: "",
abuse_type: "",
abuse_reporter_name: "",
can_download: false,
icon_href: "",
}
</script>
@@ -36,3 +42,16 @@ let file = {
pixeldrain.
</p>
</TextBlock>
{#if file.can_download}
<IconBlock icon_href={file.icon_href}>
This file cannot be shared, but since you are the uploader of the file
you can still download it.
<br/>
<button class="button_highlight" on:click={() => {dispatch("download")}}>
<i class="icon">download</i>
<span>Download</span>
</button>
</IconBlock>
{/if}