change login screen images as per new layout (#15526)

* change login screen images as per new layout

* fix the image size and layout background color

* class naming change
This commit is contained in:
Ashish Gupta 2024-03-14 10:35:45 +05:30 committed by GitHub
parent 7718f1c560
commit 22cd2ca74e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 298 additions and 263 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 840 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 780 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

View File

@ -12,36 +12,40 @@
*/
import { CarouselProps } from 'antd';
import collaborationImg from '../assets/img/data-collaboration.png';
import discoveryImg from '../assets/img/data-discovery.png';
import governanceImg from '../assets/img/data-governance.png';
import insightImg from '../assets/img/data-insights.png';
import dataQualityImg from '../assets/img/data-qauality.png';
import loginClassBase from './LoginClassBase';
const {
dataDiscovery,
dataQuality,
governance,
dataInsightPlural,
dataCollaboration,
} = loginClassBase.carouselImages();
export const LOGIN_SLIDE = [
{
title: 'data-discovery',
image: discoveryImg,
image: dataDiscovery,
descriptionKey: 'enables-end-to-end-metadata-management',
},
{
title: 'data-quality',
image: dataQualityImg,
image: dataQuality,
descriptionKey: 'discover-your-data-and-unlock-the-value-of-data-assets',
},
{
title: 'governance',
image: governanceImg,
image: governance,
descriptionKey: 'assess-data-reliability-with-data-profiler-lineage',
},
{
title: 'data-insight-plural',
image: insightImg,
image: dataInsightPlural,
descriptionKey: 'fosters-collaboration-among-producers-and-consumers',
},
{
title: 'data-collaboration',
image: collaborationImg,
image: dataCollaboration,
descriptionKey: 'deeply-understand-table-relations-message',
},
];

View File

@ -0,0 +1,35 @@
/*
* Copyright 2024 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import collaborationImg from '../assets/img/login-screen/data-collaboration.png';
import discoveryImg from '../assets/img/login-screen/data-discovery.png';
import governanceImg from '../assets/img/login-screen/data-governance.png';
import insightImg from '../assets/img/login-screen/data-insights.png';
import dataQualityImg from '../assets/img/login-screen/data-quality.png';
class LoginClassBase {
public carouselImages() {
return {
dataDiscovery: discoveryImg,
dataQuality: dataQualityImg,
governance: governanceImg,
dataInsightPlural: insightImg,
dataCollaboration: collaborationImg,
};
}
}
const loginClassBase = new LoginClassBase();
export default loginClassBase;
export { LoginClassBase };

View File

@ -190,136 +190,134 @@ const SignInPage = () => {
const onClickForgotPassword = () => history.push(ROUTES.FORGOT_PASSWORD);
return (
<div className="d-flex flex-col h-full bg-white">
<Row className="flex flex-grow" data-testid="signin-page">
<Col span={8}>
<div
className={classNames('mt-24 text-center flex-center flex-col', {
'sso-container': !isAuthProviderBasic,
})}>
<BrandImage height="auto" width={200} />
<Typography.Text className="mt-8 w-80 text-xl font-medium text-grey-muted">
{t('message.om-description')}{' '}
</Typography.Text>
<Row className="h-full" data-testid="signin-page">
<Col className="bg-white" span={8}>
<div
className={classNames('mt-24 text-center flex-center flex-col', {
'sso-container': !isAuthProviderBasic,
})}>
<BrandImage height="auto" width={200} />
<Typography.Text className="mt-8 w-80 text-xl font-medium text-grey-muted">
{t('message.om-description')}{' '}
</Typography.Text>
{isAuthProviderBasic ? (
<div className="login-form ">
<Form
className="w-full"
form={form}
layout="vertical"
validateMessages={VALIDATION_MESSAGES}
onFinish={handleSubmit}>
<Form.Item
data-testid="email"
label={
{isAuthProviderBasic ? (
<div className="login-form ">
<Form
className="w-full"
form={form}
layout="vertical"
validateMessages={VALIDATION_MESSAGES}
onFinish={handleSubmit}>
<Form.Item
data-testid="email"
label={
isAuthProviderLDAP
? t('label.email')
: t('label.username-or-email')
}
name="email"
requiredMark={false}
rules={[{ required: true }]}>
<Input
autoFocus
placeholder={
isAuthProviderLDAP
? t('label.email')
: t('label.username-or-email')
}
name="email"
requiredMark={false}
rules={[{ required: true }]}>
<Input
autoFocus
placeholder={
isAuthProviderLDAP
? t('label.email')
: t('label.username-or-email')
}
/>
</Form.Item>
<Form.Item
data-testid="password"
label={t('label.password')}
name="password"
requiredMark={false}
rules={[{ required: true }]}>
<Input.Password
autoComplete="off"
placeholder={t('label.password')}
/>
</Form.Item>
/>
</Form.Item>
<Form.Item
data-testid="password"
label={t('label.password')}
name="password"
requiredMark={false}
rules={[{ required: true }]}>
<Input.Password
autoComplete="off"
placeholder={t('label.password')}
/>
</Form.Item>
<Button
className="w-full"
data-testid="login"
disabled={loading}
htmlType="submit"
loading={loading}
type="primary">
{t('label.login')}
</Button>
</Form>
{loginError && (
<div
className="d-flex flex-col m-y-md"
data-testid="login-error-container">
<div className="flex global-border rounded-4 p-sm error-alert ">
<div className="m-r-xs">
<Icon
component={IconFailBadge}
style={{ fontSize: '20px' }}
/>
</div>
<p data-testid="success-line">
<span>{loginError}</span>
</p>
<Button
className="w-full"
data-testid="login"
disabled={loading}
htmlType="submit"
loading={loading}
type="primary">
{t('label.login')}
</Button>
</Form>
{loginError && (
<div
className="d-flex flex-col m-y-md"
data-testid="login-error-container">
<div className="flex global-border rounded-4 p-sm error-alert ">
<div className="m-r-xs">
<Icon
component={IconFailBadge}
style={{ fontSize: '20px' }}
/>
</div>
<p data-testid="success-line">
<span>{loginError}</span>
</p>
</div>
)}
{!isAuthProviderLDAP && (
<>
<div className="mt-8" onClick={onClickForgotPassword}>
<Typography.Link underline data-testid="forgot-password">
{t('label.forgot-password')}
</Typography.Link>
</div>
{authConfig?.enableSelfSignup && (
<>
<Divider className="w-min-0 mt-8 mb-12 justify-center">
<Typography.Text className="text-sm" type="secondary">
{t('label.or-lowercase')}
</Typography.Text>
</Divider>
</div>
)}
{!isAuthProviderLDAP && (
<>
<div className="mt-8" onClick={onClickForgotPassword}>
<Typography.Link underline data-testid="forgot-password">
{t('label.forgot-password')}
</Typography.Link>
</div>
{authConfig?.enableSelfSignup && (
<>
<Divider className="w-min-0 mt-8 mb-12 justify-center">
<Typography.Text className="text-sm" type="secondary">
{t('label.or-lowercase')}
</Typography.Text>
</Divider>
<div className="mt-4 d-flex flex-center">
<Typography.Text className="mr-4">
{t('message.new-to-the-platform')}
</Typography.Text>
<Button
data-testid="signup"
type="link"
onClick={onClickSignUp}>
{t('label.create-entity', {
entity: t('label.account'),
})}
</Button>
</div>
</>
)}
</>
)}
</div>
) : (
<div className="">{getSignInButton()}</div>
)}
</div>
</Col>
<Col className="relative" span={16}>
<div className="absolute inset-0">
<img
alt="bg-image"
className="w-full h-full"
data-testid="bg-image"
src={loginBG}
/>
</div>
<div className="mt-4 d-flex flex-center">
<Typography.Text className="mr-4">
{t('message.new-to-the-platform')}
</Typography.Text>
<Button
data-testid="signup"
type="link"
onClick={onClickSignUp}>
{t('label.create-entity', {
entity: t('label.account'),
})}
</Button>
</div>
</>
)}
</>
)}
</div>
) : (
<div className="">{getSignInButton()}</div>
)}
</div>
</Col>
<Col className="relative" span={16}>
<div className="absolute inset-0">
<img
alt="bg-image"
className="w-full h-full"
data-testid="bg-image"
src={loginBG}
/>
</div>
<LoginCarousel />
</Col>
</Row>
</div>
<LoginCarousel />
</Col>
</Row>
);
};

View File

@ -49,6 +49,7 @@
transform: translate(-50%, -50%);
.slick-dots.slick-dots-bottom {
position: initial;
.slick-active {
button {
background-color: @primary-color;

View File

@ -11,7 +11,7 @@
* limitations under the License.
*/
import { Button, Divider, Form, Input, Typography } from 'antd';
import { Button, Col, Divider, Form, Input, Row, Typography } from 'antd';
import { isEmpty } from 'lodash';
import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
@ -66,149 +66,146 @@ const BasicSignUp = () => {
const handleLogin = () => history.push(ROUTES.SIGNIN);
return (
<div className="d-flex flex-col h-full bg-white">
<div className="d-flex flex-grow" data-testid="signin-page">
<div className="w-5/12">
<div className="mt-4 text-center flex-center flex-col">
<BrandImage height="auto" width={200} />
<Typography.Text className="mt-8 w-80 text-xl font-medium text-grey-muted">
{t('message.om-description')}
</Typography.Text>
<Row className="h-full" data-testid="signin-page">
<Col className="bg-white" span={10}>
<div className="mt-4 text-center flex-center flex-col">
<BrandImage height="auto" width={200} />
<Typography.Text className="mt-8 w-80 text-xl font-medium text-grey-muted">
{t('message.om-description')}
</Typography.Text>
{isAuthProviderBasic ? (
<div className="m-t-lg" style={{ width: '334px' }}>
<Form
autoComplete="off"
form={form}
layout="vertical"
validateMessages={VALIDATION_MESSAGES}
onFinish={handleSubmit}>
<Form.Item
label={t('label.entity-name', {
entity: t('label.first'),
{isAuthProviderBasic ? (
<div className="m-t-lg" style={{ width: '334px' }}>
<Form
autoComplete="off"
form={form}
layout="vertical"
validateMessages={VALIDATION_MESSAGES}
onFinish={handleSubmit}>
<Form.Item
label={t('label.entity-name', {
entity: t('label.first'),
})}
name="firstName"
rules={[{ whitespace: true, required: true }]}>
<Input
autoFocus
placeholder={t('label.enter-entity-name', {
entity: t('label.first-lowercase'),
})}
name="firstName"
rules={[{ whitespace: true, required: true }]}>
<Input
autoFocus
placeholder={t('label.enter-entity-name', {
entity: t('label.first-lowercase'),
})}
/>
</Form.Item>
<Form.Item
label={t('label.entity-name', {
entity: t('label.last'),
/>
</Form.Item>
<Form.Item
label={t('label.entity-name', {
entity: t('label.last'),
})}
name="lastName"
rules={[{ whitespace: true, required: true }]}>
<Input
placeholder={t('label.enter-entity', {
entity: t('label.last-name-lowercase'),
})}
name="lastName"
rules={[{ whitespace: true, required: true }]}>
<Input
placeholder={t('label.enter-entity', {
entity: t('label.last-name-lowercase'),
})}
/>
</Form.Item>
<Form.Item
label={t('label.email')}
name="email"
rules={[{ type: 'email', required: true }]}>
<Input
placeholder={t('label.enter-entity', {
entity: t('label.email-lowercase'),
})}
/>
</Form.Item>
<Form.Item
label={t('label.password')}
name="password"
rules={[
{
required: true,
},
{
pattern: passwordRegex,
message: t('message.password-error-message'),
},
]}>
<Input.Password
autoComplete="off"
placeholder={t('label.enter-entity', {
entity: t('label.password-lowercase'),
})}
/>
</Form.Item>
<Form.Item
label={t('label.password-type', {
type: t('label.confirm'),
/>
</Form.Item>
<Form.Item
label={t('label.email')}
name="email"
rules={[{ type: 'email', required: true }]}>
<Input
placeholder={t('label.enter-entity', {
entity: t('label.email-lowercase'),
})}
name="confirmPassword"
rules={[
{
validator: (_, value) => {
if (isEmpty(password)) {
return Promise.reject(
t('label.please-password-type-first')
);
}
if (value !== password) {
return Promise.reject(
t('label.password-not-match')
);
}
/>
</Form.Item>
<Form.Item
label={t('label.password')}
name="password"
rules={[
{
required: true,
},
{
pattern: passwordRegex,
message: t('message.password-error-message'),
},
]}>
<Input.Password
autoComplete="off"
placeholder={t('label.enter-entity', {
entity: t('label.password-lowercase'),
})}
/>
</Form.Item>
<Form.Item
label={t('label.password-type', {
type: t('label.confirm'),
})}
name="confirmPassword"
rules={[
{
validator: (_, value) => {
if (isEmpty(password)) {
return Promise.reject(
t('label.please-password-type-first')
);
}
if (value !== password) {
return Promise.reject(t('label.password-not-match'));
}
return Promise.resolve();
},
return Promise.resolve();
},
]}>
<Input.Password
autoComplete="off"
placeholder={t('label.confirm-password')}
/>
</Form.Item>
},
]}>
<Input.Password
autoComplete="off"
placeholder={t('label.confirm-password')}
/>
</Form.Item>
<Button className="w-full" htmlType="submit" type="primary">
{t('label.create-entity', {
entity: t('label.account'),
})}
<Button className="w-full" htmlType="submit" type="primary">
{t('label.create-entity', {
entity: t('label.account'),
})}
</Button>
<Divider className="w-min-0 mt-8 mb-12 justify-center">
<Typography.Text type="secondary">
{t('label.or-lowercase')}
</Typography.Text>
</Divider>
<div className="mt-4 d-flex flex-center">
<Typography.Text className="mr-4">
{t('message.already-a-user')}
</Typography.Text>
<Button
ghost
data-testid="login"
type="link"
onClick={handleLogin}>
{t('label.login')}
</Button>
<Divider className="w-min-0 mt-8 mb-12 justify-center">
<Typography.Text type="secondary">
{t('label.or-lowercase')}
</Typography.Text>
</Divider>
<div className="mt-4 d-flex flex-center">
<Typography.Text className="mr-4">
{t('message.already-a-user')}
</Typography.Text>
<Button
ghost
data-testid="login"
type="link"
onClick={handleLogin}>
{t('label.login')}
</Button>
</div>
</Form>
</div>
) : null}
</div>
</div>
</Form>
</div>
) : null}
</div>
<div className="w-7/12 relative">
<div className="absolute inset-0">
<img
alt="bg-image"
className="w-full h-full"
data-testid="bg-image"
src={loginBG}
/>
</div>
</Col>
<LoginCarousel />
<Col className="relative" span={14}>
<div className="absolute inset-0">
<img
alt="bg-image"
className="w-full h-full"
data-testid="bg-image"
src={loginBG}
/>
</div>
</div>
</div>
<LoginCarousel />
</Col>
</Row>
);
};