diff --git a/res/include/md/about.md b/res/include/md/about.md index 53d09e1..4ff037f 100644 --- a/res/include/md/about.md +++ b/res/include/md/about.md @@ -185,6 +185,38 @@ be public. For that reason I disabled search indexing on all pixeldrain files. This protects the privacy of pixeldrain users and helps with preventing information leaks. +## How does the affiliate program work? + +Pixeldrain's affiliate program is a way to earn pixeldrain credit by driving +traffic to pixeldrain. The way it works is that you send people your affiliate +link, if someone accepts to be your affiliate then their active subscription +will earn you pixeldrain credit. The affiliate program is opt-in and fully +transparent. Users will always be notified when their affiliate account is +updated. You can update who you are sponsoring by editing the affiliate name on +your [user settings page](/user/settings). + +Here is a summary of all the rules and limitations: + +* Each paying customer using your affiliate code will earn you €0.50 in prepaid + credit every month. The credit is added to your account on a daily basis, as + you can see on the [transactions page](/user/prepaid/transactions). +* Sponsoring someone with an affiliate code does not cost you any extra money. + The resulting fee comes out of pixeldrain's pockets. +* You can only earn pixeldrain credit with the affiliate program. There is no + cash out feature. +* When someone who is using your affiliate code cancels their plan, you will + also stop receiving rewards. +* You don't need an active subscription to gain credit through the affiliate + program. You need a positive balance of at least €1 to activate the prepaid + plan. + +Some fun facts: + +* You only need two affiliates to offset pixeldrain's base subscription fee. +* Each sponsoring user is effectively equal to 125 GB of storage space or 500 GB + of bandwidth usage per month. +* You cannot sponsor yourself. + ## Is there a clean pixeldrain logo I can use? Yes, here's a high resolution pixeldrain logo with text. The font is called diff --git a/svelte/src/file_viewer/FileViewer.svelte b/svelte/src/file_viewer/FileViewer.svelte index 6962080..256c7c9 100644 --- a/svelte/src/file_viewer/FileViewer.svelte +++ b/svelte/src/file_viewer/FileViewer.svelte @@ -20,6 +20,7 @@ import ListStats from "./ListStats.svelte"; import ListUpdater from "./ListUpdater.svelte"; import CopyButton from "../layout/CopyButton.svelte"; import Menu from "../filesystem/Menu.svelte" +import AffiliatePrompt from "../user_home/AffiliatePrompt.svelte"; let loading = true let embedded = false @@ -617,6 +618,8 @@ const keyboard_event = evt => { + + diff --git a/svelte/src/user_home/AccountSettings.svelte b/svelte/src/user_home/AccountSettings.svelte index bd5cd2e..7938ac4 100644 --- a/svelte/src/user_home/AccountSettings.svelte +++ b/svelte/src/user_home/AccountSettings.svelte @@ -1,6 +1,9 @@
-
-
-

Account settings

+
+ Account settings
-
-
-
-

Delete account

+ + +
+ Affiliate settings +
+
+

+ Your own affiliate link is + {affiliate_link} + . Share this link + with premium pixeldrain users to gain commissions. For a + detailed description of the affiliate program please check out + the Q&A page. +

+

+ Note that the link includes the name of your pixeldrain + account. If you change your account name the link will stop + working and you might stop receiving commissions. +

+
+
+ +
+ Delete account
-
-
+
diff --git a/svelte/src/user_home/AffiliatePrompt.svelte b/svelte/src/user_home/AffiliatePrompt.svelte new file mode 100644 index 0000000..2ecc5fd --- /dev/null +++ b/svelte/src/user_home/AffiliatePrompt.svelte @@ -0,0 +1,127 @@ + + + + +
+

+ Hi! {ref} wants you to sponsor their pixeldrain account. This will + give them €0.50 every month in pixeldrain prepaid credit. They can + use this credit to get a discount on their file sharing and storage + efforts. Here is a short summary of what this entails: +

+
    +
  • + Sponsoring only works while you have an active subscription + plan. When your subscription deactivates the creator will no + longer receive commissions. +
  • +
  • + Pixeldrain credit cannot be cashed out. So they are not earning + real money with this. +
  • +
  • + This does not cost you any extra money. The commissions paid out + to the creator are paid for by pixeldrain itself. +
  • +
  • + You can change who you are sponsoring at any time on your account settings page. +
  • +
  • + If you want to know more about the affiliate program check out + the Q&A page. +
  • +
+

+ If you click 'Accept' then the requested affiliate code will be + added to your account and the creator will start earning. If you + choose 'Deny' then we will never show this pop-up again. +

+
+ + +
+
+
+ + diff --git a/svelte/src/user_home/Router.svelte b/svelte/src/user_home/Router.svelte index 426776c..5c3c352 100644 --- a/svelte/src/user_home/Router.svelte +++ b/svelte/src/user_home/Router.svelte @@ -11,6 +11,7 @@ import BandwidthSharing from "./BandwidthSharing.svelte"; import EmbeddingControls from "./EmbeddingControls.svelte"; import PageBranding from "./PageBranding.svelte"; import Dashboard from "./dashboard/Dashboard.svelte"; +import AffiliatePrompt from "./AffiliatePrompt.svelte"; let pages = [ { @@ -88,3 +89,5 @@ let pages = [ + + diff --git a/svelte/src/user_home/Transactions.svelte b/svelte/src/user_home/Transactions.svelte index 2d90c07..e4c3b41 100644 --- a/svelte/src/user_home/Transactions.svelte +++ b/svelte/src/user_home/Transactions.svelte @@ -16,6 +16,7 @@ let transactions = { total_storage_charge: 0, total_bandwidth_used: 0, total_bandwidth_charge: 0, + total_affiliate_amount: 0, total_deposited: 0, total_deducted: 0, } @@ -42,6 +43,7 @@ const load_transactions = async () => { total_storage_charge: 0, total_bandwidth_used: 0, total_bandwidth_charge: 0, + total_affiliate_amount: 0, total_deposited: 0, total_deducted: 0, } @@ -54,6 +56,7 @@ const load_transactions = async () => { month.total_storage_charge += row.storage_charge month.total_bandwidth_used += row.bandwidth_used month.total_bandwidth_charge += row.bandwidth_charge + month.total_affiliate_amount += row.affiliate_amount month.total_deducted += row.subscription_charge + row.storage_charge + row.bandwidth_charge }) @@ -139,6 +142,9 @@ onMount(() => {
  • Total charge:
  • +
  • + Affiliate rewards: +
  • Deposited:
  • @@ -153,6 +159,7 @@ onMount(() => { Subscription Storage Bandwidth + Affiliate Deposit @@ -176,6 +183,10 @@ onMount(() => { ({formatDataVolume(row.bandwidth_used, 3)}) + + + ({row.affiliate_count}) + diff --git a/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte b/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte index 62d57b9..38c1d43 100644 --- a/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte +++ b/svelte/src/user_home/dashboard/CardPrepaidTransactions.svelte @@ -17,6 +17,7 @@ let transactions = { total_storage_charge: 0, total_bandwidth_used: 0, total_bandwidth_charge: 0, + total_affiliate_amount: 0, total_deposited: 0, total_deducted: 0, balance_start: 0, @@ -45,6 +46,7 @@ const load_transactions = async () => { total_storage_charge: 0, total_bandwidth_used: 0, total_bandwidth_charge: 0, + total_affiliate_amount: 0, total_deposited: 0, total_deducted: 0, balance_start: 0, @@ -66,6 +68,7 @@ const load_transactions = async () => { month.total_storage_charge += row.storage_charge month.total_bandwidth_used += row.bandwidth_used month.total_bandwidth_charge += row.bandwidth_charge + month.total_affiliate_amount += row.affiliate_amount month.total_deducted += row.subscription_charge + row.storage_charge + row.bandwidth_charge }) @@ -148,6 +151,12 @@ onMount(() => { (used {formatDataVolume(transactions.total_bandwidth_used, 3)}) + + Affiliate rewards + + + + Deposited