Appsumo (#232)
* Implemented webhooks * oAuth wip * Implement the whole auth flow * Implement file upload limit depending on appsumo license
This commit is contained in:
77
resources/js/components/vendor/appsumo/AppSumoBilling.vue
vendored
Normal file
77
resources/js/components/vendor/appsumo/AppSumoBilling.vue
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<div v-if="user.active_license" class="border p-5 shadow-md rounded-md">
|
||||
<div class="w-auto flex flex-col items-center">
|
||||
<img :src="asset('img/appsumo/as-taco-white-bg.png')" class="max-w-[60px]" alt="AppSumo">
|
||||
<img :src="asset('img/appsumo/as-Select-dark.png')" class="max-w-[150px]" alt="AppSumo">
|
||||
</div>
|
||||
<p class="mt-6">
|
||||
Your AppSumo <span class="font-semibold">lifetime deal tier {{ licenseTier }}</span> license is active. Here's a reminder of your plan details:
|
||||
</p>
|
||||
<ul class="list-disc pl-5 mt-4">
|
||||
<li>Number of Forms: <span class="font-semibold">{{ tierFeatures.form_quantity }}</span></li>
|
||||
<li>Custom domains: <span class="font-semibold">{{ tierFeatures.domain_names }}</span></li>
|
||||
<li>File Size Uploads: <span class="font-semibold">{{ tierFeatures.file_upload_size }}</span></li>
|
||||
</ul>
|
||||
<div class="w-max">
|
||||
<v-button color="outline-gray" shade="lighter" class="mt-4 block" href="https://appsumo.com/account/products/" target="_blank">
|
||||
Mangage in AppSumo
|
||||
</v-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import VButton from '../../common/Button.vue'
|
||||
|
||||
export default {
|
||||
|
||||
name: 'AppSumoBilling',
|
||||
components: { VButton },
|
||||
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters({
|
||||
user: 'auth/user'
|
||||
}),
|
||||
licenseTier () {
|
||||
return this.user?.active_license?.meta?.tier
|
||||
},
|
||||
tierFeatures () {
|
||||
if (!this.licenseTier) return {}
|
||||
return {
|
||||
1: {
|
||||
form_quantity: 'Unlimited',
|
||||
file_upload_size: '25mb',
|
||||
domain_names: '5'
|
||||
},
|
||||
2: {
|
||||
form_quantity: 'Unlimited',
|
||||
file_upload_size: '50mb',
|
||||
domain_names: '25'
|
||||
},
|
||||
3: {
|
||||
form_quantity: 'Unlimited',
|
||||
file_upload_size: '75mb',
|
||||
domain_names: 'Unlimited'
|
||||
}
|
||||
}[this.licenseTier]
|
||||
}
|
||||
},
|
||||
|
||||
watch: {},
|
||||
|
||||
mounted () {},
|
||||
|
||||
created () {
|
||||
},
|
||||
destroyed () {
|
||||
},
|
||||
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
50
resources/js/components/vendor/appsumo/AppSumoRegister.vue
vendored
Normal file
50
resources/js/components/vendor/appsumo/AppSumoRegister.vue
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div v-if="hasValidLicense" class="p-6 bg-white border shadow-md rounded-md">
|
||||
<img :src="asset('img/appsumo/as-taco-white-bg.png')" class="max-w-[60px] mx-auto" alt="AppSumo">
|
||||
<img :src="asset('img/appsumo/as-Select-dark.png')" class="max-w-[300px] mx-auto" alt="AppSumo">
|
||||
<p class="mt-6">
|
||||
<span class="text-green-500">We found your AppSumo Lifetime deal license!</span> Just complete the registration form to finalize the activation of
|
||||
your license.
|
||||
</p>
|
||||
</div>
|
||||
<div v-else-if="hasLicenseError" class="p-6 bg-white border border-red-500 shadow-md rounded-md">
|
||||
<img :src="asset('img/appsumo/as-taco-white-bg.png')" class="max-w-[60px] mx-auto" alt="AppSumo">
|
||||
<img :src="asset('img/appsumo/as-Select-dark.png')" class="max-w-[300px] mx-auto" alt="AppSumo">
|
||||
<p class="mt-6">
|
||||
<span class="text-red-600">Invalid AppSumo license</span>. The license was probably already attached to an OpnForm account. Please contact support.
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
name: 'AppSumoRegister',
|
||||
|
||||
data () {
|
||||
return {
|
||||
hasValidLicense: false,
|
||||
hasLicenseError: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
||||
watch: {},
|
||||
|
||||
mounted () {
|
||||
if (this.$route.query.appsumo_license !== undefined && this.$route.query.appsumo_license) {
|
||||
this.hasValidLicense = true
|
||||
} else if (this.$route.query.appsumo_error !== undefined && this.$route.query.appsumo_error) {
|
||||
this.hasLicenseError = true
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
},
|
||||
destroyed () {
|
||||
},
|
||||
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user