Skip to content

Commit 7feca52

Browse files
fix: display custom logo when using a proxy server (#7235)
Co-authored-by: Martin Jagodic <[email protected]>
1 parent 6715701 commit 7feca52

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

packages/decap-cms-backend-proxy/src/AuthenticationPage.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import styled from '@emotion/styled';
4-
import { Icon, buttons, shadows, GoBackButton } from 'decap-cms-ui-default';
4+
import { Icon, buttons, shadows, GoBackButton, renderPageLogo } from 'decap-cms-ui-default';
55

66
const StyledAuthenticationPage = styled.section`
77
display: flex;
@@ -11,11 +11,6 @@ const StyledAuthenticationPage = styled.section`
1111
height: 100vh;
1212
`;
1313

14-
const PageLogoIcon = styled(Icon)`
15-
color: #c4c6d2;
16-
margin-top: -300px;
17-
`;
18-
1914
const LoginButton = styled.button`
2015
${buttons.button};
2116
${shadows.dropDeep};
@@ -51,7 +46,7 @@ export default class AuthenticationPage extends React.Component {
5146

5247
return (
5348
<StyledAuthenticationPage>
54-
<PageLogoIcon size="300px" type="decap-cms" />
49+
{renderPageLogo(config.logo_url)}
5550
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
5651
{inProgress ? t('auth.loggingIn') : t('auth.login')}
5752
</LoginButton>

packages/decap-cms-ui-default/src/AuthenticationPage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ AuthenticationPage.propTypes = {
111111
t: PropTypes.func.isRequired,
112112
};
113113

114-
export default AuthenticationPage;
114+
export { AuthenticationPage as default, renderPageLogo };

packages/decap-cms-ui-default/src/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Loader from './Loader';
1010
import FieldLabel from './FieldLabel';
1111
import IconButton from './IconButton';
1212
import Toggle, { ToggleContainer, ToggleBackground, ToggleHandle } from './Toggle';
13-
import AuthenticationPage from './AuthenticationPage';
13+
import AuthenticationPage, { renderPageLogo } from './AuthenticationPage';
1414
import WidgetPreviewContainer from './WidgetPreviewContainer';
1515
import ObjectWidgetTopBar from './ObjectWidgetTopBar';
1616
import GoBackButton from './GoBackButton';
@@ -63,6 +63,7 @@ export const DecapCmsUiDefault = {
6363
zIndex,
6464
reactSelectStyles,
6565
GlobalStyles,
66+
renderPageLogo,
6667
};
6768
export {
6869
Dropdown,
@@ -97,4 +98,5 @@ export {
9798
reactSelectStyles,
9899
GlobalStyles,
99100
GoBackButton,
101+
renderPageLogo,
100102
};

0 commit comments

Comments
 (0)