Update subscriptions page

This commit is contained in:
2024-09-12 17:35:12 +02:00
parent 9e7f3b4e0d
commit a890684f59
5 changed files with 23 additions and 78 deletions

View File

@@ -269,10 +269,8 @@ section {
.highlight_blue, .highlight_blue,
.highlight_yellow, .highlight_yellow,
.highlight_red { .highlight_red {
position: relative;
width: auto; width: auto;
height: auto; height: auto;
overflow: hidden;
text-align: center; text-align: center;
padding: 4px; padding: 4px;
border-radius: 8px; border-radius: 8px;

View File

@@ -17,7 +17,7 @@ let update_peers = (peers) => {
sort("") sort("")
} }
let sort_field = "address" let sort_field = "hostname"
let asc = true let asc = true
let sort = (field) => { let sort = (field) => {
if (field !== "" && field === sort_field) { if (field !== "" && field === sort_field) {
@@ -54,7 +54,8 @@ let sort = (field) => {
<table> <table>
<thead> <thead>
<tr> <tr>
<td><SortButton field="address" active_field={sort_field} asc={asc} sort_func={sort}>Address</SortButton></td> <td><SortButton field="hostname" active_field={sort_field} asc={asc} sort_func={sort}>Hostname</SortButton></td>
<td><SortButton field="ip" active_field={sort_field} asc={asc} sort_func={sort}>Address</SortButton></td>
<td><SortButton field="unreachable_count" active_field={sort_field} asc={asc} sort_func={sort}>Err</SortButton></td> <td><SortButton field="unreachable_count" active_field={sort_field} asc={asc} sort_func={sort}>Err</SortButton></td>
<td><SortButton field="load_15_min" active_field={sort_field} asc={asc} sort_func={sort}>Load</SortButton></td> <td><SortButton field="load_15_min" active_field={sort_field} asc={asc} sort_func={sort}>Load</SortButton></td>
<td><SortButton field="latency" active_field={sort_field} asc={asc} sort_func={sort}>Ping</SortButton></td> <td><SortButton field="latency" active_field={sort_field} asc={asc} sort_func={sort}>Ping</SortButton></td>
@@ -67,7 +68,7 @@ let sort = (field) => {
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{#each peers as peer (peer.address)} {#each peers as peer (peer.ip)}
<tr style="border: none;" <tr style="border: none;"
class:highlight_red={!peer.reachable} class:highlight_red={!peer.reachable}
class:highlight_yellow={peer.free_space < peer.min_free_space / 2} class:highlight_yellow={peer.free_space < peer.min_free_space / 2}
@@ -75,7 +76,8 @@ let sort = (field) => {
class:highlight_green={peer.reachable} class:highlight_green={peer.reachable}
animate:flip={{duration: 1000}} animate:flip={{duration: 1000}}
> >
<td>{peer.address}</td> <td>{peer.hostname}</td>
<td>{peer.ip}</td>
<td>{peer.unreachable_count}</td> <td>{peer.unreachable_count}</td>
<td>{peer.load_1_min.toFixed(1)} / {peer.load_5_min.toFixed(1)} / {peer.load_15_min.toFixed(1)}</td> <td>{peer.load_1_min.toFixed(1)} / {peer.load_5_min.toFixed(1)} / {peer.load_15_min.toFixed(1)}</td>
<td>{(peer.latency/1000).toFixed(3)}</td> <td>{(peer.latency/1000).toFixed(3)}</td>

View File

@@ -19,19 +19,10 @@ import Euro from "../util/Euro.svelte";
<img src="/res/img/misc/sunrise.webp" class="float_right" alt="Sunrise"> <img src="/res/img/misc/sunrise.webp" class="float_right" alt="Sunrise">
<h2>Simple and affordable pricing</h2> <h2>Simple and affordable pricing</h2>
No file expiry:
<ul> <ul>
<li><span class="keyword">2.00 per month</span> base price<br/></li> <li><span class="keyword">1.00 per month</span> base price</li>
<li><span class="keyword">€4.00 per TB per month</span> for storage<br/></li> <li><span class="keyword">€4.00 per TB per month</span> for storage</li>
<li><span class="keyword">€2.00 per TB</span> for data transfer<br/></li> <li><span class="keyword">€2.00 per TB</span> for downloading and sharing files</li>
</ul>
<hr/>
240 day file expiry:
<ul>
<li><span class="keyword">€1.00 per month</span> base price<br/></li>
<li><span class="keyword">€0.50 per TB per month</span> for storage<br/></li>
<li><span class="keyword">€2.00 per TB</span> for data transfer<br/></li>
</ul> </ul>
<br style="clear: right;"/> <br style="clear: right;"/>

View File

@@ -65,8 +65,7 @@ onMount(() => {
<h2>Payment successful!</h2> <h2>Payment successful!</h2>
<p> <p>
Thank you for supporting pixeldrain! The credit has been added Thank you for supporting pixeldrain! The credit has been added
to your account balance. Activate a subscription plan below to to your account balance.
finish upgrading your account.
</p> </p>
<p> <p>
If your account credit has not been updated, please check the If your account credit has not been updated, please check the
@@ -74,7 +73,8 @@ onMount(() => {
href="/user/prepaid/deposit#invoices">the invoices page</a>. href="/user/prepaid/deposit#invoices">the invoices page</a>.
Depending on the payment processor you used it can take a while Depending on the payment processor you used it can take a while
before your credit is deposited. SEPA transfers can take up to before your credit is deposited. SEPA transfers can take up to
two working days for example. If it takes too long contact two working days for example. When the deposit is complete you
will receive an e-mail. If it takes too long, contact
support@pixeldrain.com. support@pixeldrain.com.
</p> </p>
</div> </div>
@@ -92,7 +92,7 @@ onMount(() => {
Pixeldrain cannot modify your Patreon membership in any way. Pixeldrain cannot modify your Patreon membership in any way.
</p> </p>
<p> <p>
Prepaid subscriptions are charged daily based on usage. When you reach The Prepaid plan is charged daily based on usage. When you reach
negative balance the subscription will automatically end. You will need negative balance the subscription will automatically end. You will need
a positive balance to activate the subscription again. a positive balance to activate the subscription again.
</p> </p>
@@ -178,63 +178,14 @@ onMount(() => {
</ul> </ul>
</div> </div>
</div> </div>
<div>
<div class="feat_label" class:feat_highlight={subscription === "prepaid_temp_storage_120d"}>
240 days storage<br/>
{#if subscription === "prepaid_temp_storage_120d"}
Currently active
{:else}
<button on:click={() => update("prepaid_temp_storage_120d")}>
<i class="icon">attach_money</i>
Activate
</button>
{/if}
</div>
<div class="feat_normal" class:feat_highlight={subscription === "prepaid_temp_storage_120d"}>
<p>
You will need a positive account balance to activate this
plan.
</p>
<ul>
<li>Base price of €1 per month</li>
<li>€0.50 per TB per month for storage</li>
<li>
€2 per TB for data transfer (with <a
href="/user/sharing/bandwidth">bandwidth sharing</a>
enabled)
</li>
<li>
Files expire 240 days after they are last viewed or
downloaded
</li>
<li>
Download page <a href="/user/sharing/branding">branding
options</a>
</li>
<li>
File <a href="/user/sharing/embedding">embedding
control</a> options
</li>
</ul>
</div>
</div>
<div> <div>
<div class="feat_label" class:feat_highlight={subscription === ""}> <div class="feat_label" class:feat_highlight={subscription === ""}>
Free<br/> Free<br/>
{#if subscription === ""} {#if subscription === ""}
Currently active Currently active
{:else}
<button on:click={() => update("")}>
<i class="icon">money_off</i>
Activate
</button>
{/if} {/if}
</div> </div>
<div class="feat_normal round_br" class:feat_highlight={subscription === ""}> <div class="feat_normal round_br" class:feat_highlight={subscription === ""}>
<p>
Switching to the free plan with another subscription active
may cause your files to expire!
</p>
<ul> <ul>
<li>Standard free plan, files expire after 120 days.</li> <li>Standard free plan, files expire after 120 days.</li>
<li>Download limit of 5 GB per day</li> <li>Download limit of 5 GB per day</li>

View File

@@ -1,13 +1,16 @@
<ul> <ul>
<li>Username: {window.user.username}</li> <li>Username: {window.user.username}</li>
<li>
{#if window.user.email === ""} {#if window.user.email === ""}
No e-mail address configured. You will not be able to recover <li class="highlight_blue" style="text-align: initial;">
your account if you lose your password. No e-mail address configured. You will not be able to recover your
{:else} account if you lose your password. Set an e-mail address on the <a
E-mail address: {window.user.email} href="/user/settings">Settings</a> page.
{/if}
</li> </li>
{:else}
<li>
E-mail address: {window.user.email}
</li>
{/if}
<li> <li>
<i class="icon">settings</i> <i class="icon">settings</i>
<a href="/user/settings">Account settings</a> <a href="/user/settings">Account settings</a>