Skip to content

Commit

Permalink
Merge branch 'main' into decaporg#7208
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic authored Jun 26, 2024
2 parents 23339de + 7feca52 commit 7565a10
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 16 deletions.
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/decap-cms-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Install via script tag:
<!-- Excluding `doctype` and `head` but you should add them -->
<body>
<!-- Add these scripts to the bottom of the body -->
<script src="https://unpkg.com/react@^16/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@^16/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/react@^18/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@^18/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/decap-cms-app/dist/decap-cms-app.js"></script>

<!-- Initialize the CMS -->
Expand Down
9 changes: 2 additions & 7 deletions packages/decap-cms-backend-proxy/src/AuthenticationPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled';
import { Icon, buttons, shadows, GoBackButton } from 'decap-cms-ui-default';
import { Icon, buttons, shadows, GoBackButton, renderPageLogo } from 'decap-cms-ui-default';

const StyledAuthenticationPage = styled.section`
display: flex;
Expand All @@ -11,11 +11,6 @@ const StyledAuthenticationPage = styled.section`
height: 100vh;
`;

const PageLogoIcon = styled(Icon)`
color: #c4c6d2;
margin-top: -300px;
`;

const LoginButton = styled.button`
${buttons.button};
${shadows.dropDeep};
Expand Down Expand Up @@ -51,7 +46,7 @@ export default class AuthenticationPage extends React.Component {

return (
<StyledAuthenticationPage>
<PageLogoIcon size="300px" type="decap-cms" />
{renderPageLogo(config.logo_url)}
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
{inProgress ? t('auth.loggingIn') : t('auth.login')}
</LoginButton>
Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-ui-default/src/AuthenticationPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ AuthenticationPage.propTypes = {
t: PropTypes.func.isRequired,
};

export default AuthenticationPage;
export { AuthenticationPage as default, renderPageLogo };
4 changes: 3 additions & 1 deletion packages/decap-cms-ui-default/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Loader from './Loader';
import FieldLabel from './FieldLabel';
import IconButton from './IconButton';
import Toggle, { ToggleContainer, ToggleBackground, ToggleHandle } from './Toggle';
import AuthenticationPage from './AuthenticationPage';
import AuthenticationPage, { renderPageLogo } from './AuthenticationPage';
import WidgetPreviewContainer from './WidgetPreviewContainer';
import ObjectWidgetTopBar from './ObjectWidgetTopBar';
import GoBackButton from './GoBackButton';
Expand Down Expand Up @@ -63,6 +63,7 @@ export const DecapCmsUiDefault = {
zIndex,
reactSelectStyles,
GlobalStyles,
renderPageLogo,
};
export {
Dropdown,
Expand Down Expand Up @@ -97,4 +98,5 @@ export {
reactSelectStyles,
GlobalStyles,
GoBackButton,
renderPageLogo,
};

0 comments on commit 7565a10

Please sign in to comment.