🎨 Added option to change the name of the free tier (#19715)

ref ENG-607

- also added the option to show the monthly pricing by default during
signup

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
This commit is contained in:
Sag 2024-02-20 12:54:41 +01:00 committed by GitHub
parent 1d0fe18dd3
commit e9f5af110c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 14 deletions

View File

@ -59,10 +59,6 @@ const features = [{
title: 'New email addresses', title: 'New email addresses',
description: 'For self hosters, forces the usage of the mail.from config as from address for all outgoing emails', description: 'For self hosters, forces the usage of the mail.from config as from address for all outgoing emails',
flag: 'newEmailAddresses' flag: 'newEmailAddresses'
},{
title: 'Portal improvements',
description: 'Adds a bunch of improvements to portal and portal settings',
flag: 'portalImprovements'
}]; }];
const AlphaFeatures: React.FC = () => { const AlphaFeatures: React.FC = () => {

View File

@ -431,7 +431,8 @@ export function getSiteProducts({site, pageQuery}) {
} }
if (hasFreeProductPrice({site})) { if (hasFreeProductPrice({site})) {
products.unshift({ products.unshift({
id: 'free' id: 'free',
type: 'free'
}); });
} }
return products; return products;
@ -450,11 +451,8 @@ export function getFreeProductBenefits({site}) {
} }
export function getFreeTierTitle({site}) { export function getFreeTierTitle({site}) {
if (hasOnlyFreeProduct({site})) { const freeProduct = getFreeProduct({site});
return 'Free membership'; return freeProduct?.name || 'Free';
} else {
return 'Free';
}
} }
export function getFreeTierDescription({site}) { export function getFreeTierDescription({site}) {

View File

@ -23,7 +23,8 @@ const GA_FEATURES = [
'recommendations', 'recommendations',
'listUnsubscribeHeader', 'listUnsubscribeHeader',
'filterEmailDisabled', 'filterEmailDisabled',
'newEmailAddresses' 'newEmailAddresses',
'portalImprovements'
]; ];
// NOTE: this allowlist is meant to be used to filter out any unexpected // NOTE: this allowlist is meant to be used to filter out any unexpected
@ -47,8 +48,7 @@ const ALPHA_FEATURES = [
'lexicalIndicators', 'lexicalIndicators',
// 'adminXOffers', // 'adminXOffers',
'filterEmailDisabled', 'filterEmailDisabled',
'adminXDemo', 'adminXDemo'
'portalImprovements'
]; ];
module.exports.GA_KEYS = [...GA_FEATURES]; module.exports.GA_KEYS = [...GA_FEATURES];

View File

@ -1155,7 +1155,7 @@ exports[`Settings API Edit Can edit a setting 2: [headers] 1`] = `
Object { Object {
"access-control-allow-origin": "http://127.0.0.1:2369", "access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "4534", "content-length": "4562",
"content-type": "application/json; charset=utf-8", "content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,