mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): hack for hiding pinned panels
This commit is contained in:
parent
dd2d96a50f
commit
ad2f1b7b36
@ -11,12 +11,12 @@ import { activeTabNameSelector, uiSelector } from '../store/uiSelectors';
|
|||||||
const floatingGalleryButtonSelector = createSelector(
|
const floatingGalleryButtonSelector = createSelector(
|
||||||
[activeTabNameSelector, uiSelector],
|
[activeTabNameSelector, uiSelector],
|
||||||
(activeTabName, ui) => {
|
(activeTabName, ui) => {
|
||||||
const { shouldPinGallery } = ui;
|
const { shouldPinGallery, shouldShowGallery } = ui;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
shouldPinGallery,
|
shouldPinGallery,
|
||||||
shouldShowGalleryButton:
|
shouldShowGalleryButton:
|
||||||
!shouldPinGallery &&
|
(!shouldPinGallery || !shouldShowGallery) &&
|
||||||
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName),
|
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -23,17 +23,22 @@ const floatingButtonStyles: ChakraProps['sx'] = {
|
|||||||
export const floatingParametersPanelButtonSelector = createSelector(
|
export const floatingParametersPanelButtonSelector = createSelector(
|
||||||
[uiSelector, activeTabNameSelector],
|
[uiSelector, activeTabNameSelector],
|
||||||
(ui, activeTabName) => {
|
(ui, activeTabName) => {
|
||||||
const { shouldPinParametersPanel, shouldUseCanvasBetaLayout } = ui;
|
const {
|
||||||
|
shouldPinParametersPanel,
|
||||||
|
shouldUseCanvasBetaLayout,
|
||||||
|
shouldShowParametersPanel,
|
||||||
|
} = ui;
|
||||||
|
|
||||||
const canvasBetaLayoutCheck =
|
const canvasBetaLayoutCheck =
|
||||||
shouldUseCanvasBetaLayout && activeTabName === 'unifiedCanvas';
|
shouldUseCanvasBetaLayout && activeTabName === 'unifiedCanvas';
|
||||||
|
|
||||||
const shouldShowProcessButtons =
|
const shouldShowProcessButtons =
|
||||||
!canvasBetaLayoutCheck && !shouldPinParametersPanel;
|
!canvasBetaLayoutCheck &&
|
||||||
|
(!shouldPinParametersPanel || !shouldShowParametersPanel);
|
||||||
|
|
||||||
const shouldShowParametersPanelButton =
|
const shouldShowParametersPanelButton =
|
||||||
!canvasBetaLayoutCheck &&
|
!canvasBetaLayoutCheck &&
|
||||||
!shouldPinParametersPanel &&
|
(!shouldPinParametersPanel || !shouldShowParametersPanel) &&
|
||||||
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName);
|
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -154,19 +154,21 @@ const ResizableDrawer = ({
|
|||||||
<Slide
|
<Slide
|
||||||
direction={slideDirection}
|
direction={slideDirection}
|
||||||
in={isOpen}
|
in={isOpen}
|
||||||
motionProps={{ initial: false }}
|
unmountOnExit={isPinned}
|
||||||
|
motionProps={{ initial: isPinned }}
|
||||||
{...(isPinned
|
{...(isPinned
|
||||||
? {
|
? {
|
||||||
style: {
|
style: {
|
||||||
position: undefined,
|
position: undefined,
|
||||||
left: undefined,
|
left: undefined,
|
||||||
|
right: undefined,
|
||||||
top: undefined,
|
top: undefined,
|
||||||
bottom: undefined,
|
bottom: undefined,
|
||||||
width: undefined,
|
width: undefined,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
transition: { enter: { duration: 0.15 }, exit: { duration: 0.15 } },
|
// transition: { enter: { duration: 0.15 }, exit: { duration: 0.15 } },
|
||||||
style: { zIndex: 99, width: 'full' },
|
style: { zIndex: 99, width: 'full' },
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user