-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pricing Upgrade Flow changes #514
Merged
+1,145
−365
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6200fe8
Pricing Upgrade Flow changes
chiragchhatrala acca496
remove extra code
chiragchhatrala 786fe2b
Refactor subscription plan selection and billing management
chiragchhatrala dd96735
Polish the new pricing modal
JhumanJ 5eb83a9
Merge main
JhumanJ 9d5c601
Merge branch 'main' into ccbbc-pricing-upgrade-flow
JhumanJ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,7 @@ | |
|
||
<NotificationsWrapper /> | ||
<feature-base /> | ||
<SubscriptionModal /> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,45 @@ | ||
<template> | ||
<div | ||
<UTooltip | ||
v-if="shouldDisplayProTag" | ||
class="inline" | ||
:text="upgradeModalTitle??'You need a Pro plan to use this feature'" | ||
class="inline normal-case" | ||
> | ||
<UTooltip text="Upgrade to use this feature"> | ||
<div | ||
role="button" | ||
class="bg-nt-blue text-white px-2 text-xs uppercase inline rounded-full font-semibold cursor-pointer" | ||
@click="showPremiumModal = true" | ||
> | ||
PRO | ||
</div> | ||
<modal | ||
:show="showPremiumModal" | ||
@close="showPremiumModal = false" | ||
> | ||
<h2 class="text-nt-blue"> | ||
OpnForm PRO | ||
</h2> | ||
<h4 | ||
v-if="user && user.is_subscribed" | ||
class="text-center mt-5" | ||
> | ||
We're happy to have you as a Pro customer. If you're having any issue | ||
with OpnForm, or if you have a feature request, please | ||
<a href="mailto:contact@opnform.com">contact us</a>. | ||
</h4> | ||
<div | ||
v-if="!user || !user.is_subscribed" | ||
class="mt-4" | ||
> | ||
<p> | ||
All the features with a<span | ||
class="bg-nt-blue text-white px-2 text-xs uppercase inline rounded-full font-semibold mx-1" | ||
> | ||
PRO | ||
</span> | ||
tag are available in the Pro plan of OpnForm. | ||
<b>You can play around and try all Pro features within the form | ||
editor, but you can't use them in your real forms</b>. You can subscribe now to gain unlimited access to all our pro | ||
features! | ||
</p> | ||
</div> | ||
|
||
<div class="my-4 text-center"> | ||
<v-button | ||
color="white" | ||
@click="showPremiumModal = false" | ||
> | ||
Close | ||
</v-button> | ||
</div> | ||
</modal> | ||
</UTooltip> | ||
</div> | ||
<div | ||
v-track.pro_tag_click="{title:upgradeModalTitle}" | ||
class="bg-nt-blue text-white px-2 text-xs uppercase inline rounded-full font-semibold cursor-pointer" | ||
@click.stop="onClick" | ||
> | ||
PRO | ||
</div> | ||
</UTooltip> | ||
</template> | ||
|
||
<script setup> | ||
import { computed } from "vue" | ||
|
||
const props = defineProps({ | ||
upgradeModalTitle: { | ||
type: String | ||
}, | ||
upgradeModalDescription: { | ||
type: String | ||
} | ||
}) | ||
|
||
const subscriptionModalStore = useSubscriptionModalStore() | ||
const authStore = useAuthStore() | ||
const workspacesStore = useWorkspacesStore() | ||
const user = computed(() => authStore.user) | ||
const workspace = computed(() => workspacesStore.getCurrent) | ||
const showPremiumModal = ref(false) | ||
|
||
const shouldDisplayProTag = computed(() => { | ||
if (!useRuntimeConfig().public.paidPlansEnabled) return false | ||
if (!user.value || !workspace.value) return true | ||
return !workspace.value.is_pro | ||
}) | ||
|
||
function onClick () { | ||
subscriptionModalStore.setModalContent(props.upgradeModalTitle, props.upgradeModalDescription) | ||
subscriptionModalStore.openModal() | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing the
setTimeout
for immediate feedback.The use of
setTimeout
to reset theno_branding
state might cause a delay that could confuse users. Consider resetting the state immediately to provide instant feedback.Committable suggestion