2021-10-31 17:38:05 +01:00
|
|
|
<script>
|
2021-11-23 14:22:42 +01:00
|
|
|
import ProgressBar from "../util/ProgressBar.svelte";
|
2021-10-31 17:38:05 +01:00
|
|
|
|
|
|
|
export let total = 0
|
|
|
|
export let used = 0
|
|
|
|
|
|
|
|
$: frac = used / total
|
|
|
|
</script>
|
|
|
|
|
2022-01-11 13:28:22 +01:00
|
|
|
<ProgressBar total={total} used={used}></ProgressBar>
|
2021-10-31 17:38:05 +01:00
|
|
|
|
2023-09-15 12:02:36 +02:00
|
|
|
{#if frac > 1}
|
2022-04-19 13:02:31 +02:00
|
|
|
<div class="highlight_yellow">
|
2023-09-15 12:02:36 +02:00
|
|
|
<p>
|
|
|
|
You have used all of your data cap. People can still download your
|
|
|
|
files, but premium features are disabled. This means that the
|
|
|
|
download page shows pixeldrain branding, people who download your
|
|
|
|
files have a daily download limit and hotlinking is disabled.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{#if window.user.monthly_transfer_cap > 0}
|
|
|
|
<p>
|
|
|
|
You have a billshock limit configured. <a
|
|
|
|
href="/user/sharing/bandwidth">increase or disable the limit</a> to
|
|
|
|
continue sharing files.
|
|
|
|
</p>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<a class="button button_highlight" href="/#pro">
|
|
|
|
<i class="icon">bolt</i> Upgrade options
|
2022-01-11 13:28:22 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{:else if frac > 0.8}
|
2022-04-19 13:02:31 +02:00
|
|
|
<div class="highlight_blue">
|
2023-09-15 12:02:36 +02:00
|
|
|
<p>
|
|
|
|
You have used {(frac*100).toFixed(0)}% of your data cap. If your
|
2023-09-15 18:10:35 +02:00
|
|
|
data runs out the premium features related to downloading will be
|
|
|
|
disabled. This means that the download page shows pixeldrain
|
|
|
|
branding, people who download your files have a daily download limit
|
|
|
|
and hotlinking is disabled.
|
2023-09-15 12:02:36 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
{#if window.user.monthly_transfer_cap > 0}
|
|
|
|
<p>
|
|
|
|
You have a billshock limit configured. <a
|
|
|
|
href="/user/sharing/bandwidth">increase or disable the limit</a> to
|
|
|
|
continue sharing files.
|
|
|
|
</p>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<a class="button button_highlight" href="/#pro">
|
|
|
|
<i class="icon">bolt</i> Upgrade options
|
2022-01-11 13:28:22 +01:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{/if}
|