diff --git a/cvat-core/src/api-implementation.js b/cvat-core/src/api-implementation.js index d9c0f7aeea25..b80c205db9cc 100644 --- a/cvat-core/src/api-implementation.js +++ b/cvat-core/src/api-implementation.js @@ -326,10 +326,10 @@ cvat.aifred.dtls.implementation = (workspaceId) => aifredProxy.dtls(workspaceId); - cvat.aifred.createWorkout - .implementation = (name, instance, workspaceId, dtlId, iterations) => { - aifredProxy.createWorkout(name, instance, workspaceId, dtlId, iterations); - }; + cvat.aifred.createWorkout.implementation = + (name, instance, workspaceId, dtlId, iterations) => ( + aifredProxy.createWorkout(name, instance, workspaceId, dtlId, iterations) + ); cvat.aifred.getSelf.implementation = () => aifredProxy.getSelf(); @@ -410,9 +410,8 @@ }; }; - cvat.aifred.getWorkoutImage.implementation = (workoutId, fileType, fileName) => { - aifredProxy.getWorkoutImage(workoutId, fileType, fileName); - }; + cvat.aifred.getWorkoutImage.implementation = + (workoutId, fileType, fileName) => aifredProxy.getWorkoutImage(workoutId, fileType, fileName); cvat.aifred.getWorkoutMetrics.implementation = (workoutId) => aifredProxy.getWorkoutMetrics(workoutId); diff --git a/cvat-ui/dist/favicon.ico b/cvat-ui/dist/favicon.ico index ddb856875691..b879a5a2e63a 100644 Binary files a/cvat-ui/dist/favicon.ico and b/cvat-ui/dist/favicon.ico differ diff --git a/cvat-ui/package.json b/cvat-ui/package.json index c6fede884c8d..19c021a3c1c7 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -5,7 +5,7 @@ "main": "src/index.tsx", "scripts": { "build": "webpack --config ./webpack.config.js", - "start": "webpack-dev-server --env.API_URL=http://cvat:8080 --config ./webpack.config.js --mode=development", + "start": "webpack-dev-server --env.API_URL=http://cvat.lab:8080 --config ./webpack.config.js --mode=development", "type-check": "tsc --noEmit", "type-check:watch": "npm run type-check -- --watch", "lint": "eslint './src/**/*.{ts,tsx}'", @@ -62,4 +62,4 @@ "redux-logger": "^3.0.6", "redux-thunk": "^2.3.0" } -} \ No newline at end of file +} diff --git a/cvat-ui/src/components/header/header.tsx b/cvat-ui/src/components/header/header.tsx index 4b3e1051841a..f413e73a5c84 100644 --- a/cvat-ui/src/components/header/header.tsx +++ b/cvat-ui/src/components/header/header.tsx @@ -5,7 +5,7 @@ import './styles.scss'; import React from 'react'; import { connect } from 'react-redux'; -import { useHistory } from 'react-router'; +import { useHistory, useLocation } from 'react-router'; import { Row, Col } from 'antd/lib/grid'; import Icon, { SettingOutlined, @@ -13,7 +13,6 @@ import Icon, { EditOutlined, LoadingOutlined, LogoutOutlined, - GithubOutlined, QuestionCircleOutlined, CaretDownOutlined, ControlOutlined, @@ -148,10 +147,11 @@ function HeaderContainer(props: Props): JSX.Element { } = props; const { - CHANGELOG_URL, LICENSE_URL, GITTER_URL, FORUM_URL, GITHUB_URL, + CHANGELOG_URL, LICENSE_URL, GITTER_URL, FORUM_URL, } = consts; const history = useHistory(); + const location = useLocation(); function showAboutModal(): void { Modal.info({ @@ -255,12 +255,18 @@ function HeaderContainer(props: Props): JSX.Element { ); + const getButtonClassName = (value: string): string => { + // eslint-disable-next-line security/detect-non-literal-regexp + const regex = new RegExp(`${value}$`); + return location.pathname.match(regex) ? 'cvat-header-button cvat-active-header-button' : 'cvat-header-button'; + }; + return (
- {isModelsPluginActive && (