From e3e8a1db1af7ba38ed825d907e50a3bfcd77faec Mon Sep 17 00:00:00 2001
From: Wim Brand
- This is your bill shock limit. Increase + This is your bill shock limit. Increase or disable the limit to continue sharing files.
{:else if overdrawn} @@ -65,7 +65,7 @@ let included = $derived($user === null ? 0 : $user.subscription.monthly_transfer {:else}Upgrade your plan or enable - usage based billing to continue + usage based billing to continue sharing files.
@@ -82,7 +82,7 @@ let included = $derived($user === null ? 0 : $user.subscription.monthly_transfer {#if bill_shock}This is your bill shock limit, you can change it in the - sharing settings. + subscription settings.
{:else} diff --git a/svelte/src/user_home/Router.svelte b/svelte/src/user_home/Router.svelte index df97938..c29e7dd 100644 --- a/svelte/src/user_home/Router.svelte +++ b/svelte/src/user_home/Router.svelte @@ -11,6 +11,7 @@ import { onMount } from "svelte"; import { get_user, type User } from "lib/NovaAPI"; import SharingSettings from "./SharingSettings.svelte"; import SubscriptionManage from "./SubscriptionManage.svelte"; +import SubscriptionUsage from "./SubscriptionUsage.svelte"; let pages: Tab[] = [ { @@ -39,6 +40,11 @@ let pages: Tab[] = [ title: "Transactions", icon: "receipt", component: Transactions, + }, { + path: "/user/subscription/metered_billing", + title: "Metered billing", + icon: "data_usage", + component: SubscriptionUsage, }, ], }, { diff --git a/svelte/src/user_home/SharingSettings.svelte b/svelte/src/user_home/SharingSettings.svelte index 81304a3..5cd0f8c 100644 --- a/svelte/src/user_home/SharingSettings.svelte +++ b/svelte/src/user_home/SharingSettings.svelte @@ -1,26 +1,18 @@- When your storage or data transfer goes over the limits of your - plan, uploads and downloads are blocked. With usage based billing - they keep working and the usage above the limits is billed at - {formatEuros($user.subscription.price_per_tb_storage, 2)} per TB per - month for storage and - {formatEuros($user.subscription.price_per_tb_bandwidth, 2)} per TB - for data transfer. -
-- This usage is charged from your account credit afterwards. When - your balance is more than {formatEuros(period_price($user), 2)} below zero - (the price of your subscription period) the limits of your plan - apply again, until you top up your credit. -
- - {/if} - -- Billshock limit in terabytes per month (1 TB = 1000 GB). Set to 0 to - disable. -
- - -- Bandwidth used in the last 30 days: {formatDataVolume(transfer_used, 3)}, - new limit: {formatDataVolume(transfer_cap*1e12, 3)} -
-- The billshock limit limits how much bandwidth your account can use in a - 30 day window. When this limit is reached your files can't be downloaded - until your usage drops below it, and you will no longer be charged for - bandwidth usage. This is mostly useful with usage based billing, but it - works without it too. Set to 0 to disable the limit. -
-Here you can control which websites are allowed to embed your files in @@ -172,12 +77,6 @@ onMount(async () => {