mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
* Update AI Assist wording on checkout page if not in rollout * update wording when buyin addon GitOrigin-RevId: 7133b4fd3efac8e8a7361dcc15d54367f809f16d
This commit is contained in:
committed by
Copybot
parent
dbb528762e
commit
ab37e18bc3
@@ -379,6 +379,12 @@ async function previewAddonPurchase(req, res) {
|
||||
paymentMethod
|
||||
)
|
||||
|
||||
await SplitTestHandler.promises.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'overleaf-assist-bundle'
|
||||
)
|
||||
|
||||
res.render('subscriptions/preview-change', {
|
||||
changePreview,
|
||||
purchaseReferrer,
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
"add_company_details": "",
|
||||
"add_email_address": "",
|
||||
"add_email_to_claim_features": "",
|
||||
"add_error_assist_annual_to_your_projects": "",
|
||||
"add_error_assist_to_your_projects": "",
|
||||
"add_files": "",
|
||||
"add_more_collaborators": "",
|
||||
"add_more_licenses_to_my_plan": "",
|
||||
|
||||
@@ -20,6 +20,7 @@ import OLButton from '@/features/ui/components/ol/ol-button'
|
||||
import { subscriptionUpdateUrl } from '@/features/subscription/data/subscription-url'
|
||||
import * as eventTracking from '@/infrastructure/event-tracking'
|
||||
import sparkleText from '@/shared/svgs/ai-sparkle-text.svg'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
|
||||
function PreviewSubscriptionChange() {
|
||||
const preview = getMeta(
|
||||
@@ -29,6 +30,7 @@ function PreviewSubscriptionChange() {
|
||||
const { t } = useTranslation()
|
||||
const payNowTask = useAsync()
|
||||
const location = useLocation()
|
||||
const aiAssistEnabled = useFeatureFlag('overleaf-assist-bundle')
|
||||
|
||||
useEffect(() => {
|
||||
if (preview.change.type === 'add-on-purchase') {
|
||||
@@ -107,20 +109,37 @@ function PreviewSubscriptionChange() {
|
||||
|
||||
{aiAddOnChange && (
|
||||
<div>
|
||||
<Trans
|
||||
i18nKey="add_ai_assist_to_your_plan"
|
||||
components={{
|
||||
sparkle: (
|
||||
<img
|
||||
alt="sparkle"
|
||||
className="ai-error-assistant-sparkle"
|
||||
src={sparkleText}
|
||||
aria-hidden="true"
|
||||
key="sparkle"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
{aiAssistEnabled ? (
|
||||
<Trans
|
||||
i18nKey="add_ai_assist_to_your_plan"
|
||||
components={{
|
||||
sparkle: (
|
||||
<img
|
||||
alt="sparkle"
|
||||
className="ai-error-assistant-sparkle"
|
||||
src={sparkleText}
|
||||
aria-hidden="true"
|
||||
key="sparkle"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<Trans
|
||||
i18nKey="add_error_assist_to_your_projects"
|
||||
components={{
|
||||
sparkle: (
|
||||
<img
|
||||
alt="sparkle"
|
||||
className="ai-error-assistant-sparkle"
|
||||
src={sparkleText}
|
||||
aria-hidden="true"
|
||||
key="sparkle"
|
||||
/>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import '@/marketing'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import PreviewSubscriptionChange from '@/features/subscription/components/preview-subscription-change/root'
|
||||
import { SplitTestProvider } from '@/shared/context/split-test-context'
|
||||
|
||||
const element = document.getElementById('subscription-preview-change')
|
||||
if (element) {
|
||||
const root = createRoot(element)
|
||||
root.render(<PreviewSubscriptionChange />)
|
||||
root.render(
|
||||
<SplitTestProvider>
|
||||
<PreviewSubscriptionChange />
|
||||
</SplitTestProvider>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -88,6 +88,8 @@
|
||||
"add_email": "Add Email",
|
||||
"add_email_address": "Add email address",
|
||||
"add_email_to_claim_features": "Add an institutional email address to claim your features.",
|
||||
"add_error_assist_annual_to_your_projects": "Add Error Assist Annual <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
|
||||
"add_error_assist_to_your_projects": "Add Error Assist <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
|
||||
"add_files": "Add Files",
|
||||
"add_more_collaborators": "Add more collaborators",
|
||||
"add_more_licenses_to_my_plan": "Add more licenses to my plan",
|
||||
|
||||
Reference in New Issue
Block a user