Update some confusing wording around the prepaid plan

This commit is contained in:
2025-03-27 13:45:40 +01:00
parent c8d22f534a
commit 0de8754d9b
8 changed files with 59 additions and 172 deletions

View File

@@ -118,10 +118,10 @@ onMount(() => {
</p>
<ProgressBar used={transfer_used} total={transfer_cap*1e9}></ProgressBar>
<p>
The billshock limit limits how much bandwidth your account can use
in a 30 day window. When this limit is reached files will show ads
again and can only be downloaded from the file viewer page. This is
mostly useful for prepaid plans, but it works for patreon plans too.
The billshock limit limits how much bandwidth your account can use in a
30 day window. When this limit is reached hotlinking will be disabled
and you will no longer be charged for bandwidth usage. This is mostly
useful for the Prepaid subscription, but it works for Patreon plans too.
Set to 0 to disable the limit.
</p>

View File

@@ -81,13 +81,12 @@ onMount(() => {
<section>
<h2 id="deposit">Deposit credit</h2>
<p>
Pixeldrain credit can be used for our prepaid plans, which are different
from the Patreon plans. With prepaid you only pay for what you use, at a
rate of €4 per TB per month for storage and €1 per TB for data transfer.
See the Subscriptions tab for more information about the perks.
</p>
<p>
Current account balance: <Euro amount={window.user.balance_micro_eur}></Euro>
Pixeldrain credit can be used for our Prepaid subscription plan, which
is different from the Patreon plans. Instead of monthly limits, with
Prepaid there are no limits. You pay for what you use, at a rate of €4
per TB per month for storage and €1 per TB for data transfer. Your
current account balance is <Euro
amount={window.user.balance_micro_eur}/>
</p>
<div class="tab_bar">

View File

@@ -11,17 +11,21 @@ let uri = ""
let qr = ""
let reveal_key = false
const generate_key = async () => {
let form = new FormData()
form.set("action", "generate")
const resp = await check_response(await fetch(
get_endpoint() + "/user/totp",
{method: "POST", body: form},
))
try {
let form = new FormData()
form.set("action", "generate")
const resp = await check_response(await fetch(
get_endpoint() + "/user/totp",
{method: "POST", body: form},
))
secret = resp.secret
uri = resp.uri
qr = get_endpoint()+"/misc/qr?text=" +encodeURIComponent(resp.uri)
console.log(resp)
secret = resp.secret
uri = resp.uri
qr = get_endpoint()+"/misc/qr?text=" +encodeURIComponent(resp.uri)
console.log(resp)
} catch (err) {
alert("Verification failed: "+err.value+"\n"+err.message)
}
}
let otp = ""
@@ -34,7 +38,7 @@ const verify = async (e: SubmitEvent) => {
form.set("secret", secret)
try {
const resp = await check_response(await fetch(
await check_response(await fetch(
get_endpoint() + "/user/totp",
{method: "POST", body: form},
))
@@ -51,6 +55,8 @@ const verify = async (e: SubmitEvent) => {
"might be incorrect. Please enable time synchronization in "+
"your operating system."
)
} else {
alert("Verification failed: "+err.value+"\n"+err.message)
}
}
}

View File

@@ -42,12 +42,12 @@ let pages: Tab[] = [
subpages: [
{
path: "/user/subscription",
title: "Manage subscription",
title: "Manage",
icon: "shopping_cart",
component: Subscription,
}, {
path: "/user/prepaid/deposit",
title: "Prepaid",
title: "Deposit Credit",
icon: "account_balance_wallet",
component: DepositCredit,
}, {

View File

@@ -94,12 +94,12 @@ onMount(() => {
target="_blank">on Patreon</a>.
</p>
<p>
The Prepaid plan is charged daily based on usage. When you reach
negative balance the subscription will automatically end. Need at least
<Euro amount="1e6"/> account credit to activate prepaid. Your current
prepaid credit is <Euro amount={window.user.balance_micro_eur}/>. You
can deposit credit on the <a href="/user/prepaid/deposit">credit deposit
page</a>.
The Prepaid subscription is charged daily based on usage. When you reach
negative balance the subscription will automatically end. You need at
least <Euro amount="1e6"/> account credit to activate prepaid. Your
current credit amount is <Euro
amount={window.user.balance_micro_eur}/>. You can deposit credit on the
<a href="/user/prepaid/deposit">credit deposit page</a>.
</p>
<h3>Available subscription plans</h3>
@@ -165,8 +165,8 @@ onMount(() => {
</p>
<ul>
<li>
€1 / month minimum price (only charged when monthly
total is below €1)
€1 / month minimum price (only charged when usage is
below €1)
</li>
<li>
€4 per TB per month for storage