Update Overleaf assist paywall to reflect group and institution licensing (#24061)

GitOrigin-RevId: 5df447febb845ed60ddb04428d7f6a0375f351f7
This commit is contained in:
Domagoj Kriskovic 2025-03-05 12:35:18 +01:00 committed by Copybot
parent 08882c63df
commit 42ddbb6eb3
5 changed files with 15 additions and 2 deletions

View file

@ -772,6 +772,11 @@ const _ProjectController = {
isOverleafAssistBundleEnabled &&
(await ProjectController._getAddonPrices(req, res))
let planCode = subscription?.planCode
if (!planCode && !userInNonIndividualSub) {
planCode = 'free'
}
res.render(template, {
title: project.name,
priority_title: true,
@ -801,6 +806,9 @@ const _ProjectController = {
labsProgram: user.labsProgram,
inactiveTutorials: TutorialHandler.getInactiveTutorials(user),
isAdmin: hasAdminAccess(user),
planCode,
isMemberOfGroupSubscription: userIsMemberOfGroupSubscription,
hasInstitutionLicence: userHasInstitutionLicence,
},
userSettings: {
mode: user.ace.mode,
@ -876,7 +884,6 @@ const _ProjectController = {
isOverleafAssistBundleEnabled,
paywallPlans,
addonPrices,
planCode: subscription?.planCode,
})
timer.done()
} catch (err) {

View file

@ -48,7 +48,6 @@ if(isPaywallChangeCompileTimeoutEnabled)
if(isOverleafAssistBundleEnabled)
//- expose plans info to show prices in paywall-change-compile-timeout test
meta(name="ol-addonPrices", data-type="json" content=addonPrices)
meta(name="ol-planCode", data-type="string" content=planCode)
// translations for the loading page, before i18n has loaded in the client
meta(name="ol-loadingText", data-type="string" content=translate("loading"))
meta(name="ol-translationIoNotLoaded", data-type="string" content=translate("could_not_connect_to_websocket_server"))

View file

@ -85,6 +85,8 @@
"add_ons_are": "",
"add_or_remove_project_from_tag": "",
"add_overleaf_assist": "",
"add_overleaf_assist_to_your_group_subscription": "",
"add_overleaf_assist_to_your_institution": "",
"add_overleaf_assist_to_your_plan": "",
"add_people": "",
"add_role_and_department": "",

View file

@ -98,6 +98,8 @@
"add_ons_are": "<strong>Add-ons:</strong> __addOnName__",
"add_or_remove_project_from_tag": "Add or remove project from tag __tagName__",
"add_overleaf_assist": "Add Overleaf Assist",
"add_overleaf_assist_to_your_group_subscription": "Add Overleaf Assist to your group subscription",
"add_overleaf_assist_to_your_institution": "Add Overleaf Assist to your institution",
"add_overleaf_assist_to_your_plan": "Add Overelaf assist to your __planName__ plan",
"add_people": "Add people",
"add_role_and_department": "Add role and department",

View file

@ -58,6 +58,9 @@ export type User = {
enabled: boolean
}
featureUsage?: FeatureUsage
planCode?: string
isMemberOfGroupSubscription?: boolean
hasInstitutionLicence?: boolean
}
export type LoggedOutUser = {