diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json
index 496f22e7..0fa568b5 100644
--- a/cvat-ui/package-lock.json
+++ b/cvat-ui/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
- "version": "1.23.0",
+ "version": "1.23.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/cvat-ui/package.json b/cvat-ui/package.json
index 4bbffd0c..577a2730 100644
--- a/cvat-ui/package.json
+++ b/cvat-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "cvat-ui",
- "version": "1.23.0",
+ "version": "1.23.1",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
diff --git a/cvat-ui/src/components/login-page/cookie-policy-drawer.tsx b/cvat-ui/src/components/login-page/cookie-policy-drawer.tsx
deleted file mode 100644
index f1c6238b..00000000
--- a/cvat-ui/src/components/login-page/cookie-policy-drawer.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (C) 2020 Intel Corporation
-//
-// SPDX-License-Identifier: MIT
-
-import React, { useState, useEffect } from 'react';
-import Drawer from 'antd/lib/drawer';
-import Paragraph from 'antd/lib/typography/Paragraph';
-import Button from 'antd/lib/button/button';
-
-import { isPublic } from 'utils/enviroment';
-
-function CookieDrawer(): JSX.Element {
- const [drawerVisible, setDrawerVisible] = useState(false);
-
- useEffect(() => {
- const cookiePolicyAccepted = localStorage.getItem('cookiePolicyAccepted');
- if (cookiePolicyAccepted === null && isPublic()) {
- setDrawerVisible(true);
- }
- }, []);
-
- const onClose = (): void => {
- localStorage.setItem('cookiePolicyAccepted', 'true');
- setDrawerVisible(false);
- };
-
- return (
-
-
- This site uses cookies for functionality, analytics, and advertising purposes as described in our Cookie
- and Similar Technologies Notice. To see what cookies we serve and set your preferences, please visit our
- Cookie Consent Tool. By continuing to use our website, you
- agree to our use of cookies.
-
-
-
- );
-}
-
-export default CookieDrawer;
diff --git a/cvat-ui/src/components/login-page/intel-footer-drawer.tsx b/cvat-ui/src/components/login-page/intel-footer-drawer.tsx
new file mode 100644
index 00000000..2d14e457
--- /dev/null
+++ b/cvat-ui/src/components/login-page/intel-footer-drawer.tsx
@@ -0,0 +1,27 @@
+// Copyright (C) 2021 Intel Corporation
+//
+// SPDX-License-Identifier: MIT
+
+import React from 'react';
+import { Layout } from 'antd';
+
+import { isPublic } from 'utils/enviroment';
+import consts from 'consts';
+
+function FooterDrawer(): JSX.Element | null {
+ const { Footer } = Layout;
+ const { INTEL_TERMS_OF_USE_URL, INTEL_COOKIES_URL, INTEL_PRIVACY_URL } = consts;
+
+ return isPublic() ? (
+
+ ) : null;
+}
+
+export default React.memo(FooterDrawer);
diff --git a/cvat-ui/src/components/login-page/login-page.tsx b/cvat-ui/src/components/login-page/login-page.tsx
index 7fb3daa5..66505c7f 100644
--- a/cvat-ui/src/components/login-page/login-page.tsx
+++ b/cvat-ui/src/components/login-page/login-page.tsx
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Intel Corporation
+// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@@ -8,9 +8,11 @@ import { Link, withRouter } from 'react-router-dom';
import Title from 'antd/lib/typography/Title';
import Text from 'antd/lib/typography/Text';
import { Row, Col } from 'antd/lib/grid';
+import { Layout } from 'antd';
+
+import FooterDrawer from 'components/login-page/intel-footer-drawer';
import LoginForm, { LoginData } from './login-form';
-import CookieDrawer from './cookie-policy-drawer';
interface LoginPageComponentProps {
fetching: boolean;
@@ -27,40 +29,44 @@ function LoginPageComponent(props: LoginPageComponentProps & RouteComponentProps
xl: { span: 4 },
};
+ const { Content } = Layout;
+
const { fetching, onLogin, renderResetPassword } = props;
return (
- <>
-
-
- Login
- {
- onLogin(loginData.username, loginData.password);
- }}
- />
-
-
-
- New to CVAT? Create
- an account
-
-
-
- {renderResetPassword && (
+
+
+
+
+ Login
+ {
+ onLogin(loginData.username, loginData.password);
+ }}
+ />
- Forgot your password?
+ New to CVAT? Create
+ an account
- )}
-
-
-
- >
+ {renderResetPassword && (
+
+
+
+ Forgot your password?
+
+
+
+ )}
+
+
+
+
+
);
}
diff --git a/cvat-ui/src/components/register-page/register-page.tsx b/cvat-ui/src/components/register-page/register-page.tsx
index b3a299a5..8776bee6 100644
--- a/cvat-ui/src/components/register-page/register-page.tsx
+++ b/cvat-ui/src/components/register-page/register-page.tsx
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Intel Corporation
+// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@@ -9,9 +9,10 @@ import { Link, withRouter } from 'react-router-dom';
import Title from 'antd/lib/typography/Title';
import Text from 'antd/lib/typography/Text';
import { Row, Col } from 'antd/lib/grid';
+import { Layout } from 'antd';
import { UserAgreement } from 'reducers/interfaces';
-import CookieDrawer from 'components/login-page/cookie-policy-drawer';
+import FooterDrawer from 'components/login-page/intel-footer-drawer';
import RegisterForm, { RegisterData, UserConfirmation } from './register-form';
interface RegisterPageComponentProps {
@@ -38,39 +39,42 @@ function RegisterPageComponent(props: RegisterPageComponentProps & RouteComponen
};
const { fetching, userAgreements, onRegister } = props;
+ const { Content } = Layout;
return (
- <>
-
-
- Create an account
- {
- onRegister(
- registerData.username,
- registerData.firstName,
- registerData.lastName,
- registerData.email,
- registerData.password1,
- registerData.password2,
- registerData.confirmations,
- );
- }}
- />
-
-
-
- Already have an account?
- Login
-
-
-
-
-
-
- >
+
+
+
+
+ Create an account
+ {
+ onRegister(
+ registerData.username,
+ registerData.firstName,
+ registerData.lastName,
+ registerData.email,
+ registerData.password1,
+ registerData.password2,
+ registerData.confirmations,
+ );
+ }}
+ />
+
+
+
+ Already have an account?
+ Login
+
+
+
+
+
+
+
+
);
}
diff --git a/cvat-ui/src/components/reset-password-confirm-page/reset-password-confirm-page.tsx b/cvat-ui/src/components/reset-password-confirm-page/reset-password-confirm-page.tsx
index 24c4735b..723d78d0 100644
--- a/cvat-ui/src/components/reset-password-confirm-page/reset-password-confirm-page.tsx
+++ b/cvat-ui/src/components/reset-password-confirm-page/reset-password-confirm-page.tsx
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Intel Corporation
+// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@@ -6,10 +6,12 @@ import React from 'react';
import { connect } from 'react-redux';
import Title from 'antd/lib/typography/Title';
import { Row, Col } from 'antd/lib/grid';
+import { Layout } from 'antd';
import { CombinedState } from 'reducers/interfaces';
import { resetPasswordAsync } from 'actions/auth-actions';
+import FooterDrawer from 'components/login-page/intel-footer-drawer';
import ResetPasswordConfirmForm, { ResetPasswordConfirmData } from './reset-password-confirm-form';
interface StateToProps {
@@ -46,23 +48,30 @@ function ResetPasswordPagePageComponent(props: ResetPasswordConfirmPageComponent
const { fetching, onResetPasswordConfirm } = props;
+ const { Content } = Layout;
+
return (
-
-
- Change password
- {
- onResetPasswordConfirm(
- resetPasswordConfirmData.newPassword1,
- resetPasswordConfirmData.newPassword2,
- resetPasswordConfirmData.uid,
- resetPasswordConfirmData.token,
- );
- }}
- />
-
-
+
+
+
+
+ Change password
+ {
+ onResetPasswordConfirm(
+ resetPasswordConfirmData.newPassword1,
+ resetPasswordConfirmData.newPassword2,
+ resetPasswordConfirmData.uid,
+ resetPasswordConfirmData.token,
+ );
+ }}
+ />
+
+
+
+
+
);
}
diff --git a/cvat-ui/src/components/reset-password-page/reset-password-page.tsx b/cvat-ui/src/components/reset-password-page/reset-password-page.tsx
index f02b5a75..3b343865 100644
--- a/cvat-ui/src/components/reset-password-page/reset-password-page.tsx
+++ b/cvat-ui/src/components/reset-password-page/reset-password-page.tsx
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Intel Corporation
+// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT
@@ -8,9 +8,11 @@ import { connect } from 'react-redux';
import Title from 'antd/lib/typography/Title';
import Text from 'antd/lib/typography/Text';
import { Row, Col } from 'antd/lib/grid';
+import { Layout } from 'antd';
import { requestPasswordResetAsync } from 'actions/auth-actions';
import { CombinedState } from 'reducers/interfaces';
+import FooterDrawer from 'components/login-page/intel-footer-drawer';
import ResetPasswordForm, { ResetPasswordData } from './reset-password-form';
interface StateToProps {
@@ -46,27 +48,33 @@ function ResetPasswordPagePageComponent(props: ResetPasswordPageComponentProps):
};
const { fetching, onResetPassword } = props;
+ const { Content } = Layout;
return (
-
-
- Reset password
- {
- onResetPassword(resetPasswordData.email);
- }}
- />
-
-
-
- Go to
- login page
-
+
+
+
+
+ Reset password
+ {
+ onResetPassword(resetPasswordData.email);
+ }}
+ />
+
+
+
+ Go to
+ login page
+
+
+
-
-
+
+
+
);
}
diff --git a/cvat-ui/src/consts.ts b/cvat-ui/src/consts.ts
index e5df214c..a062480e 100644
--- a/cvat-ui/src/consts.ts
+++ b/cvat-ui/src/consts.ts
@@ -22,6 +22,9 @@ const LATEST_COMMENTS_SHOWN_QUICK_ISSUE = 3;
const QUICK_ISSUE_INCORRECT_POSITION_TEXT = 'Wrong position';
const QUICK_ISSUE_INCORRECT_ATTRIBUTE_TEXT = 'Wrong attribute';
const DEFAULT_PROJECT_SUBSETS = ['Train', 'Test', 'Validation'];
+const INTEL_TERMS_OF_USE_URL = 'https://www.intel.com/content/www/us/en/legal/terms-of-use.html';
+const INTEL_COOKIES_URL = 'https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html';
+const INTEL_PRIVACY_URL = 'https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html';
export default {
UNDEFINED_ATTRIBUTE_VALUE,
@@ -41,4 +44,7 @@ export default {
QUICK_ISSUE_INCORRECT_POSITION_TEXT,
QUICK_ISSUE_INCORRECT_ATTRIBUTE_TEXT,
DEFAULT_PROJECT_SUBSETS,
+ INTEL_TERMS_OF_USE_URL,
+ INTEL_COOKIES_URL,
+ INTEL_PRIVACY_URL,
};
diff --git a/cvat-ui/src/utils/enviroment.ts b/cvat-ui/src/utils/enviroment.ts
index 41c03315..c2edca5c 100644
--- a/cvat-ui/src/utils/enviroment.ts
+++ b/cvat-ui/src/utils/enviroment.ts
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Intel Corporation
+// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT