Merge pull request #20547 from overleaf/em-assist-plan

Add a button for buying standalone Overleaf Assist

GitOrigin-RevId: 50baea48ea990eba38ef564b71a79a76bbd45dfc
This commit is contained in:
Eric Mc Sween 2024-09-27 08:20:01 -04:00 committed by Copybot
parent c6633632d6
commit 918d0f24eb
5 changed files with 24 additions and 3 deletions

View file

@ -231,6 +231,7 @@ async function userSubscriptionPage(req, res) {
res,
'local-ccy-format-v2'
)
await SplitTestHandler.promises.getAssignment(req, res, 'ai-add-on')
// Populates splitTestVariants with a value for the split test name and allows
// Pug to read it

View file

@ -146,6 +146,7 @@
"browser": "",
"bulk_accept_confirm": "",
"bulk_reject_confirm": "",
"buy_overleaf_assist": "",
"by_subscribing_you_agree_to_our_terms_of_service": "",
"can_edit": "",
"can_link_institution_email_acct_to_institution_acct": "",

View file

@ -1,4 +1,5 @@
import { useTranslation, Trans } from 'react-i18next'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
function FreePlan() {
const { t } = useTranslation()
@ -23,9 +24,17 @@ function FreePlan() {
<li>{t('github_integration_lowercase')}</li>
<li>{t('priority_support')}</li>
</ul>
<a className="btn btn-primary" href="/user/subscription/plans">
<a className="btn btn-primary me-1" href="/user/subscription/plans">
{t('upgrade_now')}
</a>
{isSplitTestEnabled('ai-add-on') && (
<a
className="btn btn-secondary"
href="/user/subscription/new?planCode=assist"
>
{t('buy_overleaf_assist')}
</a>
)}
</>
)
}

View file

@ -1,5 +1,6 @@
import { useTranslation } from 'react-i18next'
import { RecurlySubscription } from '../../../../../../../types/subscription/dashboard/subscription'
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
export function ExpiredSubscription({
subscription,
@ -14,12 +15,20 @@ export function ExpiredSubscription({
<p>
<a
href={subscription.recurly.accountManagementLink}
className="btn btn-secondary-info btn-secondary"
className="btn btn-secondary-info btn-secondary me-1"
target="_blank"
rel="noreferrer noopener"
>
{t('view_your_invoices')}
</a>{' '}
</a>
{isSplitTestEnabled('ai-add-on') && (
<a
className="btn btn-secondary me-1"
href="/user/subscription/new?planCode=assist"
>
{t('buy_overleaf_assist')}
</a>
)}
<a href="/user/subscription/plans" className="btn btn-primary">
{t('create_new_subscription')}
</a>

View file

@ -203,6 +203,7 @@
"bulk_accept_confirm": "Are you sure you want to accept the selected __nChanges__ changes?",
"bulk_reject_confirm": "Are you sure you want to reject the selected __nChanges__ changes?",
"buy_now_no_exclamation_mark": "Buy now",
"buy_overleaf_assist": "Buy Overleaf Assist",
"by": "by",
"by_joining_labs": "By joining Labs, you agree to receive occasional emails and updates from Overleaf—for example, to request your feedback. You also agree to our <0>terms of service</0> and <1>privacy notice</1>.",
"by_registering_you_agree_to_our_terms_of_service": "By registering, you agree to our <0>terms of service</0> and <1>privacy notice</1>.",