mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Hid free plan if free is the only enabled plan
no refs. - hides free plan if that's the only enabled plan - refined copy for sign up button when no plans are available (e.g. Stripe is not set up or free is the only plan)
This commit is contained in:
parent
593e139860
commit
c90a947d94
4 changed files with 9 additions and 4 deletions
|
@ -13,7 +13,7 @@ const DEV_MODE_DATA = {
|
|||
showPopup: true,
|
||||
site: Fixtures.site,
|
||||
member: Fixtures.member.paid,
|
||||
page: 'accountHome'
|
||||
page: 'signup'
|
||||
};
|
||||
export default class App extends React.Component {
|
||||
constructor(props) {
|
||||
|
|
|
@ -220,7 +220,7 @@ function PlanLabel({showLabel}) {
|
|||
}
|
||||
|
||||
function PlansSection({plans, showLabel = true, selectedPlan, onPlanSelect, style}) {
|
||||
if (!plans || plans.length === 0) {
|
||||
if (!plans || plans.length === 0 || (plans.length === 1 && plans[0].type === 'free')) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
|
|
|
@ -91,7 +91,7 @@ export default class SigninPage extends React.Component {
|
|||
return (
|
||||
<footer className='gh-portal-signup-footer'>
|
||||
<div>Don't have an account?</div>
|
||||
<button className='gh-portal-btn gh-portal-btn-link' style={{color: brandColor}} onClick={() => this.context.onAction('switchPage', {page: 'signup'})}>Subscribe</button>
|
||||
<button className='gh-portal-btn gh-portal-btn-link' style={{color: brandColor}} onClick={() => this.context.onAction('switchPage', {page: 'signup'})}>Sign up</button>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export default class SigninPage extends React.Component {
|
|||
return (
|
||||
<header className='gh-portal-signin-header'>
|
||||
{this.renderSiteLogo()}
|
||||
<h2 className="gh-portal-main-title">Sign in to {siteTitle}</h2>
|
||||
<h2 className="gh-portal-main-title">Log in to {siteTitle}</h2>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -245,8 +245,13 @@ class SignupPage extends React.Component {
|
|||
|
||||
renderSubmitButton() {
|
||||
const {action, brandColor} = this.context;
|
||||
const plans = this.getPlans();
|
||||
|
||||
let label = 'Continue';
|
||||
if (!plans || plans.length === 0 || (plans.length === 1 && plans[0].type === 'free')) {
|
||||
label = 'Sign up';
|
||||
}
|
||||
|
||||
let isRunning = false;
|
||||
if (action === 'signup:running') {
|
||||
label = 'Sending...';
|
||||
|
|
Loading…
Add table
Reference in a new issue