mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #21938 from overleaf/jdt-checkout-success-add-on-wording
[Web] Adapt post checkout page for add-ons GitOrigin-RevId: ee3ee28820f65977600a5aa47d85365148233bac
This commit is contained in:
parent
6e39885fde
commit
71112d2fdc
3 changed files with 73 additions and 19 deletions
|
@ -1541,6 +1541,8 @@
|
|||
"thanks_for_confirming_your_email_address": "",
|
||||
"thanks_for_getting_in_touch": "",
|
||||
"thanks_for_subscribing": "",
|
||||
"thanks_for_subscribing_to_plan_with_add_on": "",
|
||||
"thanks_for_subscribing_to_the_add_on": "",
|
||||
"thanks_for_subscribing_you_help_sl": "",
|
||||
"thanks_settings_updated": "",
|
||||
"the_add_on_will_remain_active_until": "",
|
||||
|
|
|
@ -7,6 +7,12 @@ import OLRow from '@/features/ui/components/ol/ol-row'
|
|||
import OLCol from '@/features/ui/components/ol/ol-col'
|
||||
import OLPageContentCard from '@/features/ui/components/ol/ol-page-content-card'
|
||||
import OLNotification from '@/features/ui/components/ol/ol-notification'
|
||||
import {
|
||||
AI_ADD_ON_CODE,
|
||||
ADD_ON_NAME,
|
||||
isStandaloneAiPlanCode,
|
||||
} from '../../data/add-on-codes'
|
||||
import { RecurlySubscription } from '../../../../../../types/subscription/dashboard/subscription'
|
||||
|
||||
function SuccessfulSubscription() {
|
||||
const { t } = useTranslation()
|
||||
|
@ -17,6 +23,8 @@ function SuccessfulSubscription() {
|
|||
|
||||
if (!subscription || !('recurly' in subscription)) return null
|
||||
|
||||
const onAiStandalonePlan = isStandaloneAiPlanCode(subscription.planCode)
|
||||
|
||||
return (
|
||||
<div className="container">
|
||||
<OLRow>
|
||||
|
@ -66,12 +74,11 @@ function SuccessfulSubscription() {
|
|||
</a>
|
||||
</p>
|
||||
)}
|
||||
<p>
|
||||
{t('thanks_for_subscribing_you_help_sl', {
|
||||
planName: subscription.plan.name,
|
||||
})}
|
||||
</p>
|
||||
<PremiumFeaturesLink />
|
||||
<ThankYouSection
|
||||
subscription={subscription}
|
||||
onAiStandalonePlan={onAiStandalonePlan}
|
||||
/>
|
||||
{!onAiStandalonePlan && <PremiumFeaturesLink />}
|
||||
<p>
|
||||
{t('need_anything_contact_us_at')}
|
||||
<a href={`mailto:${adminEmail}`} rel="noopener noreferrer">
|
||||
|
@ -79,6 +86,7 @@ function SuccessfulSubscription() {
|
|||
</a>
|
||||
.
|
||||
</p>
|
||||
{!onAiStandalonePlan && (
|
||||
<p>
|
||||
<Trans
|
||||
i18nKey="help_improve_overleaf_fill_out_this_survey"
|
||||
|
@ -92,6 +100,7 @@ function SuccessfulSubscription() {
|
|||
]}
|
||||
/>
|
||||
</p>
|
||||
)}
|
||||
<p>
|
||||
{t('regards')},
|
||||
<br />
|
||||
|
@ -113,4 +122,45 @@ function SuccessfulSubscription() {
|
|||
)
|
||||
}
|
||||
|
||||
function ThankYouSection({
|
||||
subscription,
|
||||
onAiStandalonePlan,
|
||||
}: {
|
||||
subscription: RecurlySubscription
|
||||
onAiStandalonePlan: boolean
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
const hasAiAddon = subscription?.addOns?.some(
|
||||
addOn => addOn.addOnCode === AI_ADD_ON_CODE
|
||||
)
|
||||
|
||||
if (onAiStandalonePlan) {
|
||||
return (
|
||||
<p>
|
||||
{t('thanks_for_subscribing_to_the_add_on', {
|
||||
addOnName: ADD_ON_NAME,
|
||||
})}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
if (hasAiAddon) {
|
||||
return (
|
||||
<p>
|
||||
{t('thanks_for_subscribing_to_plan_with_add_on', {
|
||||
planName: subscription.plan.name,
|
||||
addOnName: ADD_ON_NAME,
|
||||
})}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<p>
|
||||
{t('thanks_for_subscribing_you_help_sl', {
|
||||
planName: subscription.plan.name,
|
||||
})}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
export default SuccessfulSubscription
|
||||
|
|
|
@ -2140,6 +2140,8 @@
|
|||
"thanks_for_confirming_your_email_address": "Thanks for confirming your email address",
|
||||
"thanks_for_getting_in_touch": "Thanks for getting in touch. Our team will get back to you by email as soon as possible.",
|
||||
"thanks_for_subscribing": "Thanks for subscribing!",
|
||||
"thanks_for_subscribing_to_plan_with_add_on": "Thank you for subscribing to the __planName__ plan with the __addOnName__ add-on. It’s support from people like yourself that allows __appName__ to continue to grow and improve.",
|
||||
"thanks_for_subscribing_to_the_add_on": "Thank you for subscribing to the __addOnName__ add-on. It’s support from people like yourself that allows __appName__ to continue to grow and improve.",
|
||||
"thanks_for_subscribing_you_help_sl": "Thank you for subscribing to the __planName__ plan. It’s support from people like yourself that allows __appName__ to continue to grow and improve.",
|
||||
"thanks_settings_updated": "Thanks, your settings have been updated.",
|
||||
"the_add_on_will_remain_active_until": "The add-on will remain active until the end of the current billing period.",
|
||||
|
|
Loading…
Reference in a new issue