From 2d14e5682dd7db6e72d275924e4201b24d61fa1d Mon Sep 17 00:00:00 2001
From: Geometrically <18202329+Geometrically@users.noreply.github.com>
Date: Tue, 5 Dec 2023 12:13:27 -0700
Subject: [PATCH] New payouts system (#1456)
* initial
* finish withdraw page
* Finish frontend
* Fix UI a bit
* tester fixes
---
assets/images/external/tremendous.svg | 3 +
assets/images/external/venmo-small.svg | 3 +
assets/images/external/venmo.svg | 38 +++
assets/styles/components.scss | 4 +-
components/ui/ModalTransfer.vue | 207 ------------
composables/auth.js | 24 ++
package.json | 1 +
pages/dashboard/index.vue | 12 +-
pages/dashboard/revenue/index.vue | 161 ++++-----
pages/dashboard/revenue/transfers.vue | 197 +++++------
pages/dashboard/revenue/withdraw.vue | 442 +++++++++++++++++++++++++
pages/settings.vue | 4 -
pages/settings/account.vue | 21 --
pages/settings/monetization.vue | 235 -------------
pages/settings/sessions.vue | 2 +-
pnpm-lock.yaml | 7 +
16 files changed, 691 insertions(+), 670 deletions(-)
create mode 100644 assets/images/external/tremendous.svg
create mode 100644 assets/images/external/venmo-small.svg
create mode 100644 assets/images/external/venmo.svg
delete mode 100644 components/ui/ModalTransfer.vue
create mode 100644 pages/dashboard/revenue/withdraw.vue
delete mode 100644 pages/settings/monetization.vue
diff --git a/assets/images/external/tremendous.svg b/assets/images/external/tremendous.svg
new file mode 100644
index 000000000..fb50c702a
--- /dev/null
+++ b/assets/images/external/tremendous.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/external/venmo-small.svg b/assets/images/external/venmo-small.svg
new file mode 100644
index 000000000..32b4efd7d
--- /dev/null
+++ b/assets/images/external/venmo-small.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/images/external/venmo.svg b/assets/images/external/venmo.svg
new file mode 100644
index 000000000..11c5091c6
--- /dev/null
+++ b/assets/images/external/venmo.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/assets/styles/components.scss b/assets/styles/components.scss
index fac5e60ba..f4e89b6f5 100644
--- a/assets/styles/components.scss
+++ b/assets/styles/components.scss
@@ -268,7 +268,7 @@
@media screen and (max-width: 750px) {
&:not(&.small) {
flex-direction: column;
- align-items: start;
+ align-items: flex-start;
.stylized-toggle {
flex-basis: 0;
@@ -339,7 +339,7 @@
.adjacent-input,
&.adjacent-input &:not(&.small) {
flex-direction: column;
- align-items: start;
+ align-items: flex-start;
}
}
}
diff --git a/components/ui/ModalTransfer.vue b/components/ui/ModalTransfer.vue
deleted file mode 100644
index 84ce624e5..000000000
--- a/components/ui/ModalTransfer.vue
+++ /dev/null
@@ -1,207 +0,0 @@
-
-
You have {{ $formatMoney(auth.user.payout_data.balance) }} available to withdraw. - Enroll in the Creator Monetization Program to withdraw your revenue.
- You have made - {{ $formatMoney(auth.user.payout_data.balance) }}, however you have not yet met the minimum of ${{ minWithdraw }} to withdraw. -
You have made {{ $formatMoney(auth.user.payout_data.balance) }}, which is under the minimum of ${{ minWithdraw }} to withdraw.
-
By uploading projects to Modrinth and withdrawing money from your account, you agree to the
- To avoid paying unnecessary fee deductions, you may want to wait to transfer your money out - after it accumulates for a bit rather than transferring as soon as you reach the minimum of - ${{ minWithdraw }}. -
++ Your PayPal {{ auth.user.payout_data.paypal_country }} account is currently connected with + email + {{ auth.user.payout_data.paypal_address }} +
+ + + +Connect your PayPal account to enable withdrawing to your PayPal balance.
+ +- Modrinth will deduct 2% for the fee (minimum of $0.25 and maximum of $20) - from all transfers and if the fee PayPal charges is less than the amount we - deducted, the difference will be added back to your Modrinth balance. This happens as - Modrinth cannot determine if a transaction will be in the United States or international or - not until after the transaction has been made. -
-- Venmo will charge a $0.25 processing fee per transaction, which will be deducted from the - amount you choose to transfer. -
-
- All revenue generated by Modrinth is in United States dollars. Any conversions to your local
- currency will happen at withdrawal and is not handled by Modrinth. Modrinth cannot guarantee
- any exchange rate, so only USD is displayed in the creator dashboard.
+ Tremendous payments are sent to your Modrinth email. To change/set your Modrinth email,
+ visit
+
Enter your Venmo username below to enable withdrawing to your Venmo balance.
+ + ++ You are initiating a transfer of your revenue from Modrinth's Creator Monetization Program. + How much of your + {{ $formatMoney(auth.user.payout_data.balance) }} balance would you like to + transfer to {{ selectedMethod.name }}? +
+View your revenue and metrics in the creator dashboard:
-- You are not currently enrolled in Modrinth's Creator Monetization Program. In order to - enroll, you must first add a valid email address to your account. -
-- You are not currently enrolled in Modrinth's Creator Monetization Program. Setup a method - of receiving payments below to enable monetization. -
-- Enter the information for the - {{ $formatWallet(selectedWallet) }} account you would like to receive your revenue from - the Creator Monetization Program: -
-- You are currently enrolled in the Creator Monetization Program with a - {{ $formatWallet(selectedWallet) }} account. -
- - -