0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Made unsubscribe from all button sticky on scroll (#21381)

ref DES-785
This commit is contained in:
Sodbileg Gansukh 2024-10-23 19:07:29 +08:00 committed by GitHub
parent 182a07278d
commit c11c516e14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 16 deletions

View file

@ -183,21 +183,23 @@ export default function NewsletterManagement({
/>
</div>
</div>
<div className='gh-portal-btn-product gh-portal-btn-unsubscribe' style={{marginTop: '-48px', marginBottom: 0}}>
<ActionButton
isRunning={false}
onClick={() => {
unsubscribeAll();
}}
disabled={isDisabled}
brandColor={brandColor}
isPrimary={false}
label={t('Unsubscribe from all emails')}
isDestructive={true}
style={{width: '100%', zIndex: 900}}
dataTestId="unsubscribe-from-all-emails"
/>
</div>
<footer className={'gh-portal-action-footer' + (hasMemberGotEmailSuppression({member}) ? ' gh-feature-suppressions' : '')}>
<div style={{width: '100%'}}>
<ActionButton
isRunning={false}
onClick={() => {
unsubscribeAll();
}}
disabled={isDisabled}
brandColor={brandColor}
isPrimary={false}
label={t('Unsubscribe from all emails')}
isDestructive={true}
style={{width: '100%'}}
dataTestId="unsubscribe-from-all-emails"
/>
<ShowPaidMemberMessage isPaid={isPaidMember} site={site} />
</div>
{hasMemberGotEmailSuppression({member}) && !isDisabled &&

View file

@ -353,7 +353,7 @@ export const ProductsSectionStyles = () => {
z-index: 800;
}
.gh-portal-btn-product .gh-portal-btn {
.gh-portal-btn-product:not(.gh-portal-btn-unsubscribe) .gh-portal-btn {
background: var(--brandcolor);
color: var(--white);
border: none;
@ -361,11 +361,11 @@ export const ProductsSectionStyles = () => {
z-index: 900;
}
.gh-portal-btn-product .gh-portal-btn:hover {
.gh-portal-btn-product:not(.gh-portal-btn-unsubscribe) .gh-portal-btn:hover {
opacity: 0.9;
}
.gh-portal-btn-product .gh-portal-btn {
.gh-portal-btn-product:not(.gh-portal-btn-unsubscribe) .gh-portal-btn {
background: var(--brandcolor);
color: var(--white);
border: none;