parent
ed3814af66
commit
05d89230dc
@ -16,8 +16,9 @@ const ForkApprovalContainer = styled.div`
|
||||
`;
|
||||
const ForkButtonsContainer = styled.div`
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
flex-flow: column nowrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
`;
|
||||
|
||||
export default class GitHubAuthenticationPage extends React.Component {
|
||||
@ -109,7 +110,7 @@ export default class GitHubAuthenticationPage extends React.Component {
|
||||
if (requestingFork) {
|
||||
const { approveFork, refuseFork } = this.state;
|
||||
return {
|
||||
renderPageContent: ({ LoginButton }) => (
|
||||
renderPageContent: ({ LoginButton, TextButton, showAbortButton }) => (
|
||||
<ForkApprovalContainer>
|
||||
<p>
|
||||
Open Authoring is enabled: we need to use a fork on your github account. (If a fork
|
||||
@ -117,7 +118,9 @@ export default class GitHubAuthenticationPage extends React.Component {
|
||||
</p>
|
||||
<ForkButtonsContainer>
|
||||
<LoginButton onClick={approveFork}>Fork the repo</LoginButton>
|
||||
<LoginButton onClick={refuseFork}>Don't fork the repo</LoginButton>
|
||||
{showAbortButton && (
|
||||
<TextButton onClick={refuseFork}>Don't fork the repo</TextButton>
|
||||
)}
|
||||
</ForkButtonsContainer>
|
||||
</ForkApprovalContainer>
|
||||
),
|
||||
|
@ -62,6 +62,17 @@ const LoginButton = styled.button`
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
const TextButton = styled.button`
|
||||
${buttons.button};
|
||||
${buttons.default};
|
||||
${buttons.grayText};
|
||||
|
||||
margin-top: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
function AuthenticationPage({
|
||||
onLogin,
|
||||
loginDisabled,
|
||||
@ -76,7 +87,9 @@ function AuthenticationPage({
|
||||
<StyledAuthenticationPage>
|
||||
{renderPageLogo(logoUrl)}
|
||||
{loginErrorMessage ? <p>{loginErrorMessage}</p> : null}
|
||||
{!renderPageContent ? null : renderPageContent({ LoginButton })}
|
||||
{!renderPageContent
|
||||
? null
|
||||
: renderPageContent({ LoginButton, TextButton, showAbortButton: !siteUrl })}
|
||||
{!renderButtonContent ? null : (
|
||||
<LoginButton disabled={loginDisabled} onClick={onLogin}>
|
||||
{renderButtonContent()}
|
||||
|
Loading…
x
Reference in New Issue
Block a user