mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 00:17:31 +00:00
fix: response modal (#2228)
This commit is contained in:
@@ -170,10 +170,8 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
</Box>
|
||||
</Flex>
|
||||
) : (
|
||||
<>
|
||||
<Box position={'relative'} overflow={isOpenMobileModal ? 'hidden' : ''}>
|
||||
<Box h={'100%'} overflow={'auto'}>
|
||||
{!isOpenMobileModal && (
|
||||
<Box height={'100%'}>
|
||||
<WholeResponseSideTab
|
||||
response={sideResponse}
|
||||
value={currentNodeId}
|
||||
@@ -183,10 +181,9 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
}}
|
||||
isMobile={true}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
{isOpenMobileModal && (
|
||||
<Box h={'100%'} w={'100%'} zIndex={10} background={'white'}>
|
||||
<Flex flexDirection={'column'} h={'100%'}>
|
||||
<Flex
|
||||
align={'center'}
|
||||
justifyContent={'center'}
|
||||
@@ -228,23 +225,22 @@ export const ResponseBox = React.memo(function ResponseBox({
|
||||
{t(activeModule.moduleName as any)}
|
||||
</Box>
|
||||
</Flex>
|
||||
<Box overflow={'auto'} height={'calc(100% - 40px)'}>
|
||||
<Box flex={'1 0 0'} overflow={'auto'}>
|
||||
<WholeResponseContent
|
||||
activeModule={activeModule}
|
||||
hideTabs={hideTabs}
|
||||
showDetail={showDetail}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
</Flex>
|
||||
)}
|
||||
</Box>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
});
|
||||
|
||||
const WholeResponseContent = ({
|
||||
export const WholeResponseContent = ({
|
||||
activeModule,
|
||||
hideTabs,
|
||||
showDetail
|
||||
|
@@ -25,7 +25,7 @@ import { QuestionOutlineIcon } from '@chakra-ui/icons';
|
||||
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
|
||||
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
|
||||
import { useWorkflowUtils } from '../../hooks/useUtils';
|
||||
import { ResponseBox } from '@/components/core/chat/components/WholeResponseModal';
|
||||
import { WholeResponseContent } from '@/components/core/chat/components/WholeResponseModal';
|
||||
|
||||
type Props = FlowNodeItemType & {
|
||||
children?: React.ReactNode | React.ReactNode[] | string;
|
||||
@@ -623,9 +623,7 @@ const NodeDebugResponse = React.memo(function NodeDebugResponse({
|
||||
{debugResult.message}
|
||||
</Box>
|
||||
)}
|
||||
{response && (
|
||||
<ResponseBox useMobile={true} response={[response]} showDetail hideTabs />
|
||||
)}
|
||||
{response && <WholeResponseContent activeModule={response} showDetail />}
|
||||
</Box>
|
||||
</Card>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user