mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
WebUI Bug Fixes & Tweaks
This commit is contained in:
parent
89d130edf4
commit
081271d6a1
@ -1,7 +1,13 @@
|
|||||||
import { IconButtonProps, IconButton, Tooltip } from '@chakra-ui/react';
|
import {
|
||||||
|
IconButtonProps,
|
||||||
|
IconButton,
|
||||||
|
Tooltip,
|
||||||
|
PlacementWithLogical,
|
||||||
|
} from '@chakra-ui/react';
|
||||||
|
|
||||||
interface Props extends IconButtonProps {
|
interface Props extends IconButtonProps {
|
||||||
tooltip?: string;
|
tooltip?: string;
|
||||||
|
tooltipPlacement?: PlacementWithLogical | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -10,10 +16,14 @@ interface Props extends IconButtonProps {
|
|||||||
* TODO: Get rid of this.
|
* TODO: Get rid of this.
|
||||||
*/
|
*/
|
||||||
const IAIIconButton = (props: Props) => {
|
const IAIIconButton = (props: Props) => {
|
||||||
const { tooltip = '', onClick, ...rest } = props;
|
const { tooltip = '', tooltipPlacement = 'bottom', onClick, ...rest } = props;
|
||||||
return (
|
return (
|
||||||
<Tooltip label={tooltip}>
|
<Tooltip label={tooltip} hasArrow placement={tooltipPlacement}>
|
||||||
<IconButton {...rest} cursor={onClick ? 'pointer' : 'unset'} onClick={onClick}/>
|
<IconButton
|
||||||
|
{...rest}
|
||||||
|
cursor={onClick ? 'pointer' : 'unset'}
|
||||||
|
onClick={onClick}
|
||||||
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
|
|||||||
import { MdClear, MdPhotoLibrary } from 'react-icons/md';
|
import { MdClear, MdPhotoLibrary } from 'react-icons/md';
|
||||||
import { requestImages } from '../../app/socketio/actions';
|
import { requestImages } from '../../app/socketio/actions';
|
||||||
import { RootState, useAppDispatch, useAppSelector } from '../../app/store';
|
import { RootState, useAppDispatch, useAppSelector } from '../../app/store';
|
||||||
|
import IAIIconButton from '../../common/components/IAIIconButton';
|
||||||
import {
|
import {
|
||||||
selectNextImage,
|
selectNextImage,
|
||||||
selectPrevImage,
|
selectPrevImage,
|
||||||
@ -61,13 +62,15 @@ export default function ImageGallery() {
|
|||||||
return (
|
return (
|
||||||
<div className="image-gallery-area">
|
<div className="image-gallery-area">
|
||||||
{!shouldShowGallery && (
|
{!shouldShowGallery && (
|
||||||
<Button
|
<IAIIconButton
|
||||||
colorScheme="teal"
|
tooltip="Show Gallery"
|
||||||
|
tooltipPlacement="top"
|
||||||
|
aria-label="Show Gallery"
|
||||||
onClick={handleShowGalleryToggle}
|
onClick={handleShowGalleryToggle}
|
||||||
className="image-gallery-popup-btn"
|
className="image-gallery-popup-btn"
|
||||||
>
|
>
|
||||||
<MdPhotoLibrary />
|
<MdPhotoLibrary />
|
||||||
</Button>
|
</IAIIconButton>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{shouldShowGallery && (
|
{shouldShowGallery && (
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
background: var(--tab-panel-bg);
|
background: var(--tab-panel-bg);
|
||||||
border-radius: 0 0 0.4rem 0.4rem;
|
border-radius: 0 0 0.4rem 0.4rem;
|
||||||
border: 2px solid var(--tab-hover-color);
|
border: 2px solid var(--tab-hover-color);
|
||||||
padding: .75rem 1rem .75rem 1rem;
|
padding: 0.75rem 1rem 0.75rem 1rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: repeat(auto-fill, 1fr);
|
grid-auto-rows: max-content;
|
||||||
grid-row-gap: 0.5rem;
|
grid-row-gap: 0.5rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ const Console = () => {
|
|||||||
</Resizable>
|
</Resizable>
|
||||||
)}
|
)}
|
||||||
{shouldShowLogViewer && (
|
{shouldShowLogViewer && (
|
||||||
<Tooltip label={shouldAutoscroll ? 'Autoscroll On' : 'Autoscroll Off'}>
|
<Tooltip hasArrow label={shouldAutoscroll ? 'Autoscroll On' : 'Autoscroll Off'}>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={`console-autoscroll-icon-button ${
|
className={`console-autoscroll-icon-button ${
|
||||||
shouldAutoscroll && 'autoscroll-enabled'
|
shouldAutoscroll && 'autoscroll-enabled'
|
||||||
@ -113,7 +113,7 @@ const Console = () => {
|
|||||||
/>
|
/>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
<Tooltip label={shouldShowLogViewer ? 'Hide Console' : 'Show Console'}>
|
<Tooltip hasArrow label={shouldShowLogViewer ? 'Hide Console' : 'Show Console'}>
|
||||||
<IconButton
|
<IconButton
|
||||||
className={`console-toggle-icon-button ${
|
className={`console-toggle-icon-button ${
|
||||||
(hasError || !wasErrorSeen) && 'error-seen'
|
(hasError || !wasErrorSeen) && 'error-seen'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IconButton, Link, useColorMode } from '@chakra-ui/react';
|
import { IconButton, Link, Tooltip, useColorMode } from '@chakra-ui/react';
|
||||||
import { useHotkeys } from 'react-hotkeys-hook';
|
import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
|
|
||||||
import { FaSun, FaMoon, FaGithub } from 'react-icons/fa';
|
import { FaSun, FaMoon, FaGithub } from 'react-icons/fa';
|
||||||
@ -61,41 +61,47 @@ const SiteHeader = () => {
|
|||||||
/>
|
/>
|
||||||
</HotkeysModal>
|
</HotkeysModal>
|
||||||
|
|
||||||
<IconButton
|
<Tooltip hasArrow label="Report Bug" placement={'bottom'}>
|
||||||
aria-label="Link to Github Issues"
|
<IconButton
|
||||||
variant="link"
|
aria-label="Link to Github Issues"
|
||||||
fontSize={23}
|
variant="link"
|
||||||
size={'sm'}
|
fontSize={23}
|
||||||
icon={
|
size={'sm'}
|
||||||
<Link
|
icon={
|
||||||
isExternal
|
<Link
|
||||||
href="http://github.com/lstein/stable-diffusion/issues"
|
isExternal
|
||||||
>
|
href="http://github.com/lstein/stable-diffusion/issues"
|
||||||
<MdHelp />
|
>
|
||||||
</Link>
|
<MdHelp />
|
||||||
}
|
</Link>
|
||||||
/>
|
}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<IconButton
|
<Tooltip hasArrow label="Github" placement={'bottom'}>
|
||||||
aria-label="Link to Github Repo"
|
<IconButton
|
||||||
variant="link"
|
aria-label="Link to Github Repo"
|
||||||
fontSize={20}
|
variant="link"
|
||||||
size={'sm'}
|
fontSize={20}
|
||||||
icon={
|
size={'sm'}
|
||||||
<Link isExternal href="http://github.com/lstein/stable-diffusion">
|
icon={
|
||||||
<FaGithub />
|
<Link isExternal href="http://github.com/lstein/stable-diffusion">
|
||||||
</Link>
|
<FaGithub />
|
||||||
}
|
</Link>
|
||||||
/>
|
}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
<IconButton
|
<Tooltip hasArrow label="Theme" placement={'bottom'}>
|
||||||
aria-label="Toggle Dark Mode"
|
<IconButton
|
||||||
onClick={toggleColorMode}
|
aria-label="Toggle Dark Mode"
|
||||||
variant="link"
|
onClick={toggleColorMode}
|
||||||
size={'sm'}
|
variant="link"
|
||||||
fontSize={colorModeIconFontSize}
|
size={'sm'}
|
||||||
icon={colorModeIcon}
|
fontSize={colorModeIconFontSize}
|
||||||
/>
|
icon={colorModeIcon}
|
||||||
|
/>
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -88,6 +88,7 @@ export default function InvokeTabs() {
|
|||||||
tabsToRender.push(
|
tabsToRender.push(
|
||||||
<Tooltip
|
<Tooltip
|
||||||
key={key}
|
key={key}
|
||||||
|
hasArrow
|
||||||
label={tab_dict[key as keyof typeof tab_dict].tooltip}
|
label={tab_dict[key as keyof typeof tab_dict].tooltip}
|
||||||
placement={'right'}
|
placement={'right'}
|
||||||
>
|
>
|
||||||
|
@ -6,3 +6,15 @@
|
|||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user