optimize(desktop): use same style with browser

This commit is contained in:
Guoguo
2025-12-26 11:18:43 +08:00
parent 20da57b3a0
commit b7f472c311
4 changed files with 5 additions and 6 deletions

View File

@@ -14,7 +14,6 @@ export const DeviceModal = (): ReactElement => {
<Modal open={true} title={t('modal.title')} footer={null} closable={false} destroyOnClose>
<div className="flex flex-col items-center justify-center space-y-5 py-10">
<Video setErrMsg={setErrMsg} />
<SerialPort setErrMsg={setErrMsg} />
{errMsg && <span className="text-xs text-red-500">{errMsg}</span>}

View File

@@ -116,10 +116,10 @@ export const SerialPort = ({ setErrMsg }: SerialPortProps): ReactElement => {
}
return (
<Space direction="vertical" size="small" style={{ width: '100%', alignItems: 'center' }}>
<Space direction="vertical" size="small" className="p-2">
<Select
value={serialPort || undefined}
style={{ width: 280 }}
className="w-[250px]"
options={options}
loading={serialPortState === 'connecting'}
status={isFailed ? 'error' : undefined}
@@ -129,7 +129,7 @@ export const SerialPort = ({ setErrMsg }: SerialPortProps): ReactElement => {
/>
<Select
value={baudRate}
style={{ width: 280 }}
className="w-[250px]"
options={baudRateOptions}
placeholder={t('modal.selectBaudRate')}
onChange={handleBaudRateChange}

View File

@@ -104,7 +104,7 @@ export const Video = ({ setErrMsg }: VideoProps): ReactElement => {
return (
<Select
value={videoDeviceId || undefined}
style={{ width: 280 }}
style={{ width: 250 }}
options={devices}
fieldNames={{
value: 'videoId',