mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-31 11:12:07 +08:00
fix: remove unnecessary input fields (#7423)
* fix: remove unnecessary input fields * fix: remove unnecessary input fields from ProfileViewer component
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user