Remove kickback fees
This commit is contained in:
@@ -15,5 +15,4 @@ place on pixeldrain.
|
|||||||
| Premium data transfer | No | 10 GB / month | 1 TB / month | Unlimited (€2 / TB) |
|
| Premium data transfer | No | 10 GB / month | 1 TB / month | Unlimited (€2 / TB) |
|
||||||
| Video streaming | No | Within data cap | Yes | Yes |
|
| Video streaming | No | Within data cap | Yes | Yes |
|
||||||
| Ad-free file viewing | No | No | Yes | Yes |
|
| Ad-free file viewing | No | No | Yes | Yes |
|
||||||
| Kickback fees | No | No | No | Yes |
|
|
||||||
| File viewer branding | No | No | From €8/month | Yes |
|
| File viewer branding | No | No | From €8/month | Yes |
|
||||||
|
@@ -554,7 +554,6 @@ button>svg,
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-shadow: inset 0 -10px 8px -12px var(--shadow_color);
|
box-shadow: inset 0 -10px 8px -12px var(--shadow_color);
|
||||||
/* border-bottom: 2px solid var(--input_background); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab_bar>button,
|
.tab_bar>button,
|
||||||
|
@@ -203,7 +203,7 @@ onDestroy(() => {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Address</td>
|
<td>Address</td>
|
||||||
<td>Pos</td>
|
<td>Role</td>
|
||||||
<td>Alive</td>
|
<td>Alive</td>
|
||||||
<td>Err</td>
|
<td>Err</td>
|
||||||
<td>1m</td>
|
<td>1m</td>
|
||||||
@@ -222,7 +222,7 @@ onDestroy(() => {
|
|||||||
class:highlight_green={peer.reachable}
|
class:highlight_green={peer.reachable}
|
||||||
>
|
>
|
||||||
<td>{peer.address}</td>
|
<td>{peer.address}</td>
|
||||||
<td>{peer.position}</td>
|
<td>{peer.role}</td>
|
||||||
<td>{peer.reachable}</td>
|
<td>{peer.reachable}</td>
|
||||||
<td>{peer.unreachable_count}</td>
|
<td>{peer.unreachable_count}</td>
|
||||||
<td>{peer.load_1_min.toFixed(1)}</td>
|
<td>{peer.load_1_min.toFixed(1)}</td>
|
||||||
|
@@ -107,6 +107,8 @@ onMount(() => {
|
|||||||
Blocked for abuse
|
Blocked for abuse
|
||||||
{:else if row.event === "file_instance_expired"}
|
{:else if row.event === "file_instance_expired"}
|
||||||
Expired
|
Expired
|
||||||
|
{:else if row.event === "file_instance_lost"}
|
||||||
|
File has been lost
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@@ -22,12 +22,10 @@ let load_graphs = async (minutes, interval) => {
|
|||||||
let downloads = get_graph_data("downloads", start, end, interval);
|
let downloads = get_graph_data("downloads", start, end, interval);
|
||||||
let bandwidth = get_graph_data("bandwidth", start, end, interval);
|
let bandwidth = get_graph_data("bandwidth", start, end, interval);
|
||||||
let transfer_paid = get_graph_data("transfer_paid", start, end, interval);
|
let transfer_paid = get_graph_data("transfer_paid", start, end, interval);
|
||||||
let transfer_kickback = get_graph_data("transfer_kickback", start, end, interval);
|
|
||||||
views = await views
|
views = await views
|
||||||
downloads = await downloads
|
downloads = await downloads
|
||||||
bandwidth = await bandwidth
|
bandwidth = await bandwidth
|
||||||
transfer_paid = await transfer_paid
|
transfer_paid = await transfer_paid
|
||||||
transfer_kickback = await transfer_kickback
|
|
||||||
|
|
||||||
graph_views_downloads.data().labels = views.timestamps;
|
graph_views_downloads.data().labels = views.timestamps;
|
||||||
graph_views_downloads.data().datasets[0].data = views.amounts
|
graph_views_downloads.data().datasets[0].data = views.amounts
|
||||||
@@ -35,7 +33,6 @@ let load_graphs = async (minutes, interval) => {
|
|||||||
graph_bandwidth.data().labels = bandwidth.timestamps;
|
graph_bandwidth.data().labels = bandwidth.timestamps;
|
||||||
graph_bandwidth.data().datasets[0].data = bandwidth.amounts
|
graph_bandwidth.data().datasets[0].data = bandwidth.amounts
|
||||||
graph_bandwidth.data().datasets[1].data = transfer_paid.amounts
|
graph_bandwidth.data().datasets[1].data = transfer_paid.amounts
|
||||||
graph_bandwidth.data().datasets[2].data = transfer_kickback.amounts
|
|
||||||
|
|
||||||
graph_views_downloads.update()
|
graph_views_downloads.update()
|
||||||
graph_bandwidth.update()
|
graph_bandwidth.update()
|
||||||
@@ -52,7 +49,6 @@ let total_views = 0
|
|||||||
let total_downloads = 0
|
let total_downloads = 0
|
||||||
let total_bandwidth = 0
|
let total_bandwidth = 0
|
||||||
let total_transfer_paid = 0
|
let total_transfer_paid = 0
|
||||||
let total_transfer_kickback = 0
|
|
||||||
|
|
||||||
let get_graph_data = async (stat, start, end, interval) => {
|
let get_graph_data = async (stat, start, end, interval) => {
|
||||||
let resp = await fetch(
|
let resp = await fetch(
|
||||||
@@ -86,8 +82,6 @@ let get_graph_data = async (stat, start, end, interval) => {
|
|||||||
total_bandwidth = total;
|
total_bandwidth = total;
|
||||||
} else if (stat == "transfer_paid") {
|
} else if (stat == "transfer_paid") {
|
||||||
total_transfer_paid = total;
|
total_transfer_paid = total;
|
||||||
} else if (stat == "transfer_kickback") {
|
|
||||||
total_transfer_kickback = total;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
@@ -169,23 +163,16 @@ onMount(() => {
|
|||||||
label: "Total bandwidth",
|
label: "Total bandwidth",
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
borderColor: color_by_name("chart_1_color"),
|
borderColor: color_by_name("highlight_color"),
|
||||||
backgroundColor: color_by_name("chart_1_color"),
|
backgroundColor: color_by_name("highlight_color"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Premium bandwidth",
|
label: "Premium bandwidth",
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
borderColor: color_by_name("chart_2_color"),
|
borderColor: color_by_name("danger_color"),
|
||||||
backgroundColor: color_by_name("chart_2_color"),
|
backgroundColor: color_by_name("danger_color"),
|
||||||
},
|
}
|
||||||
{
|
|
||||||
label: "Kickback bandwidth",
|
|
||||||
borderWidth: 2,
|
|
||||||
pointRadius: 0,
|
|
||||||
borderColor: color_by_name("chart_3_color"),
|
|
||||||
backgroundColor: color_by_name("chart_3_color"),
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
update_graphs(10080, 60, true);
|
update_graphs(10080, 60, true);
|
||||||
@@ -343,13 +330,6 @@ onDestroy(() => {
|
|||||||
sharing enabled. Bandwidth sharing can be changed on
|
sharing enabled. Bandwidth sharing can be changed on
|
||||||
<a href="/user/subscription">the subscription page</a>.
|
<a href="/user/subscription">the subscription page</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
|
||||||
Kickback bandwidth is counted when a paying pixeldrain user downloads
|
|
||||||
one of your files using their data cap. If you are on a prepaid plan
|
|
||||||
this usage will be compensated at a rate of €1 per TB. When this happens
|
|
||||||
a positive transaction will be logged on the
|
|
||||||
<a href="/user/transactions">transactions page</a>.
|
|
||||||
</p>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<Chart bind:this={graph_bandwidth} data_type="bytes"/>
|
<Chart bind:this={graph_bandwidth} data_type="bytes"/>
|
||||||
@@ -359,7 +339,6 @@ onDestroy(() => {
|
|||||||
Total usage from {time_start} to {time_end}<br/>
|
Total usage from {time_start} to {time_end}<br/>
|
||||||
{formatDataVolume(total_bandwidth, 3)} bandwidth,
|
{formatDataVolume(total_bandwidth, 3)} bandwidth,
|
||||||
{formatDataVolume(total_transfer_paid, 3)} paid transfers
|
{formatDataVolume(total_transfer_paid, 3)} paid transfers
|
||||||
{formatDataVolume(total_transfer_kickback, 3)} kickback transfers
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Views and downloads</h3>
|
<h3>Views and downloads</h3>
|
||||||
|
@@ -33,7 +33,6 @@ const load_transactions = async () => {
|
|||||||
total_subscription_charge: 0,
|
total_subscription_charge: 0,
|
||||||
total_storage_charge: 0,
|
total_storage_charge: 0,
|
||||||
total_bandwidth_charge: 0,
|
total_bandwidth_charge: 0,
|
||||||
total_kickback_fee: 0,
|
|
||||||
total_deposited: 0,
|
total_deposited: 0,
|
||||||
total_deducted: 0,
|
total_deducted: 0,
|
||||||
}
|
}
|
||||||
@@ -44,7 +43,6 @@ const load_transactions = async () => {
|
|||||||
month.total_subscription_charge += row.subscription_charge
|
month.total_subscription_charge += row.subscription_charge
|
||||||
month.total_storage_charge += row.storage_charge
|
month.total_storage_charge += row.storage_charge
|
||||||
month.total_bandwidth_charge += row.bandwidth_charge
|
month.total_bandwidth_charge += row.bandwidth_charge
|
||||||
month.total_kickback_fee += row.kickback_fee
|
|
||||||
month.total_deducted += row.subscription_charge + row.storage_charge + row.bandwidth_charge
|
month.total_deducted += row.subscription_charge + row.storage_charge + row.bandwidth_charge
|
||||||
})
|
})
|
||||||
transactions = month
|
transactions = month
|
||||||
@@ -248,7 +246,6 @@ onMount(() => {
|
|||||||
<li>Storage charge: <Euro amount={transactions.total_storage_charge}></Euro></li>
|
<li>Storage charge: <Euro amount={transactions.total_storage_charge}></Euro></li>
|
||||||
<li>Bandwidth charge: <Euro amount={transactions.total_bandwidth_charge}></Euro></li>
|
<li>Bandwidth charge: <Euro amount={transactions.total_bandwidth_charge}></Euro></li>
|
||||||
<li>Total charge: <Euro amount={transactions.total_deducted}></Euro></li>
|
<li>Total charge: <Euro amount={transactions.total_deducted}></Euro></li>
|
||||||
<li>Earned: <Euro amount={transactions.total_kickback_fee}></Euro></li>
|
|
||||||
<li>Deposited: <Euro amount={transactions.total_deposited}></Euro></li>
|
<li>Deposited: <Euro amount={transactions.total_deposited}></Euro></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -261,7 +258,6 @@ onMount(() => {
|
|||||||
<td>Subscription</td>
|
<td>Subscription</td>
|
||||||
<td colspan="2">Storage</td>
|
<td colspan="2">Storage</td>
|
||||||
<td colspan="2">Bandwidth</td>
|
<td colspan="2">Bandwidth</td>
|
||||||
<td colspan="2">Kickback</td>
|
|
||||||
<td>Deposit</td>
|
<td>Deposit</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -272,8 +268,6 @@ onMount(() => {
|
|||||||
<td>Usage</td>
|
<td>Usage</td>
|
||||||
<td>Charge</td>
|
<td>Charge</td>
|
||||||
<td>Usage</td>
|
<td>Usage</td>
|
||||||
<td>Fee</td>
|
|
||||||
<td>Amount</td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -287,8 +281,6 @@ onMount(() => {
|
|||||||
<td>{formatDataVolume(row.storage_used, 3)}</td>
|
<td>{formatDataVolume(row.storage_used, 3)}</td>
|
||||||
<td><Euro amount={row.bandwidth_charge} precision="4"></Euro></td>
|
<td><Euro amount={row.bandwidth_charge} precision="4"></Euro></td>
|
||||||
<td>{formatDataVolume(row.bandwidth_used, 3)}</td>
|
<td>{formatDataVolume(row.bandwidth_used, 3)}</td>
|
||||||
<td><Euro amount={row.kickback_fee} precision="4"></Euro></td>
|
|
||||||
<td>{formatDataVolume(row.kickback_amount, 3)}</td>
|
|
||||||
<td><Euro amount={row.deposit_amount}></Euro></td>
|
<td><Euro amount={row.deposit_amount}></Euro></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{/each}
|
||||||
|
Reference in New Issue
Block a user