Skip to content

Commit

Permalink
[frontend] Fix logos and login height (#6290)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Mar 10, 2024
1 parent 91f9a3a commit b732e16
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions opencti-platform/opencti-front/src/public/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const useStyles = makeStyles<Theme>((theme) => ({
textAlign: 'center',
margin: '0 auto',
width: '80%',
paddingBottom: 50,
},
login: {
textAlign: 'center',
Expand Down Expand Up @@ -184,23 +185,25 @@ const Login: FunctionComponent<LoginProps> = ({ type, settings }) => {
const isAuthButtons = authSSOs.length > 0;
const isLoginMessage = isNotEmptyField(loginMessage);
const isConsentMessage = isNotEmptyField(consentMessage);
let loginHeight = 280;
let loginHeight = 320;
if (type === '2FA_ACTIVATION') {
loginHeight = 280;
loginHeight = 320;
} else if (type === '2FA_VALIDATION') {
loginHeight = 230;
loginHeight = 270;
} else if (isAuthButtons && isAuthForm && isLoginMessage) {
loginHeight = 400;
loginHeight = 440;
} else if (isAuthButtons && isAuthForm) {
loginHeight = 350;
} else if (isAuthButtons && isLoginMessage) {
loginHeight = 250;
} else if (isAuthForm && (isLoginMessage || isConsentMessage)) {
loginHeight = 400;
loginHeight = 390;
} else if (isAuthForm && isLoginMessage && isConsentMessage) {
loginHeight = 500;
loginHeight = 540;
} else if (isAuthButtons && isLoginMessage && isConsentMessage) {
loginHeight = 490;
} else if (isAuthButtons && (isLoginMessage || isConsentMessage)) {
loginHeight = 290;
} else if (isAuthForm && (isLoginMessage || isConsentMessage)) {
loginHeight = 440;
} else if (isAuthButtons) {
loginHeight = 150;
loginHeight = 190;
}
const marginTop = dimension.height / 2 - loginHeight / 2 - 100;
const [checked, setChecked] = useState(false);
Expand Down
Binary file modified opencti-platform/opencti-front/src/static/ext/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b732e16

Please sign in to comment.