mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'maryhipp/hide-some-things' of https://github.com/invoke-ai/InvokeAI into maryhipp/hide-some-things
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
import { Box, FormControl, useDisclosure } from '@chakra-ui/react';
|
||||
import { RootState } from 'app/store/store';
|
||||
import { stateSelector } from 'app/store/store';
|
||||
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
|
||||
import { ChangeEvent, KeyboardEvent, useCallback, useRef } from 'react';
|
||||
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import {
|
||||
GenerationState,
|
||||
clampSymmetrySteps,
|
||||
setPositivePrompt,
|
||||
} from 'features/parameters/store/generationSlice';
|
||||
@ -23,10 +22,11 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useFeatureStatus } from '../../../../system/hooks/useFeatureStatus';
|
||||
|
||||
const promptInputSelector = createSelector(
|
||||
[(state: RootState) => state.generation, activeTabNameSelector],
|
||||
(parameters: GenerationState, activeTabName) => {
|
||||
[stateSelector, activeTabNameSelector],
|
||||
({ generation, ui }, activeTabName) => {
|
||||
return {
|
||||
prompt: parameters.positivePrompt,
|
||||
shouldPinParametersPanel: ui.shouldPinParametersPanel,
|
||||
prompt: generation.positivePrompt,
|
||||
activeTabName,
|
||||
};
|
||||
},
|
||||
@ -42,7 +42,8 @@ const promptInputSelector = createSelector(
|
||||
*/
|
||||
const ParamPositiveConditioning = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const { prompt, activeTabName } = useAppSelector(promptInputSelector);
|
||||
const { prompt, shouldPinParametersPanel, activeTabName } =
|
||||
useAppSelector(promptInputSelector);
|
||||
const isReady = useIsReadyToInvoke();
|
||||
const promptRef = useRef<HTMLTextAreaElement>(null);
|
||||
const { isOpen, onClose, onOpen } = useDisclosure();
|
||||
@ -123,7 +124,7 @@ const ParamPositiveConditioning = () => {
|
||||
// };
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Box position="relative">
|
||||
<FormControl>
|
||||
<ParamEmbeddingPopover
|
||||
isOpen={isOpen}
|
||||
@ -147,7 +148,7 @@ const ParamPositiveConditioning = () => {
|
||||
<Box
|
||||
sx={{
|
||||
position: 'absolute',
|
||||
top: 6,
|
||||
top: shouldPinParametersPanel ? 6 : 0,
|
||||
insetInlineEnd: 0,
|
||||
}}
|
||||
>
|
||||
|
Reference in New Issue
Block a user