From 251d38db5bafc6aabfd7c3aeed1deb3c68115f59 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Fri, 27 Mar 2020 00:20:46 +0300 Subject: [PATCH] Titles for object list header --- .../objects-side-bar/objects-list-header.tsx | 29 +++++++++++++------ .../objects-side-bar/objects-list.tsx | 7 ++++- .../objects-side-bar/objects-list.tsx | 4 ++- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx index 56b29a26..df150d9f 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/objects-list-header.tsx @@ -10,6 +10,7 @@ import Text from 'antd/lib/typography/Text'; import AnnotationsFiltersInput from 'components/annotation-page/annotations-filters-input'; import { StatesOrdering } from 'reducers/interfaces'; +import { Tooltip } from 'antd'; interface StatesOrderingSelectorComponentProps { statesOrdering: StatesOrdering; @@ -56,6 +57,8 @@ interface Props { statesLocked: boolean; statesCollapsed: boolean; statesOrdering: StatesOrdering; + switchLockAllShortcut: string; + switchHiddenAllShortcut: string; changeStatesOrdering(value: StatesOrdering): void; lockAllStates(): void; unlockAllStates(): void; @@ -71,6 +74,8 @@ function ObjectListHeader(props: Props): JSX.Element { statesLocked, statesCollapsed, statesOrdering, + switchLockAllShortcut, + switchHiddenAllShortcut, changeStatesOrdering, lockAllStates, unlockAllStates, @@ -89,19 +94,25 @@ function ObjectListHeader(props: Props): JSX.Element { - { statesLocked - ? - : } + + { statesLocked + ? + : } + - { statesHidden - ? - : } + - { statesCollapsed - ? - : } + + { statesCollapsed + ? + : } + { {...this.props} statesOrdering={statesOrdering} sortedStatesID={sortedStatesID} + switchHiddenAllShortcut={formatShortcuts(keyMap.SWITCH_ALL_HIDDEN)} + switchLockAllShortcut={formatShortcuts(keyMap.SWITCH_ALL_LOCK)} changeStatesOrdering={this.onChangeStatesOrdering} lockAllStates={this.onLockAllStates} unlockAllStates={this.onUnlockAllStates}