Remove some event dispatchers
This commit is contained in:
@@ -1,83 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import { formatDataVolume, formatDuration } from "util/Formatting";
|
||||
import { stats } from "lib/StatsSocket"
|
||||
import TextBlock from "./TextBlock.svelte"
|
||||
import IconBlock from "./IconBlock.svelte";
|
||||
import { user } from "lib/UserStore";
|
||||
|
||||
let dispatch = createEventDispatcher()
|
||||
|
||||
let {
|
||||
file_size = 0,
|
||||
file_name = "",
|
||||
file_type = "",
|
||||
icon_href = ""
|
||||
}: {
|
||||
file_size?: number;
|
||||
file_name?: string;
|
||||
file_type?: string;
|
||||
icon_href?: string;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<TextBlock>
|
||||
<img src="/res/img/slow_down.webp" class="header_image" alt="Yea, I'm gonna need you to slow down a bit"/>
|
||||
<p>
|
||||
Pixeldrain's free tier is supported by my Patrons. There's only so much
|
||||
that you can do with the budget they provide.
|
||||
{formatDataVolume($stats.limits.transfer_limit, 3)} per day is about the
|
||||
most I can give away for free while keeping it fair for everyone, and
|
||||
according to our records you have already downloaded
|
||||
{formatDataVolume($stats.limits.transfer_limit_used, 3)}.
|
||||
</p>
|
||||
<p>
|
||||
It's not that I want to withold this file from you, it's just that I
|
||||
don't want pixeldrain to fall into bankruptcy like so many of the
|
||||
websites that came before me. So if you really want this file you have a
|
||||
few options:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
Come back tomorrow when your free transfer limit resets
|
||||
</li>
|
||||
<li>
|
||||
Download the file at a limited rate of {formatDataVolume($stats.limits.speed_limit, 3)}/s. This will take at
|
||||
least {formatDuration((file_size/($stats.limits.speed_limit))*1000, 0)}
|
||||
</li>
|
||||
<li>
|
||||
<a href="/user/prepaid/deposit" target="_blank" class="button button_highlight">
|
||||
<i class="icon">bolt</i> Get Premium
|
||||
</a>
|
||||
and earn my eternal gratitude
|
||||
{#if $user.username === undefined || $user.username === ""}
|
||||
(you will need a <a href="/register">pixeldrain account</a> to
|
||||
receive the benefits)
|
||||
{/if}
|
||||
</li>
|
||||
</ul>
|
||||
</TextBlock>
|
||||
|
||||
<IconBlock icon_href={icon_href}>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td colspan="2">{file_name}</td></tr>
|
||||
<tr><td>Type</td><td>{file_type}</td></tr>
|
||||
<tr><td>Size</td><td>{formatDataVolume(file_size, 3)}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<button onclick={() => {dispatch("download")}}>
|
||||
<i class="icon">download</i> Download
|
||||
</button>
|
||||
</IconBlock>
|
||||
|
||||
<TextBlock>
|
||||
Also, I believe you have my stapler. Please give it back.
|
||||
</TextBlock>
|
||||
|
||||
<style>
|
||||
.header_image {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user