Skip to content

Commit

Permalink
fix(gui): emphasize the generate buttons, align fill color picker
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 21, 2023
1 parent 77d68bf commit 64663f5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gui/src/components/tab/Img2Img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function Img2Img() {
<UpscaleControl />
<Button
disabled={doesExist(source) === false}
variant='outlined'
variant='contained'
onClick={() => upload.mutate()}
>Generate</Button>
</Stack>
Expand Down
26 changes: 18 additions & 8 deletions gui/src/components/tab/Inpaint.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { doesExist, mustExist } from '@apextoaster/js-utils';
import { Box, Button, Stack } from '@mui/material';
import { Box, Button, FormControlLabel, Stack } from '@mui/material';
import * as React from 'react';
import { useMutation, useQuery, useQueryClient } from 'react-query';
import { useStore } from 'zustand';
Expand Down Expand Up @@ -151,19 +151,29 @@ export function Inpaint() {
}}
/>
<Stack direction='row' spacing={2}>
<input name='fill-color' type='color' defaultValue={fillColor} onBlur={(event) => {
setInpaint({
fillColor: event.target.value,
});
}} />
<label htmlFor='fill-color'>Fill Color</label>
<FormControlLabel
label='Fill Color'
sx={{ mx: 1 }}
control={
<input
defaultValue={fillColor}
name='fill-color'
type='color'
onBlur={(event) => {
setInpaint({
fillColor: event.target.value,
});
}}
/>
}
/>
</Stack>
</Stack>
<OutpaintControl />
<UpscaleControl />
<Button
disabled={doesExist(source) === false || doesExist(mask) === false}
variant='outlined'
variant='contained'
onClick={() => upload.mutate()}
>Generate</Button>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/tab/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function Settings() {
<TextField variant='outlined' label='API Server' value={root} onChange={(event) => {
setRoot(event.target.value);
}} />
<Button startIcon={<Refresh />} onClick={() => {
<Button variant='contained' startIcon={<Refresh />} onClick={() => {
const query = new URLSearchParams(window.location.search);
query.set('api', root);
window.location.search = query.toString();
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/tab/Txt2Img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function Txt2Img() {
</Stack>
<UpscaleControl />
<Button
variant='outlined'
variant='contained'
onClick={() => generate.mutate()}
>Generate</Button>
</Stack>
Expand Down
2 changes: 1 addition & 1 deletion gui/src/components/tab/Upscale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function Upscale() {
<UpscaleControl />
<Button
disabled={doesExist(params.source) === false}
variant='outlined'
variant='contained'
onClick={() => upload.mutate()}
>Generate</Button>
</Stack>
Expand Down

0 comments on commit 64663f5

Please sign in to comment.