Files
fnx_web/svelte/src/layout/SlowDown.svelte

73 lines
2.2 KiB
Svelte
Raw Normal View History

2022-03-05 10:49:12 +01:00
<script>
2023-01-17 22:53:51 +01:00
import { createEventDispatcher } from "svelte";
2024-09-05 17:28:31 +02:00
import { formatDataVolume, formatDuration } from "../util/Formatting.svelte";
import { stats } from "src/util/StatsSocket.js"
import TextBlock from "src/layout/TextBlock.svelte"
import IconBlock from "src/layout/IconBlock.svelte";
2022-03-05 10:49:12 +01:00
let dispatch = createEventDispatcher()
2024-09-05 17:28:31 +02:00
export let file_size = 0
export let file_name = ""
export let file_type = ""
export let icon_href = ""
2022-03-05 10:49:12 +01:00
</script>
2023-01-17 19:03:14 +01:00
<TextBlock>
2022-03-05 10:49:12 +01:00
<img src="/res/img/slow_down.webp" class="header_image" alt="Yea, I'm gonna need you to slow down a bit"/>
<p>
2024-09-05 17:28:31 +02:00
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)}.
2022-03-05 10:49:12 +01:00
</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
2022-03-28 12:34:28 +02:00
websites that came before me. So if you really want this file you have a
few options:
2022-03-05 10:49:12 +01:00
</p>
<ul>
<li>
Come back tomorrow when your free transfer limit resets
</li>
2022-03-05 10:49:12 +01:00
<li>
2024-09-05 17:28:31 +02:00
Download the file at a limited rate of 1 MiB/s. This will take at
least {formatDuration((file_size/(1<<20))*1000, 0)}
2022-03-05 10:49:12 +01:00
</li>
<li>
<a href="/#pro" target="_blank" class="button button_highlight">
<i class="icon">bolt</i> Upgrade your account
2022-03-05 10:49:12 +01:00
</a>
and earn my eternal gratitude
{#if !window.user_authenticated}
(you will need a <a href="/register">pixeldrain account</a> to
receive the benefits)
{/if}
</li>
</ul>
2023-01-17 22:53:51 +01:00
</TextBlock>
2024-09-05 17:28:31 +02:00
<IconBlock icon_href={icon_href}>
<table>
<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>
</table>
2023-01-17 22:53:51 +01:00
<button on:click={() => {dispatch("download")}}>
<i class="icon">download</i> Download
</button>
</IconBlock>
<TextBlock>
Also, I believe you have my stapler. Please give it back.
2022-03-05 10:49:12 +01:00
</TextBlock>
<style>
.header_image {
width: 100%;
border-radius: 8px;
}
</style>