Skip to content

Commit 995ef5d

Browse files
feat(ui): style send-to toggle like it was previously
1 parent 380114a commit 995ef5d

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

invokeai/frontend/web/src/features/queue/components/SendToToggle.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ import { Trans, useTranslation } from 'react-i18next';
2727
import { PiImageBold, PiPaintBrushBold } from 'react-icons/pi';
2828

2929
const getSx = (padding: string | number): SystemStyleObject => ({
30-
bg: 'invokeBlue.500',
30+
bg: 'base.700',
3131
w: '72px',
32+
cursor: 'pointer',
3233
'&[data-checked]': {
33-
bg: 'invokePurple.300',
34-
'.checked-bg-slider': {
34+
'.thumb': {
3535
left: `calc(100% - ${padding})`,
3636
transform: 'translateX(-100%)',
37+
bg: 'invokeGreen.300',
3738
},
3839
'.unchecked-icon': {
39-
color: 'invokePurple.800',
40-
opacity: 0,
40+
color: 'base.50',
41+
opacity: 0.4,
4142
},
4243
'.checked-icon': {
4344
color: 'base.900',
@@ -46,7 +47,7 @@ const getSx = (padding: string | number): SystemStyleObject => ({
4647
},
4748
'&[data-disabled]': {
4849
bg: 'base.700',
49-
'.checked-bg-slider': {
50+
'.thumb': {
5051
bg: 'base.500',
5152
},
5253
'.unchecked-icon': {
@@ -56,22 +57,20 @@ const getSx = (padding: string | number): SystemStyleObject => ({
5657
color: 'base.800',
5758
},
5859
},
59-
'.checked-bg-slider': {
60+
'.thumb': {
6061
transition: 'left 0.1s ease-in-out, transform 0.1s ease-in-out',
6162
left: padding,
6263
transform: 'translateX(0)',
63-
bg: 'base.50',
64+
bg: 'invokeBlue.400',
6465
shadow: 'md',
6566
},
6667
'.unchecked-icon': {
67-
transition: 'all 0.15s ease-in-out',
6868
color: 'base.900',
6969
opacity: 1,
7070
},
7171
'.checked-icon': {
72-
transition: 'all 0.15s ease-in-out',
73-
color: 'invokeBlue.800',
74-
opacity: 0,
72+
color: 'base.50',
73+
opacity: 0.4,
7574
},
7675
});
7776

@@ -103,7 +102,7 @@ export const SendToToggle = memo(() => {
103102
<chakra.label {...htmlProps}>
104103
<Flex
105104
position="relative"
106-
borderRadius="full"
105+
borderRadius="base"
107106
alignItems="center"
108107
justifyContent="space-between"
109108
h="full"
@@ -113,7 +112,7 @@ export const SendToToggle = memo(() => {
113112
{...getCheckboxProps()}
114113
>
115114
<input {...getInputProps()} hidden />
116-
<Box className="checked-bg-slider" position="absolute" borderRadius="full" w={10} top={gap} bottom={gap} />
115+
<Box className="thumb" position="absolute" borderRadius="base" w={10} top={gap} bottom={gap} />
117116
<Flex w={10} h="full" alignItems="center" justifyContent="center" pos="relative">
118117
<Icon
119118
className="unchecked-icon"
@@ -137,7 +136,12 @@ export const SendToToggle = memo(() => {
137136
</PopoverTrigger>
138137
<Portal>
139138
<PopoverContent maxW={296} p={2} bg="base.200" color="base.800">
140-
<PopoverArrow bg="base.200" />
139+
<PopoverArrow
140+
bg="base.200"
141+
left={sendToCanvas ? '18px !important' : '-18px !important'}
142+
transitionProperty="all"
143+
transitionDuration="0.2s"
144+
/>
141145
<PopoverBody>
142146
<TooltipContent sendToCanvas={sendToCanvas} isStaging={isStaging} />
143147
</PopoverBody>

invokeai/frontend/web/src/features/system/components/ProgressBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const ProgressBar = () => {
2121

2222
const colorScheme = useMemo(() => {
2323
if (destination === 'canvas') {
24-
return 'invokePurple';
24+
return 'invokeGreen';
2525
} else if (destination === 'gallery') {
2626
return 'invokeBlue';
2727
} else {

0 commit comments

Comments
 (0)