|
@@ -450,7 +450,6 @@ const _ProjectController = {
|
|
|
'track-pdf-download',
|
|
'track-pdf-download',
|
|
|
!anonymous && 'writefull-oauth-promotion',
|
|
!anonymous && 'writefull-oauth-promotion',
|
|
|
'hotjar',
|
|
'hotjar',
|
|
|
- 'overleaf-assist-bundle',
|
|
|
|
|
'word-count-client',
|
|
'word-count-client',
|
|
|
'editor-popup-ux-survey-03-2026',
|
|
'editor-popup-ux-survey-03-2026',
|
|
|
'editor-redesign-new-users',
|
|
'editor-redesign-new-users',
|
|
@@ -840,9 +839,6 @@ const _ProjectController = {
|
|
|
capabilities.push('link-sharing')
|
|
capabilities.push('link-sharing')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const isOverleafAssistBundleEnabled =
|
|
|
|
|
- splitTestAssignments['overleaf-assist-bundle']?.variant === 'enabled'
|
|
|
|
|
-
|
|
|
|
|
let fullFeatureSet = user?.features
|
|
let fullFeatureSet = user?.features
|
|
|
if (!anonymous) {
|
|
if (!anonymous) {
|
|
|
fullFeatureSet = await UserGetter.promises.getUserFeatures(userId)
|
|
fullFeatureSet = await UserGetter.promises.getUserFeatures(userId)
|
|
@@ -851,9 +847,10 @@ const _ProjectController = {
|
|
|
const hasPaidSubscription = isPaidSubscription(subscription)
|
|
const hasPaidSubscription = isPaidSubscription(subscription)
|
|
|
const aiFeaturesDisabled = user.aiFeatures?.enabled === false
|
|
const aiFeaturesDisabled = user.aiFeatures?.enabled === false
|
|
|
|
|
|
|
|
|
|
+ const showAiFeatures = aiFeaturesAllowed && !aiFeaturesDisabled
|
|
|
|
|
+ // only add-on is ai based, so we only need its pricing info if ai features are usable
|
|
|
const addonPrices =
|
|
const addonPrices =
|
|
|
- isOverleafAssistBundleEnabled &&
|
|
|
|
|
- (await ProjectController._getAddonPrices(req, res))
|
|
|
|
|
|
|
+ showAiFeatures && (await ProjectController._getAddonPrices(req, res))
|
|
|
|
|
|
|
|
let standardPlanPricing
|
|
let standardPlanPricing
|
|
|
let recommendedCurrency
|
|
let recommendedCurrency
|
|
@@ -955,7 +952,7 @@ const _ProjectController = {
|
|
|
showSymbolPalette,
|
|
showSymbolPalette,
|
|
|
symbolPaletteAvailable: Features.hasFeature('symbol-palette'),
|
|
symbolPaletteAvailable: Features.hasFeature('symbol-palette'),
|
|
|
userRestrictions: Array.from(req.userRestrictions || []),
|
|
userRestrictions: Array.from(req.userRestrictions || []),
|
|
|
- showAiFeatures: aiFeaturesAllowed && !aiFeaturesDisabled,
|
|
|
|
|
|
|
+ showAiFeatures,
|
|
|
onAiFreeTrial:
|
|
onAiFreeTrial:
|
|
|
user.features?.aiUsageQuota === Settings.aiFeatures?.freeTrialQuota,
|
|
user.features?.aiUsageQuota === Settings.aiFeatures?.freeTrialQuota,
|
|
|
detachRole,
|
|
detachRole,
|
|
@@ -967,7 +964,6 @@ const _ProjectController = {
|
|
|
projectTags,
|
|
projectTags,
|
|
|
isSaas: Features.hasFeature('saas'),
|
|
isSaas: Features.hasFeature('saas'),
|
|
|
shouldLoadHotjar,
|
|
shouldLoadHotjar,
|
|
|
- isOverleafAssistBundleEnabled,
|
|
|
|
|
customerIoEnabled: true,
|
|
customerIoEnabled: true,
|
|
|
addonPrices,
|
|
addonPrices,
|
|
|
compileSettings: {
|
|
compileSettings: {
|
|
@@ -1012,6 +1008,7 @@ const _ProjectController = {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ // todo: quota clean-up: these can be removed potentially?
|
|
|
async _getAddonPrices(req, res, addonPlans = ['assistant']) {
|
|
async _getAddonPrices(req, res, addonPlans = ['assistant']) {
|
|
|
const plansData = {}
|
|
const plansData = {}
|
|
|
|
|
|