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 }) => {
return (
<Box pt={'80px'} px={6}>
<Box pt={'85px'} px={6}>
{children}
</Box>
);

View File

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