mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
[WebUI] Even off JSX string props
Increased consistency and readability by replacing any unnecessary JSX expressions in places where string literals are sufficient
This commit is contained in:
parent
99f4417cd7
commit
e46102124e
@ -3,8 +3,8 @@ import { Flex, Spinner } from '@chakra-ui/react';
|
|||||||
const Loading = () => {
|
const Loading = () => {
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
width={'100vw'}
|
width="100vw"
|
||||||
height={'100vh'}
|
height="100vh"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
>
|
>
|
||||||
|
@ -13,7 +13,7 @@ const GuideIcon = forwardRef(
|
|||||||
({ feature, icon = MdHelp }: GuideIconProps, ref) => (
|
({ feature, icon = MdHelp }: GuideIconProps, ref) => (
|
||||||
<GuidePopover feature={feature}>
|
<GuidePopover feature={feature}>
|
||||||
<Box ref={ref}>
|
<Box ref={ref}>
|
||||||
<Icon marginBottom={'-.15rem'} as={icon} />
|
<Icon marginBottom="-.15rem" as={icon} />
|
||||||
</Box>
|
</Box>
|
||||||
</GuidePopover>
|
</GuidePopover>
|
||||||
)
|
)
|
||||||
|
@ -29,15 +29,15 @@ const GuidePopover = ({ children, feature }: GuideProps) => {
|
|||||||
if (!shouldDisplayGuides) return null;
|
if (!shouldDisplayGuides) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover trigger={'hover'}>
|
<Popover trigger="hover">
|
||||||
<PopoverTrigger>
|
<PopoverTrigger>
|
||||||
<Box>{children}</Box>
|
<Box>{children}</Box>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent
|
<PopoverContent
|
||||||
className={`guide-popover-content`}
|
className="guide-popover-content"
|
||||||
maxWidth="400px"
|
maxWidth="400px"
|
||||||
onClick={(e) => e.preventDefault()}
|
onClick={(e) => e.preventDefault()}
|
||||||
cursor={'initial'}
|
cursor="initial"
|
||||||
>
|
>
|
||||||
<PopoverArrow className="guide-popover-arrow" />
|
<PopoverArrow className="guide-popover-arrow" />
|
||||||
<div className="guide-popover-guide-content">{text}</div>
|
<div className="guide-popover-guide-content">{text}</div>
|
||||||
|
@ -169,7 +169,7 @@ export default function IAISlider(props: IAIFullSliderProps) {
|
|||||||
{label}
|
{label}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
||||||
<HStack w={'100%'} gap={2} alignItems="center">
|
<HStack w="100%" gap={2} alignItems="center">
|
||||||
<Slider
|
<Slider
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
value={value}
|
value={value}
|
||||||
@ -259,9 +259,9 @@ export default function IAISlider(props: IAIFullSliderProps) {
|
|||||||
|
|
||||||
{withReset && (
|
{withReset && (
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
aria-label={'Reset'}
|
aria-label="Reset"
|
||||||
tooltip={'Reset'}
|
tooltip="Reset"
|
||||||
icon={<BiReset />}
|
icon={<BiReset />}
|
||||||
onClick={handleResetDisable}
|
onClick={handleResetDisable}
|
||||||
isDisabled={isResetDisabled}
|
isDisabled={isResetDisabled}
|
||||||
|
@ -24,13 +24,13 @@ const ImageUploadOverlay = (props: ImageUploadOverlayProps) => {
|
|||||||
<div className="dropzone-container">
|
<div className="dropzone-container">
|
||||||
{isDragAccept && (
|
{isDragAccept && (
|
||||||
<div className="dropzone-overlay is-drag-accept">
|
<div className="dropzone-overlay is-drag-accept">
|
||||||
<Heading size={'lg'}>Upload Image{overlaySecondaryText}</Heading>
|
<Heading size="lg">Upload Image{overlaySecondaryText}</Heading>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{isDragReject && (
|
{isDragReject && (
|
||||||
<div className="dropzone-overlay is-drag-reject">
|
<div className="dropzone-overlay is-drag-reject">
|
||||||
<Heading size={'lg'}>Invalid Upload</Heading>
|
<Heading size="lg">Invalid Upload</Heading>
|
||||||
<Heading size={'md'}>Must be single JPEG or PNG image</Heading>
|
<Heading size="md">Must be single JPEG or PNG image</Heading>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@ const ImageUploaderButton = (props: ImageUploaderButtonProps) => {
|
|||||||
>
|
>
|
||||||
<div className="image-upload-button">
|
<div className="image-upload-button">
|
||||||
<FaUpload />
|
<FaUpload />
|
||||||
<Heading size={'lg'}>Click or Drag and Drop</Heading>
|
<Heading size="lg">Click or Drag and Drop</Heading>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -17,7 +17,7 @@ const ClearCanvasHistoryButtonModal = () => {
|
|||||||
acceptCallback={() => dispatch(clearCanvasHistory())}
|
acceptCallback={() => dispatch(clearCanvasHistory())}
|
||||||
acceptButtonText={t('unifiedcanvas:clearHistory')}
|
acceptButtonText={t('unifiedcanvas:clearHistory')}
|
||||||
triggerComponent={
|
triggerComponent={
|
||||||
<IAIButton size={'sm'} leftIcon={<FaTrash />} isDisabled={isStaging}>
|
<IAIButton size="sm" leftIcon={<FaTrash />} isDisabled={isStaging}>
|
||||||
{t('unifiedcanvas:clearCanvasHistory')}
|
{t('unifiedcanvas:clearCanvasHistory')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ const IAICanvas = () => {
|
|||||||
<Stage
|
<Stage
|
||||||
tabIndex={-1}
|
tabIndex={-1}
|
||||||
ref={canvasStageRefCallback}
|
ref={canvasStageRefCallback}
|
||||||
className={'inpainting-canvas-stage'}
|
className="inpainting-canvas-stage"
|
||||||
style={{
|
style={{
|
||||||
...(stageCursor ? { cursor: stageCursor } : {}),
|
...(stageCursor ? { cursor: stageCursor } : {}),
|
||||||
}}
|
}}
|
||||||
@ -165,19 +165,19 @@ const IAICanvas = () => {
|
|||||||
onWheel={handleWheel}
|
onWheel={handleWheel}
|
||||||
draggable={(tool === 'move' || isStaging) && !isModifyingBoundingBox}
|
draggable={(tool === 'move' || isStaging) && !isModifyingBoundingBox}
|
||||||
>
|
>
|
||||||
<Layer id={'grid'} visible={shouldShowGrid}>
|
<Layer id="grid" visible={shouldShowGrid}>
|
||||||
<IAICanvasGrid />
|
<IAICanvasGrid />
|
||||||
</Layer>
|
</Layer>
|
||||||
|
|
||||||
<Layer
|
<Layer
|
||||||
id={'base'}
|
id="base"
|
||||||
ref={canvasBaseLayerRefCallback}
|
ref={canvasBaseLayerRefCallback}
|
||||||
listening={false}
|
listening={false}
|
||||||
imageSmoothingEnabled={false}
|
imageSmoothingEnabled={false}
|
||||||
>
|
>
|
||||||
<IAICanvasObjectRenderer />
|
<IAICanvasObjectRenderer />
|
||||||
</Layer>
|
</Layer>
|
||||||
<Layer id={'mask'} visible={isMaskEnabled} listening={false}>
|
<Layer id="mask" visible={isMaskEnabled} listening={false}>
|
||||||
<IAICanvasMaskLines visible={true} listening={false} />
|
<IAICanvasMaskLines visible={true} listening={false} />
|
||||||
<IAICanvasMaskCompositer listening={false} />
|
<IAICanvasMaskCompositer listening={false} />
|
||||||
</Layer>
|
</Layer>
|
||||||
|
@ -49,7 +49,7 @@ const IAICanvasBoundingBoxOverlay = () => {
|
|||||||
offsetY={stageCoordinates.y / stageScale}
|
offsetY={stageCoordinates.y / stageScale}
|
||||||
height={stageDimensions.height / stageScale}
|
height={stageDimensions.height / stageScale}
|
||||||
width={stageDimensions.width / stageScale}
|
width={stageDimensions.width / stageScale}
|
||||||
fill={'rgba(0,0,0,0.4)'}
|
fill="rgba(0,0,0,0.4)"
|
||||||
listening={false}
|
listening={false}
|
||||||
visible={shouldDarkenOutsideBoundingBox}
|
visible={shouldDarkenOutsideBoundingBox}
|
||||||
/>
|
/>
|
||||||
@ -58,10 +58,10 @@ const IAICanvasBoundingBoxOverlay = () => {
|
|||||||
y={boundingBoxCoordinates.y}
|
y={boundingBoxCoordinates.y}
|
||||||
width={boundingBoxDimensions.width}
|
width={boundingBoxDimensions.width}
|
||||||
height={boundingBoxDimensions.height}
|
height={boundingBoxDimensions.height}
|
||||||
fill={'rgb(255,255,255)'}
|
fill="rgb(255,255,255)"
|
||||||
listening={false}
|
listening={false}
|
||||||
visible={shouldDarkenOutsideBoundingBox}
|
visible={shouldDarkenOutsideBoundingBox}
|
||||||
globalCompositeOperation={'destination-out'}
|
globalCompositeOperation="destination-out"
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
|
@ -163,10 +163,10 @@ const IAICanvasMaskCompositer = (props: IAICanvasMaskCompositerProps) => {
|
|||||||
width={stageDimensions.width / stageScale}
|
width={stageDimensions.width / stageScale}
|
||||||
fillPatternImage={fillPatternImage}
|
fillPatternImage={fillPatternImage}
|
||||||
fillPatternOffsetY={!isNumber(offset) ? 0 : offset}
|
fillPatternOffsetY={!isNumber(offset) ? 0 : offset}
|
||||||
fillPatternRepeat={'repeat'}
|
fillPatternRepeat="repeat"
|
||||||
fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }}
|
fillPatternScale={{ x: 1 / stageScale, y: 1 / stageScale }}
|
||||||
listening={true}
|
listening={true}
|
||||||
globalCompositeOperation={'source-in'}
|
globalCompositeOperation="source-in"
|
||||||
{...rest}
|
{...rest}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -36,7 +36,7 @@ const IAICanvasLines = (props: InpaintingCanvasLinesProps) => {
|
|||||||
<Line
|
<Line
|
||||||
key={i}
|
key={i}
|
||||||
points={line.points}
|
points={line.points}
|
||||||
stroke={'rgb(0,0,0)'} // The lines can be any color, just need alpha > 0
|
stroke="rgb(0,0,0)" // The lines can be any color, just need alpha > 0
|
||||||
strokeWidth={line.strokeWidth * 2}
|
strokeWidth={line.strokeWidth * 2}
|
||||||
tension={0}
|
tension={0}
|
||||||
lineCap="round"
|
lineCap="round"
|
||||||
|
@ -93,8 +93,8 @@ const IAICanvasObjectRenderer = () => {
|
|||||||
y={obj.y}
|
y={obj.y}
|
||||||
width={obj.width}
|
width={obj.width}
|
||||||
height={obj.height}
|
height={obj.height}
|
||||||
fill={'rgb(255, 255, 255)'}
|
fill="rgb(255, 255, 255)"
|
||||||
globalCompositeOperation={'destination-out'}
|
globalCompositeOperation="destination-out"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ const IAICanvasStagingArea = (props: Props) => {
|
|||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
stroke={'white'}
|
stroke="white"
|
||||||
strokeScaleEnabled={false}
|
strokeScaleEnabled={false}
|
||||||
/>
|
/>
|
||||||
<Rect
|
<Rect
|
||||||
@ -77,7 +77,7 @@ const IAICanvasStagingArea = (props: Props) => {
|
|||||||
height={height}
|
height={height}
|
||||||
dash={[4, 4]}
|
dash={[4, 4]}
|
||||||
strokeWidth={1}
|
strokeWidth={1}
|
||||||
stroke={'black'}
|
stroke="black"
|
||||||
strokeScaleEnabled={false}
|
strokeScaleEnabled={false}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -114,11 +114,11 @@ const IAICanvasStagingAreaToolbar = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
pos={'absolute'}
|
pos="absolute"
|
||||||
bottom={'1rem'}
|
bottom="1rem"
|
||||||
w={'100%'}
|
w="100%"
|
||||||
align={'center'}
|
align="center"
|
||||||
justify={'center'}
|
justify="center"
|
||||||
filter="drop-shadow(0 0.5rem 1rem rgba(0,0,0))"
|
filter="drop-shadow(0 0.5rem 1rem rgba(0,0,0))"
|
||||||
onMouseOver={handleMouseOver}
|
onMouseOver={handleMouseOver}
|
||||||
onMouseOut={handleMouseOut}
|
onMouseOut={handleMouseOut}
|
||||||
|
@ -172,7 +172,7 @@ const IAICanvasToolPreview = (props: GroupConfig) => {
|
|||||||
x={brushX}
|
x={brushX}
|
||||||
y={brushY}
|
y={brushY}
|
||||||
radius={radius}
|
radius={radius}
|
||||||
stroke={'rgba(255,255,255,0.4)'}
|
stroke="rgba(255,255,255,0.4)"
|
||||||
strokeWidth={strokeWidth * 2}
|
strokeWidth={strokeWidth * 2}
|
||||||
strokeEnabled={true}
|
strokeEnabled={true}
|
||||||
listening={false}
|
listening={false}
|
||||||
@ -181,7 +181,7 @@ const IAICanvasToolPreview = (props: GroupConfig) => {
|
|||||||
x={brushX}
|
x={brushX}
|
||||||
y={brushY}
|
y={brushY}
|
||||||
radius={radius}
|
radius={radius}
|
||||||
stroke={'rgba(0,0,0,1)'}
|
stroke="rgba(0,0,0,1)"
|
||||||
strokeWidth={strokeWidth}
|
strokeWidth={strokeWidth}
|
||||||
strokeEnabled={true}
|
strokeEnabled={true}
|
||||||
listening={false}
|
listening={false}
|
||||||
@ -192,14 +192,14 @@ const IAICanvasToolPreview = (props: GroupConfig) => {
|
|||||||
x={brushX}
|
x={brushX}
|
||||||
y={brushY}
|
y={brushY}
|
||||||
radius={dotRadius * 2}
|
radius={dotRadius * 2}
|
||||||
fill={'rgba(255,255,255,0.4)'}
|
fill="rgba(255,255,255,0.4)"
|
||||||
listening={false}
|
listening={false}
|
||||||
/>
|
/>
|
||||||
<Circle
|
<Circle
|
||||||
x={brushX}
|
x={brushX}
|
||||||
y={brushY}
|
y={brushY}
|
||||||
radius={dotRadius}
|
radius={dotRadius}
|
||||||
fill={'rgba(0,0,0,1)'}
|
fill="rgba(0,0,0,1)"
|
||||||
listening={false}
|
listening={false}
|
||||||
/>
|
/>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -269,12 +269,12 @@ const IAICanvasBoundingBox = (props: IAICanvasBoundingBoxPreviewProps) => {
|
|||||||
<Transformer
|
<Transformer
|
||||||
anchorCornerRadius={3}
|
anchorCornerRadius={3}
|
||||||
anchorDragBoundFunc={anchorDragBoundFunc}
|
anchorDragBoundFunc={anchorDragBoundFunc}
|
||||||
anchorFill={'rgba(212,216,234,1)'}
|
anchorFill="rgba(212,216,234,1)"
|
||||||
anchorSize={15}
|
anchorSize={15}
|
||||||
anchorStroke={'rgb(42,42,42)'}
|
anchorStroke="rgb(42,42,42)"
|
||||||
borderDash={[4, 4]}
|
borderDash={[4, 4]}
|
||||||
borderEnabled={true}
|
borderEnabled={true}
|
||||||
borderStroke={'black'}
|
borderStroke="black"
|
||||||
draggable={false}
|
draggable={false}
|
||||||
enabledAnchors={tool === 'move' ? undefined : []}
|
enabledAnchors={tool === 'move' ? undefined : []}
|
||||||
flipEnabled={false}
|
flipEnabled={false}
|
||||||
|
@ -121,7 +121,7 @@ const IAICanvasMaskOptions = () => {
|
|||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex direction={'column'} gap={'0.5rem'}>
|
<Flex direction="column" gap="0.5rem">
|
||||||
<IAICheckbox
|
<IAICheckbox
|
||||||
label={`${t('unifiedcanvas:enableMask')} (H)`}
|
label={`${t('unifiedcanvas:enableMask')} (H)`}
|
||||||
isChecked={isMaskEnabled}
|
isChecked={isMaskEnabled}
|
||||||
@ -139,7 +139,7 @@ const IAICanvasMaskOptions = () => {
|
|||||||
color={maskColor}
|
color={maskColor}
|
||||||
onChange={(newColor) => dispatch(setMaskColor(newColor))}
|
onChange={(newColor) => dispatch(setMaskColor(newColor))}
|
||||||
/>
|
/>
|
||||||
<IAIButton size={'sm'} leftIcon={<FaTrash />} onClick={handleClearMask}>
|
<IAIButton size="sm" leftIcon={<FaTrash />} onClick={handleClearMask}>
|
||||||
{t('unifiedcanvas:clearMask')} (Shift+C)
|
{t('unifiedcanvas:clearMask')} (Shift+C)
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -97,7 +97,7 @@ const IAICanvasSettingsButtonPopover = () => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex direction={'column'} gap={'0.5rem'}>
|
<Flex direction="column" gap="0.5rem">
|
||||||
<IAICheckbox
|
<IAICheckbox
|
||||||
label={t('unifiedcanvas:showIntermediates')}
|
label={t('unifiedcanvas:showIntermediates')}
|
||||||
isChecked={shouldShowIntermediates}
|
isChecked={shouldShowIntermediates}
|
||||||
|
@ -228,13 +228,8 @@ const IAICanvasToolChooserOptions = () => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex
|
<Flex minWidth="15rem" direction="column" gap="1rem" width="100%">
|
||||||
minWidth={'15rem'}
|
<Flex gap="1rem" justifyContent="space-between">
|
||||||
direction={'column'}
|
|
||||||
gap={'1rem'}
|
|
||||||
width={'100%'}
|
|
||||||
>
|
|
||||||
<Flex gap={'1rem'} justifyContent="space-between">
|
|
||||||
<IAISlider
|
<IAISlider
|
||||||
label={t('unifiedcanvas:brushSize')}
|
label={t('unifiedcanvas:brushSize')}
|
||||||
value={brushSize}
|
value={brushSize}
|
||||||
|
@ -415,14 +415,14 @@ const CurrentImageButtons = () => {
|
|||||||
>
|
>
|
||||||
<div className="current-image-send-to-popover">
|
<div className="current-image-send-to-popover">
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={handleClickUseAsInitialImage}
|
onClick={handleClickUseAsInitialImage}
|
||||||
leftIcon={<FaShare />}
|
leftIcon={<FaShare />}
|
||||||
>
|
>
|
||||||
{t('parameters:sendToImg2Img')}
|
{t('parameters:sendToImg2Img')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={handleSendToCanvas}
|
onClick={handleSendToCanvas}
|
||||||
leftIcon={<FaShare />}
|
leftIcon={<FaShare />}
|
||||||
>
|
>
|
||||||
@ -430,14 +430,14 @@ const CurrentImageButtons = () => {
|
|||||||
</IAIButton>
|
</IAIButton>
|
||||||
|
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={handleCopyImage}
|
onClick={handleCopyImage}
|
||||||
leftIcon={<FaCopy />}
|
leftIcon={<FaCopy />}
|
||||||
>
|
>
|
||||||
{t('parameters:copyImage')}
|
{t('parameters:copyImage')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={handleCopyImageLink}
|
onClick={handleCopyImageLink}
|
||||||
leftIcon={<FaCopy />}
|
leftIcon={<FaCopy />}
|
||||||
>
|
>
|
||||||
@ -445,7 +445,7 @@ const CurrentImageButtons = () => {
|
|||||||
</IAIButton>
|
</IAIButton>
|
||||||
|
|
||||||
<Link download={true} href={currentImage?.url}>
|
<Link download={true} href={currentImage?.url}>
|
||||||
<IAIButton leftIcon={<FaDownload />} size={'sm'} w="100%">
|
<IAIButton leftIcon={<FaDownload />} size="sm" w="100%">
|
||||||
{t('parameters:downloadImage')}
|
{t('parameters:downloadImage')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -82,7 +82,7 @@ export default function CurrentImagePreview() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'current-image-preview'}>
|
<div className="current-image-preview">
|
||||||
{imageToDisplay && (
|
{imageToDisplay && (
|
||||||
<Image
|
<Image
|
||||||
src={imageToDisplay.url}
|
src={imageToDisplay.url}
|
||||||
|
@ -116,13 +116,13 @@ const DeleteImageModal = forwardRef(
|
|||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
|
|
||||||
<AlertDialogBody>
|
<AlertDialogBody>
|
||||||
<Flex direction={'column'} gap={5}>
|
<Flex direction="column" gap={5}>
|
||||||
<Text>
|
<Text>
|
||||||
Are you sure? Deleted images will be sent to the Bin. You
|
Are you sure? Deleted images will be sent to the Bin. You
|
||||||
can restore from there if you wish to.
|
can restore from there if you wish to.
|
||||||
</Text>
|
</Text>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Flex alignItems={'center'}>
|
<Flex alignItems="center">
|
||||||
<FormLabel mb={0}>Don't ask me again</FormLabel>
|
<FormLabel mb={0}>Don't ask me again</FormLabel>
|
||||||
<Switch
|
<Switch
|
||||||
checked={!shouldConfirmOnDelete}
|
checked={!shouldConfirmOnDelete}
|
||||||
|
@ -175,12 +175,12 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
>
|
>
|
||||||
<ContextMenu.Trigger>
|
<ContextMenu.Trigger>
|
||||||
<Box
|
<Box
|
||||||
position={'relative'}
|
position="relative"
|
||||||
key={uuid}
|
key={uuid}
|
||||||
className="hoverable-image"
|
className="hoverable-image"
|
||||||
onMouseOver={handleMouseOver}
|
onMouseOver={handleMouseOver}
|
||||||
onMouseOut={handleMouseOut}
|
onMouseOut={handleMouseOut}
|
||||||
userSelect={'none'}
|
userSelect="none"
|
||||||
draggable={true}
|
draggable={true}
|
||||||
onDragStart={handleDragStart}
|
onDragStart={handleDragStart}
|
||||||
>
|
>
|
||||||
@ -189,15 +189,15 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
objectFit={
|
objectFit={
|
||||||
shouldUseSingleGalleryColumn ? 'contain' : galleryImageObjectFit
|
shouldUseSingleGalleryColumn ? 'contain' : galleryImageObjectFit
|
||||||
}
|
}
|
||||||
rounded={'md'}
|
rounded="md"
|
||||||
src={thumbnail || url}
|
src={thumbnail || url}
|
||||||
loading={'lazy'}
|
loading="lazy"
|
||||||
/>
|
/>
|
||||||
<div className="hoverable-image-content" onClick={handleSelectImage}>
|
<div className="hoverable-image-content" onClick={handleSelectImage}>
|
||||||
{isSelected && (
|
{isSelected && (
|
||||||
<Icon
|
<Icon
|
||||||
width={'50%'}
|
width="50%"
|
||||||
height={'50%'}
|
height="50%"
|
||||||
as={FaCheck}
|
as={FaCheck}
|
||||||
className="hoverable-image-check"
|
className="hoverable-image-check"
|
||||||
/>
|
/>
|
||||||
@ -210,7 +210,7 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
aria-label={t('parameters:deleteImage')}
|
aria-label={t('parameters:deleteImage')}
|
||||||
icon={<FaTrashAlt />}
|
icon={<FaTrashAlt />}
|
||||||
size="xs"
|
size="xs"
|
||||||
variant={'imageHoverIconButton'}
|
variant="imageHoverIconButton"
|
||||||
fontSize={14}
|
fontSize={14}
|
||||||
isDisabled={!mayDeleteImage}
|
isDisabled={!mayDeleteImage}
|
||||||
/>
|
/>
|
||||||
@ -221,7 +221,7 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
</ContextMenu.Trigger>
|
</ContextMenu.Trigger>
|
||||||
<ContextMenu.Content
|
<ContextMenu.Content
|
||||||
className="hoverable-image-context-menu"
|
className="hoverable-image-context-menu"
|
||||||
sticky={'always'}
|
sticky="always"
|
||||||
onInteractOutside={(e) => {
|
onInteractOutside={(e) => {
|
||||||
e.detail.originalEvent.preventDefault();
|
e.detail.originalEvent.preventDefault();
|
||||||
}}
|
}}
|
||||||
|
@ -281,7 +281,7 @@ export default function ImageGallery() {
|
|||||||
<Resizable
|
<Resizable
|
||||||
minWidth={galleryMinWidth}
|
minWidth={galleryMinWidth}
|
||||||
maxWidth={shouldPinGallery ? galleryMaxWidth : window.innerWidth}
|
maxWidth={shouldPinGallery ? galleryMaxWidth : window.innerWidth}
|
||||||
className={'image-gallery-popup'}
|
className="image-gallery-popup"
|
||||||
handleStyles={{
|
handleStyles={{
|
||||||
left: {
|
left: {
|
||||||
width: '15px',
|
width: '15px',
|
||||||
@ -395,14 +395,14 @@ export default function ImageGallery() {
|
|||||||
{shouldShowButtons ? (
|
{shouldShowButtons ? (
|
||||||
<>
|
<>
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
data-selected={currentCategory === 'result'}
|
data-selected={currentCategory === 'result'}
|
||||||
onClick={() => dispatch(setCurrentCategory('result'))}
|
onClick={() => dispatch(setCurrentCategory('result'))}
|
||||||
>
|
>
|
||||||
{t('gallery:generations')}
|
{t('gallery:generations')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
data-selected={currentCategory === 'user'}
|
data-selected={currentCategory === 'user'}
|
||||||
onClick={() => dispatch(setCurrentCategory('user'))}
|
onClick={() => dispatch(setCurrentCategory('user'))}
|
||||||
>
|
>
|
||||||
@ -433,14 +433,14 @@ export default function ImageGallery() {
|
|||||||
<IAIPopover
|
<IAIPopover
|
||||||
isLazy
|
isLazy
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
placement={'left'}
|
placement="left"
|
||||||
triggerComponent={
|
triggerComponent={
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
aria-label={t('gallery:gallerySettings')}
|
aria-label={t('gallery:gallerySettings')}
|
||||||
icon={<FaWrench />}
|
icon={<FaWrench />}
|
||||||
className="image-gallery-icon-btn"
|
className="image-gallery-icon-btn"
|
||||||
cursor={'pointer'}
|
cursor="pointer"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
@ -455,7 +455,7 @@ export default function ImageGallery() {
|
|||||||
label={t('gallery:galleryImageSize')}
|
label={t('gallery:galleryImageSize')}
|
||||||
/>
|
/>
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
aria-label={t('gallery:galleryImageResetSize')}
|
aria-label={t('gallery:galleryImageResetSize')}
|
||||||
tooltip={t('gallery:galleryImageResetSize')}
|
tooltip={t('gallery:galleryImageResetSize')}
|
||||||
onClick={() => dispatch(setGalleryImageMinimumWidth(64))}
|
onClick={() => dispatch(setGalleryImageMinimumWidth(64))}
|
||||||
@ -505,8 +505,8 @@ export default function ImageGallery() {
|
|||||||
</IAIPopover>
|
</IAIPopover>
|
||||||
|
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
className={'image-gallery-icon-btn'}
|
className="image-gallery-icon-btn"
|
||||||
aria-label={t('gallery:pinGallery')}
|
aria-label={t('gallery:pinGallery')}
|
||||||
tooltip={`${t('gallery:pinGallery')} (Shift+G)`}
|
tooltip={`${t('gallery:pinGallery')} (Shift+G)`}
|
||||||
onClick={handleSetShouldPinGallery}
|
onClick={handleSetShouldPinGallery}
|
||||||
|
@ -71,8 +71,8 @@ const MetadataItem = ({
|
|||||||
<IconButton
|
<IconButton
|
||||||
aria-label="Use this parameter"
|
aria-label="Use this parameter"
|
||||||
icon={<IoArrowUndoCircleOutline />}
|
icon={<IoArrowUndoCircleOutline />}
|
||||||
size={'xs'}
|
size="xs"
|
||||||
variant={'ghost'}
|
variant="ghost"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
/>
|
/>
|
||||||
@ -83,23 +83,23 @@ const MetadataItem = ({
|
|||||||
<IconButton
|
<IconButton
|
||||||
aria-label={`Copy ${label}`}
|
aria-label={`Copy ${label}`}
|
||||||
icon={<FaCopy />}
|
icon={<FaCopy />}
|
||||||
size={'xs'}
|
size="xs"
|
||||||
variant={'ghost'}
|
variant="ghost"
|
||||||
fontSize={14}
|
fontSize={14}
|
||||||
onClick={() => navigator.clipboard.writeText(value.toString())}
|
onClick={() => navigator.clipboard.writeText(value.toString())}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<Flex direction={labelPosition ? 'column' : 'row'}>
|
<Flex direction={labelPosition ? 'column' : 'row'}>
|
||||||
<Text fontWeight={'semibold'} whiteSpace={'pre-wrap'} pr={2}>
|
<Text fontWeight="semibold" whiteSpace="pre-wrap" pr={2}>
|
||||||
{label}:
|
{label}:
|
||||||
</Text>
|
</Text>
|
||||||
{isLink ? (
|
{isLink ? (
|
||||||
<Link href={value.toString()} isExternal wordBreak={'break-all'}>
|
<Link href={value.toString()} isExternal wordBreak="break-all">
|
||||||
{value.toString()} <ExternalLinkIcon mx="2px" />
|
{value.toString()} <ExternalLinkIcon mx="2px" />
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<Text overflowY={'scroll'} wordBreak={'break-all'}>
|
<Text overflowY="scroll" wordBreak="break-all">
|
||||||
{value.toString()}
|
{value.toString()}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
@ -163,10 +163,10 @@ const ImageMetadataViewer = memo(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`image-metadata-viewer ${styleClass}`}>
|
<div className={`image-metadata-viewer ${styleClass}`}>
|
||||||
<Flex gap={1} direction={'column'} width={'100%'}>
|
<Flex gap={1} direction="column" width="100%">
|
||||||
<Flex gap={2}>
|
<Flex gap={2}>
|
||||||
<Text fontWeight={'semibold'}>File:</Text>
|
<Text fontWeight="semibold">File:</Text>
|
||||||
<Link href={image.url} isExternal maxW={'calc(100% - 3rem)'}>
|
<Link href={image.url} isExternal maxW="calc(100% - 3rem)">
|
||||||
{image.url.length > 64
|
{image.url.length > 64
|
||||||
? image.url.substring(0, 64).concat('...')
|
? image.url.substring(0, 64).concat('...')
|
||||||
: image.url}
|
: image.url}
|
||||||
@ -304,7 +304,7 @@ const ImageMetadataViewer = memo(
|
|||||||
)}
|
)}
|
||||||
{postprocessing && postprocessing.length > 0 && (
|
{postprocessing && postprocessing.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<Heading size={'sm'}>Postprocessing</Heading>
|
<Heading size="sm">Postprocessing</Heading>
|
||||||
{postprocessing.map(
|
{postprocessing.map(
|
||||||
(
|
(
|
||||||
postprocess: InvokeAI.PostProcessedImageMetadata,
|
postprocess: InvokeAI.PostProcessedImageMetadata,
|
||||||
@ -313,13 +313,8 @@ const ImageMetadataViewer = memo(
|
|||||||
if (postprocess.type === 'esrgan') {
|
if (postprocess.type === 'esrgan') {
|
||||||
const { scale, strength, denoise_str } = postprocess;
|
const { scale, strength, denoise_str } = postprocess;
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex key={i} pl="2rem" gap={1} direction="column">
|
||||||
key={i}
|
<Text size="md">{`${
|
||||||
pl={'2rem'}
|
|
||||||
gap={1}
|
|
||||||
direction={'column'}
|
|
||||||
>
|
|
||||||
<Text size={'md'}>{`${
|
|
||||||
i + 1
|
i + 1
|
||||||
}: Upscale (ESRGAN)`}</Text>
|
}: Upscale (ESRGAN)`}</Text>
|
||||||
<MetadataItem
|
<MetadataItem
|
||||||
@ -348,13 +343,8 @@ const ImageMetadataViewer = memo(
|
|||||||
} else if (postprocess.type === 'gfpgan') {
|
} else if (postprocess.type === 'gfpgan') {
|
||||||
const { strength } = postprocess;
|
const { strength } = postprocess;
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex key={i} pl="2rem" gap={1} direction="column">
|
||||||
key={i}
|
<Text size="md">{`${
|
||||||
pl={'2rem'}
|
|
||||||
gap={1}
|
|
||||||
direction={'column'}
|
|
||||||
>
|
|
||||||
<Text size={'md'}>{`${
|
|
||||||
i + 1
|
i + 1
|
||||||
}: Face restoration (GFPGAN)`}</Text>
|
}: Face restoration (GFPGAN)`}</Text>
|
||||||
|
|
||||||
@ -371,13 +361,8 @@ const ImageMetadataViewer = memo(
|
|||||||
} else if (postprocess.type === 'codeformer') {
|
} else if (postprocess.type === 'codeformer') {
|
||||||
const { strength, fidelity } = postprocess;
|
const { strength, fidelity } = postprocess;
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex key={i} pl="2rem" gap={1} direction="column">
|
||||||
key={i}
|
<Text size="md">{`${
|
||||||
pl={'2rem'}
|
|
||||||
gap={1}
|
|
||||||
direction={'column'}
|
|
||||||
>
|
|
||||||
<Text size={'md'}>{`${
|
|
||||||
i + 1
|
i + 1
|
||||||
}: Face restoration (Codeformer)`}</Text>
|
}: Face restoration (Codeformer)`}</Text>
|
||||||
|
|
||||||
@ -413,30 +398,30 @@ const ImageMetadataViewer = memo(
|
|||||||
value={dreamPrompt}
|
value={dreamPrompt}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<Flex gap={2}>
|
<Flex gap={2}>
|
||||||
<Tooltip label={`Copy metadata JSON`}>
|
<Tooltip label="Copy metadata JSON">
|
||||||
<IconButton
|
<IconButton
|
||||||
aria-label="Copy metadata JSON"
|
aria-label="Copy metadata JSON"
|
||||||
icon={<FaCopy />}
|
icon={<FaCopy />}
|
||||||
size={'xs'}
|
size="xs"
|
||||||
variant={'ghost'}
|
variant="ghost"
|
||||||
fontSize={14}
|
fontSize={14}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigator.clipboard.writeText(metadataJSON)
|
navigator.clipboard.writeText(metadataJSON)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Text fontWeight={'semibold'}>Metadata JSON:</Text>
|
<Text fontWeight="semibold">Metadata JSON:</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<div className={'image-json-viewer'}>
|
<div className="image-json-viewer">
|
||||||
<pre>{metadataJSON}</pre>
|
<pre>{metadataJSON}</pre>
|
||||||
</div>
|
</div>
|
||||||
</Flex>
|
</Flex>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Center width={'100%'} pt={10}>
|
<Center width="100%" pt={10}>
|
||||||
<Text fontSize={'lg'} fontWeight="semibold">
|
<Text fontSize="lg" fontWeight="semibold">
|
||||||
No metadata available
|
No metadata available
|
||||||
</Text>
|
</Text>
|
||||||
</Center>
|
</Center>
|
||||||
|
@ -23,8 +23,8 @@ export default function InvokeAccordionItem(props: InvokeAccordionItemProps) {
|
|||||||
return (
|
return (
|
||||||
<AccordionItem className="advanced-parameters-item">
|
<AccordionItem className="advanced-parameters-item">
|
||||||
<AccordionButton className="advanced-parameters-header">
|
<AccordionButton className="advanced-parameters-header">
|
||||||
<Flex width={'100%'} gap={'0.5rem'} align={'center'}>
|
<Flex width="100%" gap="0.5rem" align="center">
|
||||||
<Box flexGrow={1} textAlign={'left'}>
|
<Box flexGrow={1} textAlign="left">
|
||||||
{header}
|
{header}
|
||||||
</Box>
|
</Box>
|
||||||
{additionalHeaderComponents}
|
{additionalHeaderComponents}
|
||||||
|
@ -63,7 +63,7 @@ const FaceRestoreSettings = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex direction={'column'} gap={2}>
|
<Flex direction="column" gap={2}>
|
||||||
<IAISelect
|
<IAISelect
|
||||||
label={t('parameters:type')}
|
label={t('parameters:type')}
|
||||||
validValues={FACETOOL_TYPES.concat()}
|
validValues={FACETOOL_TYPES.concat()}
|
||||||
|
@ -36,7 +36,7 @@ export default function ImageToImageStrength(props: ImageToImageStrengthProps) {
|
|||||||
styleClass={styleClass}
|
styleClass={styleClass}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
inputWidth={'5.5rem'}
|
inputWidth="5.5rem"
|
||||||
withReset
|
withReset
|
||||||
handleReset={handleImg2ImgStrengthReset}
|
handleReset={handleImg2ImgStrengthReset}
|
||||||
/>
|
/>
|
||||||
|
@ -49,7 +49,7 @@ const HiresStrength = () => {
|
|||||||
isInteger={false}
|
isInteger={false}
|
||||||
withInput
|
withInput
|
||||||
withSliderMarks
|
withSliderMarks
|
||||||
inputWidth={'5.5rem'}
|
inputWidth="5.5rem"
|
||||||
withReset
|
withReset
|
||||||
handleReset={handleHiResStrengthReset}
|
handleReset={handleHiResStrengthReset}
|
||||||
isSliderDisabled={!hiresFix}
|
isSliderDisabled={!hiresFix}
|
||||||
@ -75,10 +75,10 @@ const HiresSettings = () => {
|
|||||||
dispatch(setHiresFix(e.target.checked));
|
dispatch(setHiresFix(e.target.checked));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<IAISwitch
|
<IAISwitch
|
||||||
label={t('parameters:hiresOptim')}
|
label={t('parameters:hiresOptim')}
|
||||||
fontSize={'md'}
|
fontSize="md"
|
||||||
isChecked={hiresFix}
|
isChecked={hiresFix}
|
||||||
onChange={handleChangeHiresFix}
|
onChange={handleChangeHiresFix}
|
||||||
/>
|
/>
|
||||||
|
@ -3,7 +3,7 @@ import SeamlessSettings from './SeamlessSettings';
|
|||||||
|
|
||||||
const ImageToImageOutputSettings = () => {
|
const ImageToImageOutputSettings = () => {
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<SeamlessSettings />
|
<SeamlessSettings />
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
@ -4,7 +4,7 @@ import SeamlessSettings from './SeamlessSettings';
|
|||||||
|
|
||||||
const OutputSettings = () => {
|
const OutputSettings = () => {
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<SeamlessSettings />
|
<SeamlessSettings />
|
||||||
<HiresSettings />
|
<HiresSettings />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -22,10 +22,10 @@ const SeamlessSettings = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<IAISwitch
|
<IAISwitch
|
||||||
label={t('parameters:seamlessTiling')}
|
label={t('parameters:seamlessTiling')}
|
||||||
fontSize={'md'}
|
fontSize="md"
|
||||||
isChecked={seamless}
|
isChecked={seamless}
|
||||||
onChange={handleChangeSeamless}
|
onChange={handleChangeSeamless}
|
||||||
/>
|
/>
|
||||||
|
@ -10,7 +10,7 @@ import Threshold from './Threshold';
|
|||||||
*/
|
*/
|
||||||
const SeedSettings = () => {
|
const SeedSettings = () => {
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<RandomizeSeed />
|
<RandomizeSeed />
|
||||||
<Flex gap={2}>
|
<Flex gap={2}>
|
||||||
<Seed />
|
<Seed />
|
||||||
|
@ -18,7 +18,7 @@ export default function ShuffleSeed() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size={'sm'}
|
size="sm"
|
||||||
isDisabled={shouldRandomizeSeed}
|
isDisabled={shouldRandomizeSeed}
|
||||||
onClick={handleClickRandomizeSeed}
|
onClick={handleClickRandomizeSeed}
|
||||||
padding="0 1.5rem"
|
padding="0 1.5rem"
|
||||||
|
@ -18,7 +18,7 @@ export default function GenerateVariationsToggle() {
|
|||||||
return (
|
return (
|
||||||
<IAISwitch
|
<IAISwitch
|
||||||
isChecked={shouldGenerateVariations}
|
isChecked={shouldGenerateVariations}
|
||||||
width={'auto'}
|
width="auto"
|
||||||
onChange={handleChangeShouldGenerateVariations}
|
onChange={handleChangeShouldGenerateVariations}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -7,7 +7,7 @@ import VariationAmount from './VariationAmount';
|
|||||||
*/
|
*/
|
||||||
const VariationsSettings = () => {
|
const VariationsSettings = () => {
|
||||||
return (
|
return (
|
||||||
<Flex gap={2} direction={'column'}>
|
<Flex gap={2} direction="column">
|
||||||
<VariationAmount />
|
<VariationAmount />
|
||||||
<SeedWeights />
|
<SeedWeights />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -71,7 +71,7 @@ const PromptInput = () => {
|
|||||||
id="prompt"
|
id="prompt"
|
||||||
name="prompt"
|
name="prompt"
|
||||||
placeholder={t('parameters:promptPlaceholder')}
|
placeholder={t('parameters:promptPlaceholder')}
|
||||||
size={'lg'}
|
size="lg"
|
||||||
value={prompt}
|
value={prompt}
|
||||||
onChange={handleChangePrompt}
|
onChange={handleChangePrompt}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
|
@ -27,7 +27,7 @@ const EmptyTempFolderButtonModal = () => {
|
|||||||
acceptCallback={acceptCallback}
|
acceptCallback={acceptCallback}
|
||||||
acceptButtonText={t('unifiedcanvas:emptyFolder')}
|
acceptButtonText={t('unifiedcanvas:emptyFolder')}
|
||||||
triggerComponent={
|
triggerComponent={
|
||||||
<IAIButton leftIcon={<FaTrash />} size={'sm'} isDisabled={isStaging}>
|
<IAIButton leftIcon={<FaTrash />} size="sm" isDisabled={isStaging}>
|
||||||
{t('unifiedcanvas:emptyTempImageFolder')}
|
{t('unifiedcanvas:emptyTempImageFolder')}
|
||||||
</IAIButton>
|
</IAIButton>
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ const Console = () => {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
zIndex: 9999,
|
zIndex: 9999,
|
||||||
}}
|
}}
|
||||||
maxHeight={'90vh'}
|
maxHeight="90vh"
|
||||||
>
|
>
|
||||||
<div className="console" ref={viewerRef} onScroll={handleOnScroll}>
|
<div className="console" ref={viewerRef} onScroll={handleOnScroll}>
|
||||||
{log.map((entry, i) => {
|
{log.map((entry, i) => {
|
||||||
@ -130,11 +130,11 @@ const Console = () => {
|
|||||||
label={shouldAutoscroll ? 'Autoscroll On' : 'Autoscroll Off'}
|
label={shouldAutoscroll ? 'Autoscroll On' : 'Autoscroll Off'}
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={'console-autoscroll-icon-button'}
|
className="console-autoscroll-icon-button"
|
||||||
data-autoscroll-enabled={shouldAutoscroll}
|
data-autoscroll-enabled={shouldAutoscroll}
|
||||||
size="sm"
|
size="sm"
|
||||||
aria-label="Toggle autoscroll"
|
aria-label="Toggle autoscroll"
|
||||||
variant={'solid'}
|
variant="solid"
|
||||||
icon={<FaAngleDoubleDown />}
|
icon={<FaAngleDoubleDown />}
|
||||||
onClick={() => setShouldAutoscroll(!shouldAutoscroll)}
|
onClick={() => setShouldAutoscroll(!shouldAutoscroll)}
|
||||||
/>
|
/>
|
||||||
@ -145,11 +145,11 @@ const Console = () => {
|
|||||||
label={shouldShowLogViewer ? 'Hide Console' : 'Show Console'}
|
label={shouldShowLogViewer ? 'Hide Console' : 'Show Console'}
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={'console-toggle-icon-button'}
|
className="console-toggle-icon-button"
|
||||||
data-error-seen={hasError || !wasErrorSeen}
|
data-error-seen={hasError || !wasErrorSeen}
|
||||||
size="sm"
|
size="sm"
|
||||||
position={'fixed'}
|
position="fixed"
|
||||||
variant={'solid'}
|
variant="solid"
|
||||||
aria-label="Toggle Log Viewer"
|
aria-label="Toggle Log Viewer"
|
||||||
icon={shouldShowLogViewer ? <FaMinus /> : <FaCode />}
|
icon={shouldShowLogViewer ? <FaMinus /> : <FaCode />}
|
||||||
onClick={handleClickLogViewerToggle}
|
onClick={handleClickLogViewerToggle}
|
||||||
|
@ -55,7 +55,7 @@ export default function LanguagePicker() {
|
|||||||
aria-label={t('common:languagePickerLabel')}
|
aria-label={t('common:languagePickerLabel')}
|
||||||
tooltip={t('common:languagePickerLabel')}
|
tooltip={t('common:languagePickerLabel')}
|
||||||
icon={<FaLanguage />}
|
icon={<FaLanguage />}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={26}
|
fontSize={26}
|
||||||
|
@ -99,8 +99,8 @@ export default function AddCheckpointModel() {
|
|||||||
>
|
>
|
||||||
{({ handleSubmit, errors, touched }) => (
|
{({ handleSubmit, errors, touched }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<VStack rowGap={'0.5rem'}>
|
<VStack rowGap="0.5rem">
|
||||||
<Text fontSize={20} fontWeight="bold" alignSelf={'start'}>
|
<Text fontSize={20} fontWeight="bold" alignSelf="start">
|
||||||
{t('modelmanager:manual')}
|
{t('modelmanager:manual')}
|
||||||
</Text>
|
</Text>
|
||||||
{/* Name */}
|
{/* Name */}
|
||||||
@ -111,7 +111,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="name" fontSize="sm">
|
<FormLabel htmlFor="name" fontSize="sm">
|
||||||
{t('modelmanager:name')}
|
{t('modelmanager:name')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="name"
|
id="name"
|
||||||
@ -138,7 +138,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="description" fontSize="sm">
|
<FormLabel htmlFor="description" fontSize="sm">
|
||||||
{t('modelmanager:description')}
|
{t('modelmanager:description')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="description"
|
id="description"
|
||||||
@ -164,7 +164,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="config" fontSize="sm">
|
<FormLabel htmlFor="config" fontSize="sm">
|
||||||
{t('modelmanager:config')}
|
{t('modelmanager:config')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="config"
|
id="config"
|
||||||
@ -190,7 +190,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="config" fontSize="sm">
|
<FormLabel htmlFor="config" fontSize="sm">
|
||||||
{t('modelmanager:modelLocation')}
|
{t('modelmanager:modelLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="weights"
|
id="weights"
|
||||||
@ -213,7 +213,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="vae" fontSize="sm">
|
<FormLabel htmlFor="vae" fontSize="sm">
|
||||||
{t('modelmanager:vaeLocation')}
|
{t('modelmanager:vaeLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae"
|
id="vae"
|
||||||
@ -231,13 +231,13 @@ export default function AddCheckpointModel() {
|
|||||||
</VStack>
|
</VStack>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<HStack width={'100%'}>
|
<HStack width="100%">
|
||||||
{/* Width */}
|
{/* Width */}
|
||||||
<FormControl isInvalid={!!errors.width && touched.width}>
|
<FormControl isInvalid={!!errors.width && touched.width}>
|
||||||
<FormLabel htmlFor="width" fontSize="sm">
|
<FormLabel htmlFor="width" fontSize="sm">
|
||||||
{t('modelmanager:width')}
|
{t('modelmanager:width')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field id="width" name="width">
|
<Field id="width" name="width">
|
||||||
{({
|
{({
|
||||||
field,
|
field,
|
||||||
@ -276,7 +276,7 @@ export default function AddCheckpointModel() {
|
|||||||
<FormLabel htmlFor="height" fontSize="sm">
|
<FormLabel htmlFor="height" fontSize="sm">
|
||||||
{t('modelmanager:height')}
|
{t('modelmanager:height')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field id="height" name="height">
|
<Field id="height" name="height">
|
||||||
{({
|
{({
|
||||||
field,
|
field,
|
||||||
|
@ -105,7 +105,7 @@ export default function AddDiffusersModel() {
|
|||||||
>
|
>
|
||||||
{({ handleSubmit, errors, touched }) => (
|
{({ handleSubmit, errors, touched }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<VStack rowGap={'0.5rem'}>
|
<VStack rowGap="0.5rem">
|
||||||
<FormItemWrapper>
|
<FormItemWrapper>
|
||||||
{/* Name */}
|
{/* Name */}
|
||||||
<FormControl
|
<FormControl
|
||||||
@ -115,7 +115,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="name" fontSize="sm">
|
<FormLabel htmlFor="name" fontSize="sm">
|
||||||
{t('modelmanager:name')}
|
{t('modelmanager:name')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="name"
|
id="name"
|
||||||
@ -145,7 +145,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="description" fontSize="sm">
|
<FormLabel htmlFor="description" fontSize="sm">
|
||||||
{t('modelmanager:description')}
|
{t('modelmanager:description')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="description"
|
id="description"
|
||||||
@ -182,7 +182,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="path" fontSize="sm">
|
<FormLabel htmlFor="path" fontSize="sm">
|
||||||
{t('modelmanager:modelLocation')}
|
{t('modelmanager:modelLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="path"
|
id="path"
|
||||||
@ -205,7 +205,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="repo_id" fontSize="sm">
|
<FormLabel htmlFor="repo_id" fontSize="sm">
|
||||||
{t('modelmanager:repo_id')}
|
{t('modelmanager:repo_id')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="repo_id"
|
id="repo_id"
|
||||||
@ -242,7 +242,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="vae.path" fontSize="sm">
|
<FormLabel htmlFor="vae.path" fontSize="sm">
|
||||||
{t('modelmanager:vaeLocation')}
|
{t('modelmanager:vaeLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae.path"
|
id="vae.path"
|
||||||
@ -267,7 +267,7 @@ export default function AddDiffusersModel() {
|
|||||||
<FormLabel htmlFor="vae.repo_id" fontSize="sm">
|
<FormLabel htmlFor="vae.repo_id" fontSize="sm">
|
||||||
{t('modelmanager:vaeRepoID')}
|
{t('modelmanager:vaeRepoID')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae.repo_id"
|
id="vae.repo_id"
|
||||||
|
@ -72,9 +72,9 @@ export default function AddModel() {
|
|||||||
tooltip={t('modelmanager:addNewModel')}
|
tooltip={t('modelmanager:addNewModel')}
|
||||||
onClick={onOpen}
|
onClick={onOpen}
|
||||||
className="modal-close-btn"
|
className="modal-close-btn"
|
||||||
size={'sm'}
|
size="sm"
|
||||||
>
|
>
|
||||||
<Flex columnGap={'0.5rem'} alignItems="center">
|
<Flex columnGap="0.5rem" alignItems="center">
|
||||||
<FaPlus />
|
<FaPlus />
|
||||||
{t('modelmanager:addNew')}
|
{t('modelmanager:addNew')}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -119,7 +119,7 @@ export default function CheckpointModelEdit() {
|
|||||||
>
|
>
|
||||||
{({ handleSubmit, errors, touched }) => (
|
{({ handleSubmit, errors, touched }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<VStack rowGap={'0.5rem'} alignItems="start">
|
<VStack rowGap="0.5rem" alignItems="start">
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
<FormControl
|
<FormControl
|
||||||
isInvalid={!!errors.description && touched.description}
|
isInvalid={!!errors.description && touched.description}
|
||||||
@ -128,7 +128,7 @@ export default function CheckpointModelEdit() {
|
|||||||
<FormLabel htmlFor="description" fontSize="sm">
|
<FormLabel htmlFor="description" fontSize="sm">
|
||||||
{t('modelmanager:description')}
|
{t('modelmanager:description')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="description"
|
id="description"
|
||||||
@ -154,7 +154,7 @@ export default function CheckpointModelEdit() {
|
|||||||
<FormLabel htmlFor="config" fontSize="sm">
|
<FormLabel htmlFor="config" fontSize="sm">
|
||||||
{t('modelmanager:config')}
|
{t('modelmanager:config')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="config"
|
id="config"
|
||||||
@ -180,7 +180,7 @@ export default function CheckpointModelEdit() {
|
|||||||
<FormLabel htmlFor="config" fontSize="sm">
|
<FormLabel htmlFor="config" fontSize="sm">
|
||||||
{t('modelmanager:modelLocation')}
|
{t('modelmanager:modelLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="weights"
|
id="weights"
|
||||||
@ -203,7 +203,7 @@ export default function CheckpointModelEdit() {
|
|||||||
<FormLabel htmlFor="vae" fontSize="sm">
|
<FormLabel htmlFor="vae" fontSize="sm">
|
||||||
{t('modelmanager:vaeLocation')}
|
{t('modelmanager:vaeLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae"
|
id="vae"
|
||||||
@ -221,13 +221,13 @@ export default function CheckpointModelEdit() {
|
|||||||
</VStack>
|
</VStack>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
<HStack width={'100%'}>
|
<HStack width="100%">
|
||||||
{/* Width */}
|
{/* Width */}
|
||||||
<FormControl isInvalid={!!errors.width && touched.width}>
|
<FormControl isInvalid={!!errors.width && touched.width}>
|
||||||
<FormLabel htmlFor="width" fontSize="sm">
|
<FormLabel htmlFor="width" fontSize="sm">
|
||||||
{t('modelmanager:width')}
|
{t('modelmanager:width')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field id="width" name="width">
|
<Field id="width" name="width">
|
||||||
{({
|
{({
|
||||||
field,
|
field,
|
||||||
@ -265,7 +265,7 @@ export default function CheckpointModelEdit() {
|
|||||||
<FormLabel htmlFor="height" fontSize="sm">
|
<FormLabel htmlFor="height" fontSize="sm">
|
||||||
{t('modelmanager:height')}
|
{t('modelmanager:height')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field id="height" name="height">
|
<Field id="height" name="height">
|
||||||
{({
|
{({
|
||||||
field,
|
field,
|
||||||
|
@ -128,7 +128,7 @@ export default function DiffusersModelEdit() {
|
|||||||
>
|
>
|
||||||
{({ handleSubmit, errors, touched }) => (
|
{({ handleSubmit, errors, touched }) => (
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<VStack rowGap={'0.5rem'} alignItems="start">
|
<VStack rowGap="0.5rem" alignItems="start">
|
||||||
{/* Description */}
|
{/* Description */}
|
||||||
<FormControl
|
<FormControl
|
||||||
isInvalid={!!errors.description && touched.description}
|
isInvalid={!!errors.description && touched.description}
|
||||||
@ -137,7 +137,7 @@ export default function DiffusersModelEdit() {
|
|||||||
<FormLabel htmlFor="description" fontSize="sm">
|
<FormLabel htmlFor="description" fontSize="sm">
|
||||||
{t('modelmanager:description')}
|
{t('modelmanager:description')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="description"
|
id="description"
|
||||||
@ -163,7 +163,7 @@ export default function DiffusersModelEdit() {
|
|||||||
<FormLabel htmlFor="path" fontSize="sm">
|
<FormLabel htmlFor="path" fontSize="sm">
|
||||||
{t('modelmanager:modelLocation')}
|
{t('modelmanager:modelLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="path"
|
id="path"
|
||||||
@ -186,7 +186,7 @@ export default function DiffusersModelEdit() {
|
|||||||
<FormLabel htmlFor="repo_id" fontSize="sm">
|
<FormLabel htmlFor="repo_id" fontSize="sm">
|
||||||
{t('modelmanager:repo_id')}
|
{t('modelmanager:repo_id')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="repo_id"
|
id="repo_id"
|
||||||
@ -211,7 +211,7 @@ export default function DiffusersModelEdit() {
|
|||||||
<FormLabel htmlFor="vae.path" fontSize="sm">
|
<FormLabel htmlFor="vae.path" fontSize="sm">
|
||||||
{t('modelmanager:vaeLocation')}
|
{t('modelmanager:vaeLocation')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae.path"
|
id="vae.path"
|
||||||
@ -236,7 +236,7 @@ export default function DiffusersModelEdit() {
|
|||||||
<FormLabel htmlFor="vae.repo_id" fontSize="sm">
|
<FormLabel htmlFor="vae.repo_id" fontSize="sm">
|
||||||
{t('modelmanager:vaeRepoID')}
|
{t('modelmanager:vaeRepoID')}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<Field
|
<Field
|
||||||
as={IAIInput}
|
as={IAIInput}
|
||||||
id="vae.repo_id"
|
id="vae.repo_id"
|
||||||
|
@ -176,9 +176,9 @@ const ModelList = () => {
|
|||||||
}, [models, searchText, t, isSelectedFilter]);
|
}, [models, searchText, t, isSelectedFilter]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDirection={'column'} rowGap="2rem" width="50%" minWidth="50%">
|
<Flex flexDirection="column" rowGap="2rem" width="50%" minWidth="50%">
|
||||||
<Flex justifyContent={'space-between'}>
|
<Flex justifyContent="space-between">
|
||||||
<Text fontSize={'1.4rem'} fontWeight="bold">
|
<Text fontSize="1.4rem" fontWeight="bold">
|
||||||
{t('modelmanager:availableModels')}
|
{t('modelmanager:availableModels')}
|
||||||
</Text>
|
</Text>
|
||||||
<AddModel />
|
<AddModel />
|
||||||
@ -190,10 +190,10 @@ const ModelList = () => {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Flex
|
<Flex
|
||||||
flexDirection={'column'}
|
flexDirection="column"
|
||||||
gap={1}
|
gap={1}
|
||||||
maxHeight={window.innerHeight - 360}
|
maxHeight={window.innerHeight - 360}
|
||||||
overflow={'scroll'}
|
overflow="scroll"
|
||||||
paddingRight="1rem"
|
paddingRight="1rem"
|
||||||
>
|
>
|
||||||
<Flex columnGap="0.5rem">
|
<Flex columnGap="0.5rem">
|
||||||
|
@ -56,7 +56,7 @@ export default function ModelListItem(props: ModelListItemProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
alignItems={'center'}
|
alignItems="center"
|
||||||
padding="0.5rem 0.5rem"
|
padding="0.5rem 0.5rem"
|
||||||
borderRadius="0.2rem"
|
borderRadius="0.2rem"
|
||||||
backgroundColor={name === openModel ? 'var(--accent-color)' : ''}
|
backgroundColor={name === openModel ? 'var(--accent-color)' : ''}
|
||||||
@ -69,14 +69,14 @@ export default function ModelListItem(props: ModelListItemProps) {
|
|||||||
>
|
>
|
||||||
<Box onClick={openModelHandler} cursor="pointer">
|
<Box onClick={openModelHandler} cursor="pointer">
|
||||||
<Tooltip label={description} hasArrow placement="bottom">
|
<Tooltip label={description} hasArrow placement="bottom">
|
||||||
<Text fontWeight={'bold'}>{name}</Text>
|
<Text fontWeight="bold">{name}</Text>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Box>
|
</Box>
|
||||||
<Spacer onClick={openModelHandler} cursor="pointer" />
|
<Spacer onClick={openModelHandler} cursor="pointer" />
|
||||||
<Flex gap={2} alignItems="center">
|
<Flex gap={2} alignItems="center">
|
||||||
<Text color={statusTextColor()}>{status}</Text>
|
<Text color={statusTextColor()}>{status}</Text>
|
||||||
<Button
|
<Button
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={handleChangeModel}
|
onClick={handleChangeModel}
|
||||||
isDisabled={status === 'active' || isProcessing || !isConnected}
|
isDisabled={status === 'active' || isProcessing || !isConnected}
|
||||||
className="modal-close-btn"
|
className="modal-close-btn"
|
||||||
@ -85,7 +85,7 @@ export default function ModelListItem(props: ModelListItemProps) {
|
|||||||
</Button>
|
</Button>
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
icon={<EditIcon />}
|
icon={<EditIcon />}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={openModelHandler}
|
onClick={openModelHandler}
|
||||||
aria-label="Modify Config"
|
aria-label="Modify Config"
|
||||||
isDisabled={status === 'active' || isProcessing || !isConnected}
|
isDisabled={status === 'active' || isProcessing || !isConnected}
|
||||||
@ -98,7 +98,7 @@ export default function ModelListItem(props: ModelListItemProps) {
|
|||||||
triggerComponent={
|
triggerComponent={
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
icon={<DeleteIcon />}
|
icon={<DeleteIcon />}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
aria-label={t('modelmanager:deleteConfig')}
|
aria-label={t('modelmanager:deleteConfig')}
|
||||||
isDisabled={status === 'active' || isProcessing || !isConnected}
|
isDisabled={status === 'active' || isProcessing || !isConnected}
|
||||||
className=" modal-close-btn"
|
className=" modal-close-btn"
|
||||||
@ -106,7 +106,7 @@ export default function ModelListItem(props: ModelListItemProps) {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex rowGap={'1rem'} flexDirection="column">
|
<Flex rowGap="1rem" flexDirection="column">
|
||||||
<p style={{ fontWeight: 'bold' }}>{t('modelmanager:deleteMsg1')}</p>
|
<p style={{ fontWeight: 'bold' }}>{t('modelmanager:deleteMsg1')}</p>
|
||||||
<p style={{ color: 'var(--text-color-secondary' }}>
|
<p style={{ color: 'var(--text-color-secondary' }}>
|
||||||
{t('modelmanager:deleteMsg2')}
|
{t('modelmanager:deleteMsg2')}
|
||||||
|
@ -58,11 +58,7 @@ export default function ModelManagerModal({
|
|||||||
<ModalHeader fontWeight="bold">
|
<ModalHeader fontWeight="bold">
|
||||||
{t('modelmanager:modelManager')}
|
{t('modelmanager:modelManager')}
|
||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<Flex
|
<Flex padding="0 1.5rem 1.5rem 1.5rem" width="100%" columnGap="2rem">
|
||||||
padding={'0 1.5rem 1.5rem 1.5rem'}
|
|
||||||
width="100%"
|
|
||||||
columnGap={'2rem'}
|
|
||||||
>
|
|
||||||
<ModelList />
|
<ModelList />
|
||||||
{openModel && model_list[openModel]['format'] === 'diffusers' ? (
|
{openModel && model_list[openModel]['format'] === 'diffusers' ? (
|
||||||
<DiffusersModelEdit />
|
<DiffusersModelEdit />
|
||||||
|
@ -43,16 +43,16 @@ function ModelExistsTag() {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
position={'absolute'}
|
position="absolute"
|
||||||
zIndex={2}
|
zIndex={2}
|
||||||
right={4}
|
right={4}
|
||||||
top={4}
|
top={4}
|
||||||
fontSize="0.7rem"
|
fontSize="0.7rem"
|
||||||
fontWeight={'bold'}
|
fontWeight="bold"
|
||||||
backgroundColor={'var(--accent-color)'}
|
backgroundColor="var(--accent-color)"
|
||||||
padding={'0.2rem 0.5rem'}
|
padding="0.2rem 0.5rem"
|
||||||
borderRadius="0.2rem"
|
borderRadius="0.2rem"
|
||||||
alignItems={'center'}
|
alignItems="center"
|
||||||
>
|
>
|
||||||
{t('modelmanager:modelExists')}
|
{t('modelmanager:modelExists')}
|
||||||
</Box>
|
</Box>
|
||||||
@ -87,7 +87,7 @@ function SearchModelEntry({
|
|||||||
value={model.name}
|
value={model.name}
|
||||||
label={
|
label={
|
||||||
<>
|
<>
|
||||||
<VStack alignItems={'start'}>
|
<VStack alignItems="start">
|
||||||
<p style={{ fontWeight: 'bold' }}>{model.name}</p>
|
<p style={{ fontWeight: 'bold' }}>{model.name}</p>
|
||||||
<p style={{ fontStyle: 'italic' }}>{model.location}</p>
|
<p style={{ fontStyle: 'italic' }}>{model.location}</p>
|
||||||
</VStack>
|
</VStack>
|
||||||
@ -96,9 +96,9 @@ function SearchModelEntry({
|
|||||||
isChecked={modelsToAdd.includes(model.name)}
|
isChecked={modelsToAdd.includes(model.name)}
|
||||||
isDisabled={existingModels.includes(model.location)}
|
isDisabled={existingModels.includes(model.location)}
|
||||||
onChange={foundModelsChangeHandler}
|
onChange={foundModelsChangeHandler}
|
||||||
padding={'1rem'}
|
padding="1rem"
|
||||||
backgroundColor={'var(--background-color)'}
|
backgroundColor="var(--background-color)"
|
||||||
borderRadius={'0.5rem'}
|
borderRadius="0.5rem"
|
||||||
_checked={{
|
_checked={{
|
||||||
backgroundColor: 'var(--accent-color)',
|
backgroundColor: 'var(--accent-color)',
|
||||||
color: 'var(--text-color)',
|
color: 'var(--text-color)',
|
||||||
@ -224,12 +224,12 @@ export default function SearchModels() {
|
|||||||
<>
|
<>
|
||||||
{searchFolder ? (
|
{searchFolder ? (
|
||||||
<Flex
|
<Flex
|
||||||
flexDirection={'column'}
|
flexDirection="column"
|
||||||
padding={'1rem'}
|
padding="1rem"
|
||||||
backgroundColor={'var(--background-color)'}
|
backgroundColor="var(--background-color)"
|
||||||
borderRadius="0.5rem"
|
borderRadius="0.5rem"
|
||||||
rowGap={'0.5rem'}
|
rowGap="0.5rem"
|
||||||
position={'relative'}
|
position="relative"
|
||||||
>
|
>
|
||||||
<p
|
<p
|
||||||
style={{
|
style={{
|
||||||
@ -252,7 +252,7 @@ export default function SearchModels() {
|
|||||||
aria-label={t('modelmanager:scanAgain')}
|
aria-label={t('modelmanager:scanAgain')}
|
||||||
tooltip={t('modelmanager:scanAgain')}
|
tooltip={t('modelmanager:scanAgain')}
|
||||||
icon={<BiReset />}
|
icon={<BiReset />}
|
||||||
position={'absolute'}
|
position="absolute"
|
||||||
right={16}
|
right={16}
|
||||||
fontSize={18}
|
fontSize={18}
|
||||||
disabled={isProcessing}
|
disabled={isProcessing}
|
||||||
@ -261,7 +261,7 @@ export default function SearchModels() {
|
|||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
aria-label={t('modelmanager:clearCheckpointFolder')}
|
aria-label={t('modelmanager:clearCheckpointFolder')}
|
||||||
icon={<FaPlus style={{ transform: 'rotate(45deg)' }} />}
|
icon={<FaPlus style={{ transform: 'rotate(45deg)' }} />}
|
||||||
position={'absolute'}
|
position="absolute"
|
||||||
right={5}
|
right={5}
|
||||||
onClick={resetSearchModelHandler}
|
onClick={resetSearchModelHandler}
|
||||||
/>
|
/>
|
||||||
@ -300,8 +300,8 @@ export default function SearchModels() {
|
|||||||
</Formik>
|
</Formik>
|
||||||
)}
|
)}
|
||||||
{foundModels && (
|
{foundModels && (
|
||||||
<Flex flexDirection={'column'} rowGap={'1rem'}>
|
<Flex flexDirection="column" rowGap="1rem">
|
||||||
<Flex justifyContent={'space-between'} alignItems="center">
|
<Flex justifyContent="space-between" alignItems="center">
|
||||||
<p>
|
<p>
|
||||||
{t('modelmanager:modelsFound')}: {foundModels.length}
|
{t('modelmanager:modelsFound')}: {foundModels.length}
|
||||||
</p>
|
</p>
|
||||||
@ -309,8 +309,8 @@ export default function SearchModels() {
|
|||||||
{t('modelmanager:selected')}: {modelsToAdd.length}
|
{t('modelmanager:selected')}: {modelsToAdd.length}
|
||||||
</p>
|
</p>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex columnGap={'0.5rem'} justifyContent={'space-between'}>
|
<Flex columnGap="0.5rem" justifyContent="space-between">
|
||||||
<Flex columnGap={'0.5rem'}>
|
<Flex columnGap="0.5rem">
|
||||||
<IAIButton
|
<IAIButton
|
||||||
isDisabled={modelsToAdd.length === foundModels.length}
|
isDisabled={modelsToAdd.length === foundModels.length}
|
||||||
onClick={addAllToSelected}
|
onClick={addAllToSelected}
|
||||||
|
@ -206,7 +206,7 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="settings-modal-reset">
|
<div className="settings-modal-reset">
|
||||||
<Heading size={'md'}>{t('settings:resetWebUI')}</Heading>
|
<Heading size="md">{t('settings:resetWebUI')}</Heading>
|
||||||
<Button colorScheme="red" onClick={handleClickResetWebUI}>
|
<Button colorScheme="red" onClick={handleClickResetWebUI}>
|
||||||
{t('settings:resetWebUI')}
|
{t('settings:resetWebUI')}
|
||||||
</Button>
|
</Button>
|
||||||
@ -232,8 +232,8 @@ const SettingsModal = ({ children }: SettingsModalProps) => {
|
|||||||
<ModalOverlay bg="blackAlpha.300" backdropFilter="blur(40px)" />
|
<ModalOverlay bg="blackAlpha.300" backdropFilter="blur(40px)" />
|
||||||
<ModalContent>
|
<ModalContent>
|
||||||
<ModalBody pb={6} pt={6}>
|
<ModalBody pb={6} pt={6}>
|
||||||
<Flex justifyContent={'center'}>
|
<Flex justifyContent="center">
|
||||||
<Text fontSize={'lg'}>
|
<Text fontSize="lg">
|
||||||
<Text>{t('settings:resetComplete')}</Text>
|
<Text>{t('settings:resetComplete')}</Text>
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -56,7 +56,7 @@ const SiteHeader = () => {
|
|||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
aria-label={t('modelmanager:modelManager')}
|
aria-label={t('modelmanager:modelManager')}
|
||||||
tooltip={t('modelmanager:modelManager')}
|
tooltip={t('modelmanager:modelManager')}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
@ -68,7 +68,7 @@ const SiteHeader = () => {
|
|||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
aria-label={t('common:hotkeysLabel')}
|
aria-label={t('common:hotkeysLabel')}
|
||||||
tooltip={t('common:hotkeysLabel')}
|
tooltip={t('common:hotkeysLabel')}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
@ -86,7 +86,7 @@ const SiteHeader = () => {
|
|||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
icon={
|
icon={
|
||||||
<Link isExternal href="http://github.com/invoke-ai/InvokeAI/issues">
|
<Link isExternal href="http://github.com/invoke-ai/InvokeAI/issues">
|
||||||
<FaBug />
|
<FaBug />
|
||||||
@ -100,7 +100,7 @@ const SiteHeader = () => {
|
|||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
icon={
|
icon={
|
||||||
<Link isExternal href="http://github.com/invoke-ai/InvokeAI">
|
<Link isExternal href="http://github.com/invoke-ai/InvokeAI">
|
||||||
<FaGithub />
|
<FaGithub />
|
||||||
@ -114,7 +114,7 @@ const SiteHeader = () => {
|
|||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
icon={
|
icon={
|
||||||
<Link isExternal href="https://discord.gg/ZmtBAhwWhy">
|
<Link isExternal href="https://discord.gg/ZmtBAhwWhy">
|
||||||
<FaDiscord />
|
<FaDiscord />
|
||||||
@ -129,7 +129,7 @@ const SiteHeader = () => {
|
|||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={22}
|
fontSize={22}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
icon={<MdSettings />}
|
icon={<MdSettings />}
|
||||||
/>
|
/>
|
||||||
</SettingsModal>
|
</SettingsModal>
|
||||||
|
@ -46,7 +46,7 @@ export default function ThemeChanger() {
|
|||||||
width: '6rem',
|
width: '6rem',
|
||||||
}}
|
}}
|
||||||
leftIcon={currentTheme === theme ? <FaCheck /> : undefined}
|
leftIcon={currentTheme === theme ? <FaCheck /> : undefined}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
onClick={() => handleChangeTheme(theme)}
|
onClick={() => handleChangeTheme(theme)}
|
||||||
key={theme}
|
key={theme}
|
||||||
>
|
>
|
||||||
@ -64,7 +64,7 @@ export default function ThemeChanger() {
|
|||||||
triggerComponent={
|
triggerComponent={
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
aria-label={t('common:themeLabel')}
|
aria-label={t('common:themeLabel')}
|
||||||
size={'sm'}
|
size="sm"
|
||||||
variant="link"
|
variant="link"
|
||||||
data-variant="link"
|
data-variant="link"
|
||||||
fontSize={20}
|
fontSize={20}
|
||||||
@ -72,7 +72,7 @@ export default function ThemeChanger() {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<VStack align={'stretch'}>{renderThemeOptions()}</VStack>
|
<VStack align="stretch">{renderThemeOptions()}</VStack>
|
||||||
</IAIPopover>
|
</IAIPopover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,9 @@ export default function InitImagePreview() {
|
|||||||
{initialImage && (
|
{initialImage && (
|
||||||
<div className="init-image-preview">
|
<div className="init-image-preview">
|
||||||
<Image
|
<Image
|
||||||
fit={'contain'}
|
fit="contain"
|
||||||
maxWidth={'100%'}
|
maxWidth="100%"
|
||||||
maxHeight={'100%'}
|
maxHeight="100%"
|
||||||
src={
|
src={
|
||||||
typeof initialImage === 'string' ? initialImage : initialImage.url
|
typeof initialImage === 'string' ? initialImage : initialImage.url
|
||||||
}
|
}
|
||||||
|
@ -9,10 +9,10 @@ export default function InitialImageOverlay() {
|
|||||||
|
|
||||||
return initialImage ? (
|
return initialImage ? (
|
||||||
<Image
|
<Image
|
||||||
fit={'contain'}
|
fit="contain"
|
||||||
src={typeof initialImage === 'string' ? initialImage : initialImage.url}
|
src={typeof initialImage === 'string' ? initialImage : initialImage.url}
|
||||||
rounded={'md'}
|
rounded="md"
|
||||||
className={'checkerboard'}
|
className="checkerboard"
|
||||||
/>
|
/>
|
||||||
) : null;
|
) : null;
|
||||||
}
|
}
|
||||||
|
@ -31,32 +31,32 @@ export interface InvokeTabInfo {
|
|||||||
|
|
||||||
export const tabDict: Record<InvokeTabName, InvokeTabInfo> = {
|
export const tabDict: Record<InvokeTabName, InvokeTabInfo> = {
|
||||||
txt2img: {
|
txt2img: {
|
||||||
title: <TextToImageIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <TextToImageIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <TextToImageWorkarea />,
|
workarea: <TextToImageWorkarea />,
|
||||||
tooltip: 'Text To Image',
|
tooltip: 'Text To Image',
|
||||||
},
|
},
|
||||||
img2img: {
|
img2img: {
|
||||||
title: <ImageToImageIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <ImageToImageIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <ImageToImageWorkarea />,
|
workarea: <ImageToImageWorkarea />,
|
||||||
tooltip: 'Image To Image',
|
tooltip: 'Image To Image',
|
||||||
},
|
},
|
||||||
unifiedCanvas: {
|
unifiedCanvas: {
|
||||||
title: <UnifiedCanvasIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <UnifiedCanvasIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <UnifiedCanvasWorkarea />,
|
workarea: <UnifiedCanvasWorkarea />,
|
||||||
tooltip: 'Unified Canvas',
|
tooltip: 'Unified Canvas',
|
||||||
},
|
},
|
||||||
nodes: {
|
nodes: {
|
||||||
title: <NodesIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <NodesIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <NodesWIP />,
|
workarea: <NodesWIP />,
|
||||||
tooltip: 'Nodes',
|
tooltip: 'Nodes',
|
||||||
},
|
},
|
||||||
postprocess: {
|
postprocess: {
|
||||||
title: <PostprocessingIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <PostprocessingIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <PostProcessingWIP />,
|
workarea: <PostProcessingWIP />,
|
||||||
tooltip: 'Post Processing',
|
tooltip: 'Post Processing',
|
||||||
},
|
},
|
||||||
training: {
|
training: {
|
||||||
title: <TrainingIcon fill={'black'} boxSize={'2.5rem'} />,
|
title: <TrainingIcon fill="black" boxSize="2.5rem" />,
|
||||||
workarea: <TrainingWIP />,
|
workarea: <TrainingWIP />,
|
||||||
tooltip: 'Training',
|
tooltip: 'Training',
|
||||||
},
|
},
|
||||||
@ -122,7 +122,7 @@ export default function InvokeTabs() {
|
|||||||
key={key}
|
key={key}
|
||||||
hasArrow
|
hasArrow
|
||||||
label={tabDict[key as keyof typeof tabDict].tooltip}
|
label={tabDict[key as keyof typeof tabDict].tooltip}
|
||||||
placement={'right'}
|
placement="right"
|
||||||
>
|
>
|
||||||
<Tab>{tabDict[key as keyof typeof tabDict].title}</Tab>
|
<Tab>{tabDict[key as keyof typeof tabDict].title}</Tab>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
@ -147,7 +147,7 @@ export default function InvokeTabs() {
|
|||||||
<Tabs
|
<Tabs
|
||||||
isLazy
|
isLazy
|
||||||
className="app-tabs"
|
className="app-tabs"
|
||||||
variant={'unstyled'}
|
variant="unstyled"
|
||||||
defaultIndex={activeTab}
|
defaultIndex={activeTab}
|
||||||
index={activeTab}
|
index={activeTab}
|
||||||
onChange={(index: number) => {
|
onChange={(index: number) => {
|
||||||
|
@ -45,21 +45,16 @@ const UnifiedCanvasDisplayBeta = () => {
|
|||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'workarea-single-view'}>
|
<div className="workarea-single-view">
|
||||||
<Flex
|
<Flex
|
||||||
flexDirection={'row'}
|
flexDirection="row"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
columnGap={'1rem'}
|
columnGap="1rem"
|
||||||
padding="1rem"
|
padding="1rem"
|
||||||
>
|
>
|
||||||
<UnifiedCanvasToolbarBeta />
|
<UnifiedCanvasToolbarBeta />
|
||||||
<Flex
|
<Flex width="100%" height="100%" flexDirection="column" rowGap="1rem">
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
flexDirection={'column'}
|
|
||||||
rowGap={'1rem'}
|
|
||||||
>
|
|
||||||
<UnifiedCanvasToolSettingsBeta />
|
<UnifiedCanvasToolSettingsBeta />
|
||||||
{doesCanvasNeedScaling ? <IAICanvasResizer /> : <IAICanvas />}
|
{doesCanvasNeedScaling ? <IAICanvasResizer /> : <IAICanvas />}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -4,7 +4,7 @@ import UnifiedCanvasLimitStrokesToBox from './UnifiedCanvasLimitStrokesToBox';
|
|||||||
|
|
||||||
export default function UnifiedCanvasBaseBrushSettings() {
|
export default function UnifiedCanvasBaseBrushSettings() {
|
||||||
return (
|
return (
|
||||||
<Flex gap={'1rem'} alignItems="center">
|
<Flex gap="1rem" alignItems="center">
|
||||||
<UnifiedCanvasBrushSettings />
|
<UnifiedCanvasBrushSettings />
|
||||||
<UnifiedCanvasLimitStrokesToBox />
|
<UnifiedCanvasLimitStrokesToBox />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -4,7 +4,7 @@ import UnifiedCanvasColorPicker from './UnifiedCanvasColorPicker';
|
|||||||
|
|
||||||
export default function UnifiedCanvasBrushSettings() {
|
export default function UnifiedCanvasBrushSettings() {
|
||||||
return (
|
return (
|
||||||
<Flex columnGap={'1rem'} alignItems="center">
|
<Flex columnGap="1rem" alignItems="center">
|
||||||
<UnifiedCanvasBrushSize />
|
<UnifiedCanvasBrushSize />
|
||||||
<UnifiedCanvasColorPicker />
|
<UnifiedCanvasColorPicker />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -49,7 +49,7 @@ export default function UnifiedCanvasBrushSize() {
|
|||||||
onChange={(newSize) => dispatch(setBrushSize(newSize))}
|
onChange={(newSize) => dispatch(setBrushSize(newSize))}
|
||||||
sliderNumberInputProps={{ max: 500 }}
|
sliderNumberInputProps={{ max: 500 }}
|
||||||
inputReadOnly={false}
|
inputReadOnly={false}
|
||||||
width={'100px'}
|
width="100px"
|
||||||
isCompact
|
isCompact
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -14,7 +14,7 @@ export default function UnifiedCanvasClearMask() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<IAIButton
|
<IAIButton
|
||||||
size={'sm'}
|
size="sm"
|
||||||
leftIcon={<FaTrash />}
|
leftIcon={<FaTrash />}
|
||||||
onClick={handleClearMask}
|
onClick={handleClearMask}
|
||||||
tooltip={`${t('unifiedcanvas:clearMask')} (Shift+C)`}
|
tooltip={`${t('unifiedcanvas:clearMask')} (Shift+C)`}
|
||||||
|
@ -92,7 +92,7 @@ export default function UnifiedCanvasColorPicker() {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex minWidth={'15rem'} direction={'column'} gap={'1rem'} width={'100%'}>
|
<Flex minWidth="15rem" direction="column" gap="1rem" width="100%">
|
||||||
{layer === 'base' && (
|
{layer === 'base' && (
|
||||||
<IAIColorPicker
|
<IAIColorPicker
|
||||||
style={{
|
style={{
|
||||||
|
@ -6,7 +6,7 @@ import UnifiedCanvasPreserveMask from './UnifiedCanvasPreserveMask';
|
|||||||
|
|
||||||
export default function UnifiedCanvasMaskBrushSettings() {
|
export default function UnifiedCanvasMaskBrushSettings() {
|
||||||
return (
|
return (
|
||||||
<Flex gap={'1rem'} alignItems="center">
|
<Flex gap="1rem" alignItems="center">
|
||||||
<UnifiedCanvasBrushSettings />
|
<UnifiedCanvasBrushSettings />
|
||||||
<UnifiedCanvasEnableMask />
|
<UnifiedCanvasEnableMask />
|
||||||
<UnifiedCanvasPreserveMask />
|
<UnifiedCanvasPreserveMask />
|
||||||
|
@ -5,7 +5,7 @@ import UnifiedCanvasSnapToGrid from './UnifiedCanvasSnapToGrid';
|
|||||||
|
|
||||||
export default function UnifiedCanvasMoveSettings() {
|
export default function UnifiedCanvasMoveSettings() {
|
||||||
return (
|
return (
|
||||||
<Flex alignItems={'center'} gap="1rem">
|
<Flex alignItems="center" gap="1rem">
|
||||||
<UnifiedCanvasShowGrid />
|
<UnifiedCanvasShowGrid />
|
||||||
<UnifiedCanvasSnapToGrid />
|
<UnifiedCanvasSnapToGrid />
|
||||||
<UnifiedCanvasDarkenOutsideSelection />
|
<UnifiedCanvasDarkenOutsideSelection />
|
||||||
|
@ -68,7 +68,7 @@ const UnifiedCanvasSettings = () => {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Flex direction={'column'} gap={'0.5rem'}>
|
<Flex direction="column" gap="0.5rem">
|
||||||
<IAICheckbox
|
<IAICheckbox
|
||||||
label={t('unifiedcanvas:showIntermediates')}
|
label={t('unifiedcanvas:showIntermediates')}
|
||||||
isChecked={shouldShowIntermediates}
|
isChecked={shouldShowIntermediates}
|
||||||
|
@ -28,7 +28,7 @@ export default function UnifiedCanvasToolSettingsBeta() {
|
|||||||
const { tool, layer } = useAppSelector(selector);
|
const { tool, layer } = useAppSelector(selector);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex height="2rem" minHeight="2rem" maxHeight="2rem" alignItems={'center'}>
|
<Flex height="2rem" minHeight="2rem" maxHeight="2rem" alignItems="center">
|
||||||
{layer == 'base' && ['brush', 'eraser', 'colorPicker'].includes(tool) && (
|
{layer == 'base' && ['brush', 'eraser', 'colorPicker'].includes(tool) && (
|
||||||
<UnifiedCanvasBaseBrushSettings />
|
<UnifiedCanvasBaseBrushSettings />
|
||||||
)}
|
)}
|
||||||
|
@ -25,7 +25,7 @@ export default function UnifiedCanvasProcessingButtons() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDirection={'column'} gap="0.5rem">
|
<Flex flexDirection="column" gap="0.5rem">
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
tooltip={`${t('parameters:showOptionsPanel')} (O)`}
|
tooltip={`${t('parameters:showOptionsPanel')} (O)`}
|
||||||
tooltipProps={{ placement: 'top' }}
|
tooltipProps={{ placement: 'top' }}
|
||||||
@ -38,7 +38,7 @@ export default function UnifiedCanvasProcessingButtons() {
|
|||||||
<InvokeButton iconButton />
|
<InvokeButton iconButton />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex>
|
<Flex>
|
||||||
<CancelButton width={'100%'} height={'40px'} />
|
<CancelButton width="100%" height="40px" />
|
||||||
</Flex>
|
</Flex>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
@ -113,7 +113,7 @@ const UnifiedCanvasToolSelect = () => {
|
|||||||
const handleEraseBoundingBox = () => dispatch(addEraseRect());
|
const handleEraseBoundingBox = () => dispatch(addEraseRect());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDirection={'column'} gap={'0.5rem'}>
|
<Flex flexDirection="column" gap="0.5rem">
|
||||||
<ButtonGroup>
|
<ButtonGroup>
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
aria-label={`${t('unifiedcanvas:brush')} (B)`}
|
aria-label={`${t('unifiedcanvas:brush')} (B)`}
|
||||||
@ -155,7 +155,7 @@ const UnifiedCanvasToolSelect = () => {
|
|||||||
data-selected={tool === 'colorPicker' && !isStaging}
|
data-selected={tool === 'colorPicker' && !isStaging}
|
||||||
isDisabled={isStaging}
|
isDisabled={isStaging}
|
||||||
onClick={handleSelectColorPickerTool}
|
onClick={handleSelectColorPickerTool}
|
||||||
width={'max-content'}
|
width="max-content"
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
@ -23,30 +23,30 @@ const UnifiedCanvasToolbarBeta = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex flexDirection={'column'} rowGap="0.5rem" width="6rem">
|
<Flex flexDirection="column" rowGap="0.5rem" width="6rem">
|
||||||
<UnifiedCanvasLayerSelect />
|
<UnifiedCanvasLayerSelect />
|
||||||
<UnifiedCanvasToolSelect />
|
<UnifiedCanvasToolSelect />
|
||||||
|
|
||||||
<Flex gap={'0.5rem'}>
|
<Flex gap="0.5rem">
|
||||||
<UnifiedCanvasMoveTool />
|
<UnifiedCanvasMoveTool />
|
||||||
<UnifiedCanvasResetView />
|
<UnifiedCanvasResetView />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex columnGap={'0.5rem'}>
|
<Flex columnGap="0.5rem">
|
||||||
<UnifiedCanvasMergeVisible />
|
<UnifiedCanvasMergeVisible />
|
||||||
<UnifiedCanvasSaveToGallery />
|
<UnifiedCanvasSaveToGallery />
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex columnGap={'0.5rem'}>
|
<Flex columnGap="0.5rem">
|
||||||
<UnifiedCanvasCopyToClipboard />
|
<UnifiedCanvasCopyToClipboard />
|
||||||
<UnifiedCanvasDownloadImage />
|
<UnifiedCanvasDownloadImage />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex gap={'0.5rem'}>
|
<Flex gap="0.5rem">
|
||||||
<IAICanvasUndoButton />
|
<IAICanvasUndoButton />
|
||||||
<IAICanvasRedoButton />
|
<IAICanvasRedoButton />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
||||||
<Flex gap={'0.5rem'}>
|
<Flex gap="0.5rem">
|
||||||
<UnifiedCanvasFileUploader />
|
<UnifiedCanvasFileUploader />
|
||||||
<UnifiedCanvasResetCanvas />
|
<UnifiedCanvasResetCanvas />
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -43,7 +43,7 @@ const UnifiedCanvasDisplay = () => {
|
|||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'workarea-single-view'}>
|
<div className="workarea-single-view">
|
||||||
<div className="workarea-split-view-left">
|
<div className="workarea-split-view-left">
|
||||||
<div className="inpainting-main-area">
|
<div className="inpainting-main-area">
|
||||||
<IAICanvasOutpaintingControls />
|
<IAICanvasOutpaintingControls />
|
||||||
|
Loading…
Reference in New Issue
Block a user