mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Added email suppression FAQ modal
This commit is contained in:
parent
7df63d67b4
commit
23ded6fb67
@ -19,6 +19,7 @@ import {PopupNotificationStyles} from './common/PopupNotification';
|
|||||||
import {OfferPageStyles} from './pages/OfferPage';
|
import {OfferPageStyles} from './pages/OfferPage';
|
||||||
import {FeedbackPageStyles} from './pages/FeedbackPage';
|
import {FeedbackPageStyles} from './pages/FeedbackPage';
|
||||||
import EmailSuppressedPage from '!!raw-loader!./pages/EmailSuppressedPage.css';
|
import EmailSuppressedPage from '!!raw-loader!./pages/EmailSuppressedPage.css';
|
||||||
|
import EmailSuppressionFAQ from '!!raw-loader!./pages/EmailSuppressionFAQ.css';
|
||||||
|
|
||||||
// Global styles
|
// Global styles
|
||||||
const FrameStyles = `
|
const FrameStyles = `
|
||||||
@ -1175,6 +1176,7 @@ export function getFrameStyles({site}) {
|
|||||||
MobileStyles +
|
MobileStyles +
|
||||||
MultipleProductsGlobalStyles +
|
MultipleProductsGlobalStyles +
|
||||||
FeedbackPageStyles +
|
FeedbackPageStyles +
|
||||||
EmailSuppressedPage;
|
EmailSuppressedPage +
|
||||||
|
EmailSuppressionFAQ;
|
||||||
return FrameStyle;
|
return FrameStyle;
|
||||||
}
|
}
|
||||||
|
@ -4,11 +4,18 @@ import {ReactComponent as CloseIcon} from '../../images/icons/close.svg';
|
|||||||
|
|
||||||
export default class CloseButton extends React.Component {
|
export default class CloseButton extends React.Component {
|
||||||
static contextType = AppContext;
|
static contextType = AppContext;
|
||||||
|
|
||||||
|
closePopup = () => {
|
||||||
|
this.context.onAction('closePopup');
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const {onClick} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='gh-portal-closeicon-container'>
|
<div className='gh-portal-closeicon-container'>
|
||||||
<CloseIcon className='gh-portal-closeicon' alt='Close' onClick = {() => this.context.onAction('closePopup')} />
|
<CloseIcon className='gh-portal-closeicon' alt='Close' onClick = {onClick || this.closePopup} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
color: var(--grey6);
|
color: var(--grey6);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-email-suppressed-page-text a {
|
.gh-email-suppressed-page-button {
|
||||||
color: var(--grey3);
|
color: var(--grey3);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
text-decoration: underline;
|
||||||
|
background: none;
|
||||||
}
|
}
|
||||||
|
@ -43,11 +43,12 @@ export default function EmailSuppressedPage() {
|
|||||||
permanent failure (bounce).
|
permanent failure (bounce).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a href="https://ghost.org" target="_blank" rel="noopener noreferrer" onClick={() => {
|
<button
|
||||||
window.open('https://ghost.org', '_blank');
|
className="gh-portal-btn-text gh-email-suppressed-page-button"
|
||||||
}}>
|
onClick={() => onAction('switchPage', {page: 'emailSuppressionFAQ'})}
|
||||||
|
>
|
||||||
Learn more about why this happens
|
Learn more about why this happens
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.gh-email-suppression-faq {
|
||||||
|
|
||||||
|
}
|
23
ghost/portal/src/components/pages/EmailSuppressionFAQ.js
Normal file
23
ghost/portal/src/components/pages/EmailSuppressionFAQ.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import AppContext from 'AppContext';
|
||||||
|
import {useContext} from 'react';
|
||||||
|
import CloseButton from 'components/common/CloseButton';
|
||||||
|
|
||||||
|
export default function EmailSuppressedPage() {
|
||||||
|
const {onAction} = useContext(AppContext);
|
||||||
|
|
||||||
|
const onClose = () => {
|
||||||
|
onAction('switchPage', {page: 'emailSuppressed'});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="gh-email-suppressed-page">
|
||||||
|
<header className='gh-portal-detail-header'>
|
||||||
|
<CloseButton onClick={onClose} />
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div className="gh-email-suppression-faq">
|
||||||
|
<h3>Why is my email disabled?</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
@ -11,6 +11,7 @@ import NewsletterSelectionPage from './components/pages/NewsletterSelectionPage'
|
|||||||
import UnsubscribePage from './components/pages/UnsubscribePage';
|
import UnsubscribePage from './components/pages/UnsubscribePage';
|
||||||
import FeedbackPage from './components/pages/FeedbackPage';
|
import FeedbackPage from './components/pages/FeedbackPage';
|
||||||
import EmailSuppressedPage from './components/pages/EmailSuppressedPage';
|
import EmailSuppressedPage from './components/pages/EmailSuppressedPage';
|
||||||
|
import EmailSuppressionFAQ from './components/pages/EmailSuppressionFAQ';
|
||||||
|
|
||||||
/** List of all available pages in Portal, mapped to their UI component
|
/** List of all available pages in Portal, mapped to their UI component
|
||||||
* Any new page added to portal needs to be mapped here
|
* Any new page added to portal needs to be mapped here
|
||||||
@ -28,7 +29,8 @@ const Pages = {
|
|||||||
loading: LoadingPage,
|
loading: LoadingPage,
|
||||||
offer: OfferPage,
|
offer: OfferPage,
|
||||||
feedback: FeedbackPage,
|
feedback: FeedbackPage,
|
||||||
emailSuppressed: EmailSuppressedPage
|
emailSuppressed: EmailSuppressedPage,
|
||||||
|
emailSuppressionFAQ: EmailSuppressionFAQ
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Return page if valid, fallback to signup */
|
/** Return page if valid, fallback to signup */
|
||||||
|
Loading…
Reference in New Issue
Block a user