2022-03-29 12:18:53 +02:00
|
|
|
<script>
|
2025-03-27 15:38:59 +01:00
|
|
|
import { formatDataVolume } from "util/Formatting.svelte";
|
|
|
|
import TextBlock from "layout/TextBlock.svelte"
|
|
|
|
import ProgressBar from "util/ProgressBar.svelte";
|
|
|
|
import { stats } from "lib/StatsSocket.mjs"
|
2022-04-26 14:51:11 +02:00
|
|
|
|
|
|
|
export let file = {
|
|
|
|
size: 0,
|
|
|
|
}
|
|
|
|
|
2024-04-25 14:50:42 +02:00
|
|
|
$: transfer_left = $stats.limits.transfer_limit - $stats.limits.transfer_limit_used
|
2022-03-29 12:18:53 +02:00
|
|
|
</script>
|
|
|
|
|
2024-04-25 14:50:42 +02:00
|
|
|
{#if $stats.limits_init}
|
2023-01-17 19:03:14 +01:00
|
|
|
<TextBlock center={true}>
|
2022-04-26 14:51:11 +02:00
|
|
|
{#if file.size > transfer_left}
|
|
|
|
<div class="highlight_yellow">
|
|
|
|
This file is too large to download completely with your current
|
|
|
|
transfer limit. The first {formatDataVolume(transfer_left, 3)}
|
|
|
|
will download at full speed, but the remaining
|
|
|
|
{formatDataVolume(file.size - transfer_left, 3)} will take
|
|
|
|
longer
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
2022-03-29 12:18:53 +02:00
|
|
|
<p>
|
2024-04-25 14:50:42 +02:00
|
|
|
You have used {formatDataVolume($stats.limits.transfer_limit_used, 3)} of
|
|
|
|
your daily {formatDataVolume($stats.limits.transfer_limit, 3)} transfer
|
2022-04-14 18:55:48 +02:00
|
|
|
limit. When the transfer limit is exceeded your download speed will
|
|
|
|
be reduced.
|
2022-03-29 12:18:53 +02:00
|
|
|
</p>
|
2022-04-26 14:51:11 +02:00
|
|
|
|
2022-03-29 12:18:53 +02:00
|
|
|
<p>
|
2022-04-14 18:55:48 +02:00
|
|
|
<strong>
|
2023-09-15 12:02:36 +02:00
|
|
|
<a href="/#pro" target="_blank" class="button button_highlight" rel="noreferrer">
|
|
|
|
<i class="icon">bolt</i> Upgrade your account
|
2022-04-14 18:55:48 +02:00
|
|
|
</a>
|
|
|
|
to disable the transfer limit
|
|
|
|
</strong>
|
2022-03-29 12:18:53 +02:00
|
|
|
</p>
|
|
|
|
|
2024-04-25 14:50:42 +02:00
|
|
|
<ProgressBar total={$stats.limits.transfer_limit} used={$stats.limits.transfer_limit_used}></ProgressBar>
|
2022-03-29 12:18:53 +02:00
|
|
|
</TextBlock>
|
|
|
|
{/if}
|