Fixed static copy in newsletter preview (#20238)

DES-342

A static site title ("The Local Host") was displayed in the newsletter
preview instead of the actual site title. Also, moved over the "Support
independent publishing" button to design tab in newsletter settings.
This commit is contained in:
Peter Zimon 2024-05-22 13:14:28 +02:00 committed by GitHub
parent 184457b33f
commit 277e169f7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 22 deletions

View File

@ -251,27 +251,6 @@ const Sidebar: React.FC<{
onChange={e => updateNewsletter({subscribe_on_signup: e.target.checked})}
/>
</Form>
<Separator />
<div className='my-5 flex w-full items-start'>
<span>
<Icon className='mr-2 mt-[-1px]' colorClass='text-red' name='heart'/>
</span>
<Form marginBottom={false}>
<Toggle
checked={newsletter.show_badge}
direction='rtl'
label={
<div className='flex flex-col gap-0.5'>
<span className='text-sm md:text-base'>Promote independent publishing</span>
<span className='text-[11px] leading-tight text-grey-700 md:text-xs md:leading-tight'>Show youre a part of the indie publishing movement with a small badge in the footer</span>
</div>
}
labelStyle='value'
onChange={e => updateNewsletter({show_badge: e.target.checked})}
/>
</Form>
</div>
<Separator />
<div className='mb-5 mt-10'>
{newsletter.status === 'active' ? (!onlyOne && <Button color='red' label='Archive newsletter' link onClick={confirmStatusChange} />) : <Button color='green' label='Reactivate newsletter' link onClick={confirmStatusChange} />}
</div>
@ -488,6 +467,26 @@ const Sidebar: React.FC<{
onChange={html => updateNewsletter({footer_content: html})}
/>
</Form>
<Separator />
<div className='my-5 flex w-full items-start'>
<span>
<Icon className='mr-2 mt-[-1px]' colorClass='text-red' name='heart'/>
</span>
<Form marginBottom={false}>
<Toggle
checked={newsletter.show_badge}
direction='rtl'
label={
<div className='flex flex-col gap-0.5'>
<span className='text-sm md:text-base'>Promote independent publishing</span>
<span className='text-[11px] leading-tight text-grey-700 md:text-xs md:leading-tight'>Show youre a part of the indie publishing movement with a small badge in the footer</span>
</div>
}
labelStyle='value'
onChange={e => updateNewsletter({show_badge: e.target.checked})}
/>
</Form>
</div>
</>
}
];

View File

@ -230,7 +230,7 @@ const NewsletterPreviewContent: React.FC<{
{showSubscriptionDetails && (
<div className="border-b border-grey-200 py-8" style={{borderColor: secondaryBorderColor}}>
<h4 className="mb-3 text-[1.2rem] uppercase tracking-wide" style={{color: titleColor}}>Subscription details</h4>
<p className="m-0 mb-4 text-base" style={{color: textColor}}>You are receiving this because you are a paid subscriber to The Local Host. Your subscription will renew on 17 Jul 2024.</p>
<p className="m-0 mb-4 text-base" style={{color: textColor}}>You are receiving this because you are a paid subscriber to {siteTitle}. Your subscription will renew on 17 Jul 2024.</p>
<div className="flex">
<div className="shrink-0 text-base">
<p style={{color: textColor}}>Name: Jamie Larson</p>