update title when only 1 email address present

This commit is contained in:
Sean Yesmunt 2020-06-22 09:43:15 -04:00
parent b4851e6045
commit a17610d365

View file

@ -117,22 +117,26 @@ export default function NotificationSettingsPage(props: Props) {
) : ( ) : (
<div className="card-stack"> <div className="card-stack">
{/* @if TARGET='app' */} {/* @if TARGET='app' */}
<label className="section help">{__('App Notifications')}</label> <Card
<div className="section"> title={__('App Notifications')}
<FormField subtitle={__('Notification settings for the desktop app.')}
type="checkbox" actions={
name="desktopNotification" <FormField
onChange={() => setClientSetting(SETTINGS.OS_NOTIFICATIONS_ENABLED, !osNotificationsEnabled)} type="checkbox"
checked={osNotificationsEnabled} name="desktopNotification"
label={__('Show Desktop Notifications')} onChange={() => setClientSetting(SETTINGS.OS_NOTIFICATIONS_ENABLED, !osNotificationsEnabled)}
helper={__('Get notified when a publish or channel is confirmed.')} checked={osNotificationsEnabled}
/> label={__('Show Desktop Notifications')}
</div> helper={__('Get notified when a publish or channel is confirmed.')}
/>
}
/>
{/* @endif */} {/* @endif */}
{enabledEmails && enabledEmails.length > 0 && ( {enabledEmails && enabledEmails.length > 0 && (
<Card <Card
title={__('Receiving Addresses')} title={enabledEmails.length === 1 ? __('Your Email') : __('Receiving Addresses')}
subtitle={__('Uncheck your email below if you want to stop receiving messages.')} subtitle={__('Uncheck your email below if you want to stop receiving messages.')}
actions={ actions={
<> <>