1
- import { Button , ButtonGroup , Flex , IconButton } from '@invoke-ai/ui-library' ;
1
+ import {
2
+ Button ,
3
+ ButtonGroup ,
4
+ Flex ,
5
+ Icon ,
6
+ IconButton ,
7
+ Kbd ,
8
+ ListItem ,
9
+ Tooltip ,
10
+ UnorderedList ,
11
+ } from '@invoke-ai/ui-library' ;
2
12
import { useAppDispatch , useAppSelector } from 'app/store/storeHooks' ;
3
13
import {
4
14
comparedImagesSwapped ,
@@ -9,8 +19,8 @@ import {
9
19
} from 'features/gallery/store/gallerySlice' ;
10
20
import { memo , useCallback } from 'react' ;
11
21
import { useHotkeys } from 'react-hotkeys-hook' ;
12
- import { useTranslation } from 'react-i18next' ;
13
- import { PiArrowsOutBold , PiSwapBold , PiXBold } from 'react-icons/pi' ;
22
+ import { Trans , useTranslation } from 'react-i18next' ;
23
+ import { PiArrowsOutBold , PiQuestion , PiSwapBold , PiXBold } from 'react-icons/pi' ;
14
24
15
25
export const CompareToolbar = memo ( ( ) => {
16
26
const { t } = useTranslation ( ) ;
@@ -90,7 +100,12 @@ export const CompareToolbar = memo(() => {
90
100
</ ButtonGroup >
91
101
</ Flex >
92
102
< Flex flex = { 1 } justifyContent = "center" >
93
- < Flex gap = { 2 } marginInlineStart = "auto" >
103
+ < Flex gap = { 2 } marginInlineStart = "auto" alignItems = "center" >
104
+ < Tooltip label = { < CompareHelp /> } >
105
+ < Flex alignItems = "center" >
106
+ < Icon boxSize = { 8 } color = "base.500" as = { PiQuestion } lineHeight = { 0 } />
107
+ </ Flex >
108
+ </ Tooltip >
94
109
< IconButton
95
110
icon = { < PiXBold /> }
96
111
aria-label = { `${ t ( 'gallery.exitCompare' ) } (Esc)` }
@@ -104,3 +119,22 @@ export const CompareToolbar = memo(() => {
104
119
} ) ;
105
120
106
121
CompareToolbar . displayName = 'CompareToolbar' ;
122
+
123
+ const CompareHelp = ( ) => {
124
+ return (
125
+ < UnorderedList >
126
+ < ListItem >
127
+ < Trans i18nKey = "gallery.compareHelp1" components = { { Kbd : < Kbd /> } } > </ Trans >
128
+ </ ListItem >
129
+ < ListItem >
130
+ < Trans i18nKey = "gallery.compareHelp2" components = { { Kbd : < Kbd /> } } > </ Trans >
131
+ </ ListItem >
132
+ < ListItem >
133
+ < Trans i18nKey = "gallery.compareHelp3" components = { { Kbd : < Kbd /> } } > </ Trans >
134
+ </ ListItem >
135
+ < ListItem >
136
+ < Trans i18nKey = "gallery.compareHelp4" components = { { Kbd : < Kbd /> } } > </ Trans >
137
+ </ ListItem >
138
+ </ UnorderedList >
139
+ ) ;
140
+ } ;
0 commit comments