fix: remove unnecessary input fields (#7423)

* fix: remove unnecessary input fields

* fix: remove unnecessary input fields from ProfileViewer component
This commit is contained in:
StarsSail
2026-07-06 02:43:18 +00:00
committed by GitHub
parent d7fca9fd70
commit d4118295a3
+30 -38
View File
@@ -271,6 +271,15 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
)}
/>
{isLocal && openType === 'new' && (
<FileInput
onChange={(file, val) => {
setValue('name', getValues('name') || file.name)
fileDataRef.current = val
}}
/>
)}
{isRemote && (
<>
<Controller
@@ -321,44 +330,27 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
/>
)}
/>
</>
)}
{(isRemote || isLocal) && (
<Controller
name="option.update_interval"
control={control}
render={({ field }) => (
<TextField
{...text}
{...field}
type="number"
label={t('profiles.modals.profileForm.fields.updateInterval')}
slotProps={{
input: {
endAdornment: (
<InputAdornment position="end">
{t('shared.units.minutes')}
</InputAdornment>
),
},
}}
/>
)}
/>
)}
{isLocal && openType === 'new' && (
<FileInput
onChange={(file, val) => {
setValue('name', getValues('name') || file.name)
fileDataRef.current = val
}}
/>
)}
{isRemote && (
<>
<Controller
name="option.update_interval"
control={control}
render={({ field }) => (
<TextField
{...text}
{...field}
type="number"
label={t('profiles.modals.profileForm.fields.updateInterval')}
slotProps={{
input: {
endAdornment: (
<InputAdornment position="end">
{t('shared.units.minutes')}
</InputAdornment>
),
},
}}
/>
)}
/>
<Controller
name="option.with_proxy"
control={control}