[Glitch] Fix interaction modal layout
Port cd6f2b3cbc
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2368/head
parent
0f8ddf367c
commit
7c4b115e7d
|
@ -331,36 +331,24 @@ class InteractionModal extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
let signupButton;
|
let signupButton;
|
||||||
let signUpOrSignInButton;
|
|
||||||
|
|
||||||
if (sso_redirect) {
|
if (sso_redirect) {
|
||||||
signUpOrSignInButton = (
|
signupButton = (
|
||||||
<a href={sso_redirect} data-method='post' className='button button--block button-tertiary'>
|
<a href={sso_redirect} data-method='post' className='link-button'>
|
||||||
<FormattedMessage id='sign_in_banner.sso_redirect' defaultMessage='Login or Register' />
|
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
|
||||||
</a>
|
</a>
|
||||||
)
|
);
|
||||||
|
} else if (registrationsOpen) {
|
||||||
|
signupButton = (
|
||||||
|
<a href='/auth/sign_up' className='link-button'>
|
||||||
|
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
|
||||||
|
</a>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
if(registrationsOpen) {
|
signupButton = (
|
||||||
signupButton = (
|
<button className='link-button' onClick={this.handleSignupClick}>
|
||||||
<a href='/auth/sign_up' className='link-button'>
|
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
|
||||||
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
|
</button>
|
||||||
</a>
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
signupButton = (
|
|
||||||
<button className='button button--block button-tertiary' onClick={this.handleSignupClick}>
|
|
||||||
<FormattedMessage id='sign_in_banner.create_account' defaultMessage='Create account' />
|
|
||||||
</button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
signUpOrSignInButton = (
|
|
||||||
<>
|
|
||||||
<a href='/auth/sign_in' className='button button--block'>
|
|
||||||
<FormattedMessage id='sign_in_banner.sign_in' defaultMessage='Login' />
|
|
||||||
</a>
|
|
||||||
{signupButton}
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,13 +359,6 @@ class InteractionModal extends React.PureComponent {
|
||||||
<p>{actionDescription} <strong><FormattedMessage id='interaction_modal.sign_in' defaultMessage='You are not logged in to this server. Where is your account hosted?' /></strong></p>
|
<p>{actionDescription} <strong><FormattedMessage id='interaction_modal.sign_in' defaultMessage='You are not logged in to this server. Where is your account hosted?' /></strong></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='interaction-modal__choices'>
|
|
||||||
<div className='interaction-modal__choices__choice'>
|
|
||||||
<h3><FormattedMessage id='interaction_modal.on_this_server' defaultMessage='On this server' /></h3>
|
|
||||||
{signUpOrSignInButton}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<IntlLoginForm resourceUrl={url} />
|
<IntlLoginForm resourceUrl={url} />
|
||||||
|
|
||||||
<p className='hint'><FormattedMessage id='interaction_modal.sign_in_hint' defaultMessage="Tip: That's the website where you signed up. If you don't remember, look for the welcome e-mail in your inbox. You can also enter your full username! (e.g. @Mastodon@mastodon.social)" /></p>
|
<p className='hint'><FormattedMessage id='interaction_modal.sign_in_hint' defaultMessage="Tip: That's the website where you signed up. If you don't remember, look for the welcome e-mail in your inbox. You can also enter your full username! (e.g. @Mastodon@mastodon.social)" /></p>
|
||||||
|
|
|
@ -16,9 +16,9 @@ const SignInBanner = () => {
|
||||||
|
|
||||||
let signupButton;
|
let signupButton;
|
||||||
|
|
||||||
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up');
|
const signupUrl = useAppSelector((state) => state.getIn(['server', 'server', 'registrations', 'url'], null) || '/auth/sign_up');
|
||||||
|
|
||||||
if (sso_redirect) {
|
if (sso_redirect) {
|
||||||
return (
|
return (
|
||||||
<div className='sign-in-banner'>
|
<div className='sign-in-banner'>
|
||||||
<p><FormattedMessage id='sign_in_banner.text' defaultMessage='Login to follow profiles or hashtags, favorite, share and reply to posts. You can also interact from your account on a different server.' /></p>
|
<p><FormattedMessage id='sign_in_banner.text' defaultMessage='Login to follow profiles or hashtags, favorite, share and reply to posts. You can also interact from your account on a different server.' /></p>
|
||||||
|
|
Loading…
Reference in New Issue