mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Sept 8 fixes (#9028)
* Added task sync after joining challenge * Added gem purchasing * Updated member modal style * Added community guidelines to all groups * Added group plans redirect * Began add new front page design * Fixed challenge loading on mount * Fixed upgrade * Added default summary * Fixed small nav bar styles * Added more unlock options to avatar editor * Added more home page finishes
This commit is contained in:
@@ -119,9 +119,6 @@ import planGemLimits from '../../../common/script/libs/planGemLimits';
|
||||
import amazonPaymentsModal from '../payments/amazonModal';
|
||||
import paymentsMixin from '../../mixins/payments';
|
||||
|
||||
// TODO
|
||||
const STRIPE_PUB_KEY = 'pk_test_6pRNASCoBOKtIshFeQd4XMUh';
|
||||
|
||||
export default {
|
||||
mixins: [paymentsMixin],
|
||||
components: {
|
||||
@@ -137,7 +134,6 @@ export default {
|
||||
key: 'basic_earned',
|
||||
},
|
||||
amazonPayments: {},
|
||||
StripeCheckout: {},
|
||||
paymentMethods: {
|
||||
AMAZON_PAYMENTS: 'Amazon Payments',
|
||||
STRIPE: 'Stripe',
|
||||
@@ -148,9 +144,6 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.StripeCheckout = window.StripeCheckout;
|
||||
},
|
||||
filters: {
|
||||
date (value) {
|
||||
if (!value) return '';
|
||||
@@ -254,30 +247,6 @@ export default {
|
||||
subs.basic_6mo.discount = true;
|
||||
subs.google_6mo.discount = false;
|
||||
},
|
||||
showStripeEdit (config) {
|
||||
let groupId;
|
||||
if (config && config.groupId) {
|
||||
groupId = config.groupId;
|
||||
}
|
||||
|
||||
this.StripeCheckout.open({
|
||||
key: STRIPE_PUB_KEY,
|
||||
address: false,
|
||||
name: this.$t('subUpdateTitle'),
|
||||
description: this.$t('subUpdateDescription'),
|
||||
panelLabel: this.$t('subUpdateCard'),
|
||||
token: async (data) => {
|
||||
data.groupId = groupId;
|
||||
let url = '/stripe/subscribe/edit';
|
||||
let response = await axios.post(url, data);
|
||||
|
||||
// Succss
|
||||
window.location.reload(true);
|
||||
// error
|
||||
alert(response.message);
|
||||
},
|
||||
});
|
||||
},
|
||||
canCancelSubscription () {
|
||||
return (
|
||||
this.user.purchased.plan.paymentMethod !== this.paymentMethods.GOOGLE &&
|
||||
|
||||
Reference in New Issue
Block a user