mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Updated notification copy
no refs.
This commit is contained in:
parent
8580f2fec1
commit
8ea26be5bb
3 changed files with 13 additions and 27 deletions
|
@ -23,60 +23,46 @@ const Styles = () => {
|
|||
};
|
||||
};
|
||||
|
||||
const NotificationText = ({type, status}) => {
|
||||
const NotificationText = ({type, status, context}) => {
|
||||
if (type === 'signin' && status === 'success') {
|
||||
return (
|
||||
<p>
|
||||
Hey, you are successfully signed in!
|
||||
Welcome back! You've successfully signed in.
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'signin' && status === 'error') {
|
||||
return (
|
||||
<p>
|
||||
Hey, looks like you used an invalid link to signin!
|
||||
Could not sign in! Login link expired. <a href="/#/portal/signin" target="_parent">Click here to retry</a>
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'signup' && status === 'success') {
|
||||
return (
|
||||
<p>
|
||||
Hey, you are successfully signed up!
|
||||
You've successfully subscribed to {context.site.title}
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'signup' && status === 'error') {
|
||||
return (
|
||||
<p>
|
||||
Hey, looks like you used an invalid link to signup!
|
||||
Could not sign up! Invalid sign up link. <a href="/#/portal/signup" target="_parent">Click here to retry</a>
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'stripe:checkout' && status === 'success') {
|
||||
return (
|
||||
<p>
|
||||
You have successfully subscribed to the plan!
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'stripe:checkout' && status === 'warning') {
|
||||
return (
|
||||
<p>
|
||||
Strpie checkout flow was cancelled.
|
||||
Success! Your account is fully activated, you now have access to all content.
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'stripe:billing-update' && status === 'success') {
|
||||
return (
|
||||
<p>
|
||||
Successfully updated your billing details on Stripe
|
||||
</p>
|
||||
);
|
||||
} else if (type === 'stripe:billing-update' && status === 'warning') {
|
||||
return (
|
||||
<p>
|
||||
Cancelled your billing update flow on Stripe
|
||||
You've successfully updated your billing information
|
||||
</p>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<p>
|
||||
Hey, this is a neutral notification. I hope you feel well today, here's a <a href='http://ghost.org' target='_blank' rel='noopener noreferrer'>link</a> for you.
|
||||
</p>
|
||||
<></>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -119,7 +105,7 @@ class NotificationContent extends React.Component {
|
|||
return (
|
||||
<div className='gh-portal-notification-wrapper'>
|
||||
<div className={`gh-portal-notification${statusClass}${slideClass}`} onAnimationEnd={e => this.onAnimationEnd(e)}>
|
||||
<NotificationText type={type} status={status} />
|
||||
<NotificationText type={type} status={status} context={this.context} />
|
||||
<CloseIcon className='gh-portal-notification-closeicon' alt='Close' onClick={e => this.onNotificationClose(e)} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@ const NotificationStyles = `
|
|||
background: var(--grey1);
|
||||
color: var(--white);
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 3.2px 3.6px rgba(0, 0, 0, 0.024), 0 8.8px 10px -5px rgba(0, 0, 0, 0.12);
|
||||
box-shadow: 0 3.2px 3.6px rgba(0, 0, 0, 0.024), 0 8.8px 10px -5px rgba(0, 0, 0, 0.08);
|
||||
animation: notification-slidein 0.6s ease-in-out;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ export const handleAuthActions = ({action, status}) => {
|
|||
return {
|
||||
type: action,
|
||||
status: successStatus ? 'success' : 'error',
|
||||
duration: 2000,
|
||||
duration: 3000,
|
||||
autoHide: successStatus ? true : false
|
||||
};
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ export const handleStripeActions = ({status}) => {
|
|||
return {
|
||||
type: 'stripe:checkout',
|
||||
status: statusVal,
|
||||
duration: 2000,
|
||||
duration: 3000,
|
||||
autoHide: true
|
||||
};
|
||||
} else if (['billing-update-success', 'billing-update-cancel'].includes(status)) {
|
||||
|
@ -25,7 +25,7 @@ export const handleStripeActions = ({status}) => {
|
|||
return {
|
||||
type: 'stripe:billing-update',
|
||||
status: statusVal,
|
||||
duration: 2000,
|
||||
duration: 3000,
|
||||
autoHide: true
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue