4
diff --git a/svelte/src/home_page/UploadProgressBar.svelte b/svelte/src/home_page/UploadProgressBar.svelte
index 8bcd25e..baf2621 100644
--- a/svelte/src/home_page/UploadProgressBar.svelte
+++ b/svelte/src/home_page/UploadProgressBar.svelte
@@ -78,10 +78,10 @@ const on_failure = (status, message) => {
}
export const start = () => {
- if (window.user_subscription.file_size_limit === 0) {
- window.user_subscription.file_size_limit = 5e9
+ if (window.user.subscription.file_size_limit === 0) {
+ window.user.subscription.file_size_limit = 5e9
}
- if (job.total_size > window.user_subscription.file_size_limit) {
+ if (job.total_size > window.user.subscription.file_size_limit) {
on_failure(
"file_too_large",
"This file is too large. Check out the Pro subscription to increase the file size limit"
diff --git a/svelte/src/user_home/Home.svelte b/svelte/src/user_home/Home.svelte
index bc570ab..ac3285d 100644
--- a/svelte/src/user_home/Home.svelte
+++ b/svelte/src/user_home/Home.svelte
@@ -2,6 +2,8 @@
import { onDestroy, onMount } from "svelte";
import { formatDataVolume, formatThousands } from "../util/Formatting.svelte";
import Chart from "../util/Chart.svelte";
+import StorageProgressBar from "./StorageProgressBar.svelte";
+import HotlinkProgressBar from "./HotlinkProgressBar.svelte";
let graph_view = null
let graph_download = null
@@ -146,73 +148,8 @@ onDestroy(() => {
- Storage:
- {formatDataVolume(storage_space_used, 3)}
- out of
- {formatDataVolume(window.user.subscription.storage_space, 3)}
-
-
-
-
-
- {#if storage_percent > 0.99}
-
- You have used all of your storage space. You won't be able to
- upload new files anymore. Please upgrade to a higher support
- tier to continue uploading files:
-
-
- Upgrade options
-
-
- {:else if storage_percent > 0.8}
-
- You have used {(storage_percent*100).toFixed(0)}% of your
- storage space. If your storage space runs out you won't be able
- to upload new files anymore. Please upgrade to a higher support
- tier to continue uploading files:
-
-
- Upgrade options
-
-
- {/if}
-
- Hotlink bandwidth:
- {formatDataVolume(direct_link_bandwidth_used, 3)}
- out of
- {formatDataVolume(window.user.subscription.direct_linking_bandwidth, 3)}
- (More information about hotlinking)
-
-
-
-
-
- {#if direct_link_percent > 0.99}
-
- You have used all of your hotlink bandwidth. Other people won't
- be able to download your files directly from the API anymore.
- Downloads will have to go through the file viewer page. Please
- upgrade to a higher support tier to continue hotlinking files:
-
-
- Upgrade options
-
-
- {:else if direct_link_percent > 0.8}
-
- You have used {(direct_link_percent*100).toFixed(0)}% of your
- hotlink bandwidth. If your hotlink bandwidth runs out people
- won't be able to download your files directly from the API
- anymore. Downloads will have to go through the file viewer page.
- Please upgrade to a higher support tier to continue hotlinking
- files:
-
-
- Upgrade options
-
-
+ Hotlink bandwidth:
+ {formatDataVolume(used, 3)}
+ out of
+ {formatDataVolume(total, 3)}
+ (More information about hotlinking)
+
+
+
+
+
+ {#if frac > 0.99}
+
+ You have used all of your hotlink bandwidth. Other people won't
+ be able to download your files directly from the API anymore.
+ Downloads will have to go through the file viewer page. Please
+ upgrade to a higher support tier to continue hotlinking files:
+
+
+ Upgrade options
+
+
+ {:else if frac > 0.8}
+
+ You have used {(frac*100).toFixed(0)}% of your
+ hotlink bandwidth. If your hotlink bandwidth runs out people
+ won't be able to download your files directly from the API
+ anymore. Downloads will have to go through the file viewer page.
+ Please upgrade to a higher support tier to continue hotlinking
+ files:
+
+
+ Upgrade options
+
+
+ Storage:
+ {formatDataVolume(used, 3)}
+ out of
+ {formatDataVolume(total, 3)}
+
+
+
+
+
+ {#if frac > 2.0}
+
+ You are using more than 200% of your allowed storage space!
+
+ We have started deleting your files to free up space. If you do
+ not want to lose any more files please upgrade to a storage plan
+ which supports the volume of storage which you need:
+
+ Upgrade options
+
+
+
+ {:else if frac > 0.99}
+
+
+ You have used all of your storage space. You won't be able to
+ upload new files anymore. Please upgrade to a higher support
+ tier to continue uploading files:
+
+ Upgrade options
+
+
+
+ Your files will not be deleted any sooner than normal at this
+ moment. When your storage usage is over 200% we will start
+ deleting your files to free up the space.
+
+
+ {:else if frac > 0.8}
+
+
+ You have used {(frac*100).toFixed(0)}% of your
+ storage space. If your storage space runs out you won't be able
+ to upload new files anymore. Please upgrade to a higher support
+ tier to continue uploading files:
+
+ Upgrade options
+
+