fixes part 6

This commit is contained in:
Čarodej
2022-03-03 07:37:28 +01:00
parent 4b751a29c2
commit 6ca2269c80
6 changed files with 29 additions and 16 deletions

View File

@@ -10,7 +10,7 @@
'border-3 border-white dark:border-dark-background': isBorder,
},
]"
class="object-cover"
class="object-cover mx-auto"
/>
<div
v-else

View File

@@ -5,12 +5,12 @@
>
<!--Navigation-->
<div v-if="user" class="mb-auto text-center">
<MemberAvatar class="mx-auto inline-block" :size="44" :is-border="false" :member="user" />
<MemberAvatar class="mx-auto" :size="44" :is-border="false" :member="user" />
<!--Usage-->
<div
v-if="config.subscriptionType === 'metered' && user.data.meta.usages"
class="mt-1 text-center leading-3"
class="mt-2.5 text-center leading-3"
>
<b class="text-theme block text-xs font-bold leading-3">
{{ user.data.meta.usages.costEstimate }}

View File

@@ -114,9 +114,8 @@
v-for="(plan, i) in plans.data"
:plan="plan"
:key="plan.data.id"
v-if="
plan.data.attributes.interval === intervalPlanType && userSubscribedPlanId !== plan.data.id
"
v-if="plan.data.attributes.interval === intervalPlanType"
:class="{'opacity-50 pointer-events-none': userSubscribedPlanId === plan.data.id}"
:is-selected="selectedPlan && selectedPlan.data.id === plan.data.id"
@click.native="selectPlan(plan)"
/>
@@ -281,6 +280,9 @@ export default {
type: 'success',
message: this.$t('Your payment was successfully received.'),
})
// todo: temporary reload function
setTimeout(() => document.location.reload(), 1000)
},
paystackClosed() {
// ...

View File

@@ -90,9 +90,7 @@ export default {
.post('/api/subscriptions/cancel')
.then(() => {
// Update user data
this.$store.dispatch('getAppData').then(() => {
this.fetchSubscriptionDetail()
})
this.$store.dispatch('getAppData')
events.$emit('toaster', {
type: 'success',

View File

@@ -37,13 +37,26 @@ const actions = {
})
}, 300)
axios.post('/logout').then(() => {
clearTimeout(popup)
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
axios
.post('/logout')
.then(() => {
clearTimeout(popup)
router.push({ name: 'Homepage' })
})
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
router.push({name: 'Homepage'})
})
.catch((error) => {
if (error.response.status === 419) {
clearTimeout(popup)
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
router.push({name: 'Homepage'})
}
})
},
socialiteRedirect: ({ commit }, provider) => {
axios

View File

@@ -650,7 +650,7 @@ export default {
})
},
getWebhookEndpoint(service) {
return `${this.config.host}/api/subscriptions/${service}/webhook`
return `${this.config.host}/api/subscriptions/${service}/webhooks`
},
},
created() {