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