2021-10-31 17:38:05 +01:00
|
|
|
<script>
|
|
|
|
import { formatDataVolume } from "../util/Formatting.svelte"
|
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
|
|
|
|
2022-01-11 13:28:22 +01:00
|
|
|
{#if frac > 0.99}
|
2022-04-19 13:02:31 +02:00
|
|
|
<div class="highlight_yellow">
|
2022-01-11 13:28:22 +01:00
|
|
|
You have used all of your data cap. People can still download your
|
2022-04-19 13:02:31 +02:00
|
|
|
files, but advertisements are shown and hotlinking is disabled.
|
2022-01-11 13:28:22 +01:00
|
|
|
<br/>
|
|
|
|
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
|
|
|
|
Upgrade options
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{:else if frac > 0.8}
|
2022-04-19 13:02:31 +02:00
|
|
|
<div class="highlight_blue">
|
2022-01-11 13:28:22 +01:00
|
|
|
You have used {(frac*100).toFixed(0)}% of your data cap. If your
|
|
|
|
data runs out people won't be able to download your files directly
|
|
|
|
from the API anymore, ads will be shown on the file viewer and
|
|
|
|
transfer rates will be limited.
|
|
|
|
<br/>
|
|
|
|
<a class="button button_highlight" href="https://www.patreon.com/join/pixeldrain">
|
|
|
|
Upgrade options
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{/if}
|