feat:优化显示

This commit is contained in:
Jerry 2025-07-18 18:48:00 +08:00
parent 65d92a8777
commit c74d55e62b
2 changed files with 15 additions and 10 deletions

View File

@ -8,7 +8,7 @@ import { Box } from '@chakra-ui/react';
*/ */
const PageContainer = ({ children }) => { const PageContainer = ({ children }) => {
return ( return (
<Box pt={'80px'} px={6}> <Box pt={'85px'} px={6}>
{children} {children}
</Box> </Box>
); );

View File

@ -52,6 +52,7 @@ const ScanPage = () => {
})), })),
}); });
setNetworkAdapters(networkCollection); setNetworkAdapters(networkCollection);
setLocalIp(config.backendUrl);
}); });
}, []); }, []);
@ -186,25 +187,29 @@ const ScanPage = () => {
</Field.Root> </Field.Root>
<Button <Button
mb={-7}
onClick={() => setInputMode(!inputMode)} onClick={() => setInputMode(!inputMode)}
colorPalette={'blue'} colorPalette={'blue'}
variant={'outline'} variant={'outline'}
> >
{inputMode ? '切换为选择模式' : '切换为输入模式'} {inputMode ? '关闭自定义' : '自定义网段'}
</Button> </Button>
</HStack> </HStack>
{inputMode ? ( {inputMode ? (
<Input <FadeInWrapper delay={0.1} yOffset={-2}>
placeholder={'输入子网 (如 192.168.1.0/24)'} <Input
value={subnet} mb={4}
onChange={(e) => setSubnet(e.target.value)} placeholder={'输入子网 (如 192.168.1.0/24)'}
width={'300px'} value={subnet}
bg={'whiteAlpha.200'} onChange={(e) => setSubnet(e.target.value)}
/> width={'300px'}
bg={'whiteAlpha.200'}
/>
</FadeInWrapper>
) : null} ) : null}
<HStack mb={4} spacing={4}> <HStack mb={5} spacing={4}>
<Button <Button
onClick={handleScan} onClick={handleScan}
isLoading={loading} isLoading={loading}