mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 00:52:36 +03:00
Updated tier settings labels, hints and placeholders ENG-554 ENG-555 ENG-557 ENG-592 (#19580)
refs ENG-554 ENG-555 ENG-557 ENG-592 - Updated dropdown label copy - Updated tier name placeholder logic - Updated hint copy for free tier - Changed price placeholder values - Removed visibility hint when creating/editing tiers
This commit is contained in:
parent
0c95111f8e
commit
1f90cf7ea9
@ -162,7 +162,7 @@ const SignupOptions: React.FC<{
|
|||||||
<Select
|
<Select
|
||||||
options={defaultPlanOptions}
|
options={defaultPlanOptions}
|
||||||
selectedOption={defaultPlanOptions.find(option => option.value === portalDefaultPlan)}
|
selectedOption={defaultPlanOptions.find(option => option.value === portalDefaultPlan)}
|
||||||
title='Price preselected at signup'
|
title='Default price at signup'
|
||||||
onSelect={(option) => {
|
onSelect={(option) => {
|
||||||
updateSetting('portal_default_plan', option?.value ?? 'yearly');
|
updateSetting('portal_default_plan', option?.value ?? 'yearly');
|
||||||
}}
|
}}
|
||||||
|
@ -3,7 +3,7 @@ import React, {useEffect, useRef} from 'react';
|
|||||||
import TierDetailPreview from './TierDetailPreview';
|
import TierDetailPreview from './TierDetailPreview';
|
||||||
import useFeatureFlag from '../../../../hooks/useFeatureFlag';
|
import useFeatureFlag from '../../../../hooks/useFeatureFlag';
|
||||||
import useSettingGroup from '../../../../hooks/useSettingGroup';
|
import useSettingGroup from '../../../../hooks/useSettingGroup';
|
||||||
import {Button, ButtonProps, ConfirmationModal, CurrencyField, Form, Heading, Hint, Icon, Modal, Select, SortableList, TextField, Toggle, URLTextField, showToast, useSortableIndexedList} from '@tryghost/admin-x-design-system';
|
import {Button, ButtonProps, ConfirmationModal, CurrencyField, Form, Heading, Icon, Modal, Select, SortableList, TextField, Toggle, URLTextField, showToast, useSortableIndexedList} from '@tryghost/admin-x-design-system';
|
||||||
import {ErrorMessages, useForm, useHandleError} from '@tryghost/admin-x-framework/hooks';
|
import {ErrorMessages, useForm, useHandleError} from '@tryghost/admin-x-framework/hooks';
|
||||||
import {RoutingModalProps, useRouting} from '@tryghost/admin-x-framework/routing';
|
import {RoutingModalProps, useRouting} from '@tryghost/admin-x-framework/routing';
|
||||||
import {Tier, useAddTier, useBrowseTiers, useEditTier} from '@tryghost/admin-x-framework/api/tiers';
|
import {Tier, useAddTier, useBrowseTiers, useEditTier} from '@tryghost/admin-x-framework/api/tiers';
|
||||||
@ -213,7 +213,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
autoComplete='off'
|
autoComplete='off'
|
||||||
error={Boolean(errors.name)}
|
error={Boolean(errors.name)}
|
||||||
hint={errors.name}
|
hint={errors.name}
|
||||||
placeholder='Bronze'
|
placeholder={isFreeTier ? 'Free' : 'Bronze'}
|
||||||
title='Name'
|
title='Name'
|
||||||
value={formState.name || ''}
|
value={formState.name || ''}
|
||||||
autoFocus
|
autoFocus
|
||||||
@ -252,7 +252,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
<CurrencyField
|
<CurrencyField
|
||||||
error={Boolean(errors.monthly_price)}
|
error={Boolean(errors.monthly_price)}
|
||||||
hint={errors.monthly_price}
|
hint={errors.monthly_price}
|
||||||
placeholder='1'
|
placeholder='5'
|
||||||
rightPlaceholder={`${formState.currency}/month`}
|
rightPlaceholder={`${formState.currency}/month`}
|
||||||
title='Monthly price'
|
title='Monthly price'
|
||||||
valueInCents={formState.monthly_price || ''}
|
valueInCents={formState.monthly_price || ''}
|
||||||
@ -263,7 +263,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
<CurrencyField
|
<CurrencyField
|
||||||
error={Boolean(errors.yearly_price)}
|
error={Boolean(errors.yearly_price)}
|
||||||
hint={errors.yearly_price}
|
hint={errors.yearly_price}
|
||||||
placeholder='10'
|
placeholder='50'
|
||||||
rightPlaceholder={`${formState.currency}/year`}
|
rightPlaceholder={`${formState.currency}/year`}
|
||||||
title='Yearly price'
|
title='Yearly price'
|
||||||
valueInCents={formState.yearly_price || ''}
|
valueInCents={formState.yearly_price || ''}
|
||||||
@ -294,7 +294,7 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
</>)}
|
</>)}
|
||||||
<URLTextField
|
<URLTextField
|
||||||
baseUrl={siteData?.url}
|
baseUrl={siteData?.url}
|
||||||
hint='Redirect to this URL after signup for premium membership'
|
hint={`Redirect to this URL after signup ${isFreeTier ? '' : ' for premium membership'}`}
|
||||||
placeholder={siteData?.url}
|
placeholder={siteData?.url}
|
||||||
title='Welcome page'
|
title='Welcome page'
|
||||||
value={formState.welcome_page_url || null}
|
value={formState.welcome_page_url || null}
|
||||||
@ -352,16 +352,6 @@ const TierDetailModalContent: React.FC<{tier?: Tier}> = ({tier}) => {
|
|||||||
</div>
|
</div>
|
||||||
<div className='sticky top-[96px] hidden shrink-0 basis-[380px] min-[920px]:!visible min-[920px]:!block'>
|
<div className='sticky top-[96px] hidden shrink-0 basis-[380px] min-[920px]:!visible min-[920px]:!block'>
|
||||||
<TierDetailPreview isFreeTier={isFreeTier} tier={formState} />
|
<TierDetailPreview isFreeTier={isFreeTier} tier={formState} />
|
||||||
|
|
||||||
{hasPortalImprovements &&
|
|
||||||
<Form className=' mt-0' gap='none'>
|
|
||||||
<Hint className=''>
|
|
||||||
<p className='inline-block'>{(formState.visibility === 'public') ? 'Visible' : 'Not visible'} at signup. You can change this in {tier ? <Button className='text-xs font-normal' color='green' label='Portal settings' link onClick={() => {
|
|
||||||
updateRoute('portal/edit');
|
|
||||||
}}/> : <span className='font-semibold'>Portal settings</span>}.</p>
|
|
||||||
</Hint>
|
|
||||||
</Form>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Modal>;
|
</Modal>;
|
||||||
|
@ -98,7 +98,7 @@ const TierDetailPreview: React.FC<TierDetailPreviewProps> = ({tier, isFreeTier})
|
|||||||
<div className='rounded-sm border border-grey-200 bg-white dark:border-transparent'>
|
<div className='rounded-sm border border-grey-200 bg-white dark:border-transparent'>
|
||||||
<div className="flex-column relative flex min-h-[200px] w-full max-w-[420px] scale-90 items-start justify-stretch rounded bg-white p-4">
|
<div className="flex-column relative flex min-h-[200px] w-full max-w-[420px] scale-90 items-start justify-stretch rounded bg-white p-4">
|
||||||
<div className="min-h-[56px] w-full">
|
<div className="min-h-[56px] w-full">
|
||||||
<h4 className={`-mt-1 mb-0 w-full break-words text-lg font-semibold leading-tight text-pink ${!name && 'opacity-30'}`}>{name || 'Bronze'}</h4>
|
<h4 className={`-mt-1 mb-0 w-full break-words text-lg font-semibold leading-tight text-pink ${!name && 'opacity-30'}`}>{name || (isFreeTier ? 'Free' : 'Bronze')}</h4>
|
||||||
<div className="mt-4 flex w-full flex-row flex-wrap items-end justify-between gap-x-1 gap-y-[10px]">
|
<div className="mt-4 flex w-full flex-row flex-wrap items-end justify-between gap-x-1 gap-y-[10px]">
|
||||||
<div className={`flex flex-wrap text-black ${!yearlyPrice && !monthlyPrice && !isFreeTier && 'opacity-30'}`}>
|
<div className={`flex flex-wrap text-black ${!yearlyPrice && !monthlyPrice && !isFreeTier && 'opacity-30'}`}>
|
||||||
<span className="self-start text-[2.7rem] font-bold uppercase leading-[1.115]">{currencySymbol}</span>
|
<span className="self-start text-[2.7rem] font-bold uppercase leading-[1.115]">{currencySymbol}</span>
|
||||||
|
Loading…
Reference in New Issue
Block a user