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(
|
||||
[activeTabNameSelector, uiSelector],
|
||||
(activeTabName, ui) => {
|
||||
const { shouldPinGallery } = ui;
|
||||
const { shouldPinGallery, shouldShowGallery } = ui;
|
||||
|
||||
return {
|
||||
shouldPinGallery,
|
||||
shouldShowGalleryButton:
|
||||
!shouldPinGallery &&
|
||||
(!shouldPinGallery || !shouldShowGallery) &&
|
||||
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName),
|
||||
};
|
||||
},
|
||||
|
@ -23,17 +23,22 @@ const floatingButtonStyles: ChakraProps['sx'] = {
|
||||
export const floatingParametersPanelButtonSelector = createSelector(
|
||||
[uiSelector, activeTabNameSelector],
|
||||
(ui, activeTabName) => {
|
||||
const { shouldPinParametersPanel, shouldUseCanvasBetaLayout } = ui;
|
||||
const {
|
||||
shouldPinParametersPanel,
|
||||
shouldUseCanvasBetaLayout,
|
||||
shouldShowParametersPanel,
|
||||
} = ui;
|
||||
|
||||
const canvasBetaLayoutCheck =
|
||||
shouldUseCanvasBetaLayout && activeTabName === 'unifiedCanvas';
|
||||
|
||||
const shouldShowProcessButtons =
|
||||
!canvasBetaLayoutCheck && !shouldPinParametersPanel;
|
||||
!canvasBetaLayoutCheck &&
|
||||
(!shouldPinParametersPanel || !shouldShowParametersPanel);
|
||||
|
||||
const shouldShowParametersPanelButton =
|
||||
!canvasBetaLayoutCheck &&
|
||||
!shouldPinParametersPanel &&
|
||||
(!shouldPinParametersPanel || !shouldShowParametersPanel) &&
|
||||
['txt2img', 'img2img', 'unifiedCanvas'].includes(activeTabName);
|
||||
|
||||
return {
|
||||
|
@ -154,19 +154,21 @@ const ResizableDrawer = ({
|
||||
<Slide
|
||||
direction={slideDirection}
|
||||
in={isOpen}
|
||||
motionProps={{ initial: false }}
|
||||
unmountOnExit={isPinned}
|
||||
motionProps={{ initial: isPinned }}
|
||||
{...(isPinned
|
||||
? {
|
||||
style: {
|
||||
position: undefined,
|
||||
left: undefined,
|
||||
right: undefined,
|
||||
top: undefined,
|
||||
bottom: 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' },
|
||||
})}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user