Skip to content

Commit 6c4155f

Browse files
committed
fix(core-editor): refactor VLESS advanced settings modal layout and styling
1 parent 9241750 commit 6c4155f

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

dashboard/src/features/core-editor/components/shared/vless-advanced-generation-modal.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ export function VlessAdvancedGenerationModal({
9797
<span className="truncate">{t('coreConfigModal.vlessAdvancedSettings', { defaultValue: 'VLESS Advanced Settings' })}</span>
9898
</DialogTitle>
9999
</DialogHeader>
100-
<div className="-mr-4 max-h-[80dvh] space-y-4 overflow-y-auto px-2 pr-4 sm:max-h-[75dvh]">
101-
<div className="space-y-2">
102-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.chooseAuthentication')}</Label>
100+
<div className="-mr-4 max-h-[80dvh] space-y-5 overflow-y-auto px-2 pr-4 sm:max-h-[75dvh]">
101+
<div className="flex flex-col gap-3">
102+
<p className="text-xs">{t('coreConfigModal.chooseAuthentication')}</p>
103103
<Select value={selectedVariant} onValueChange={handleVariantChange}>
104104
<SelectTrigger className="h-9 w-full">
105105
<SelectValue />
@@ -121,9 +121,9 @@ export function VlessAdvancedGenerationModal({
121121
</Select>
122122
</div>
123123

124-
<div className="flex flex-col gap-3 sm:flex-row">
125-
<div className="flex flex-1 flex-col justify-end space-y-2">
126-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.vlessHandshakeLabel')}</Label>
124+
<div className="grid gap-4 sm:grid-cols-2">
125+
<div className="flex flex-col gap-3">
126+
<Label>{t('coreConfigModal.vlessHandshakeLabel')}</Label>
127127
<Select value={vlessOptions.handshakeMethod} onValueChange={value => setVlessOptions(prev => ({ ...prev, handshakeMethod: value }))}>
128128
<SelectTrigger>
129129
<SelectValue />
@@ -138,9 +138,9 @@ export function VlessAdvancedGenerationModal({
138138
</Select>
139139
</div>
140140

141-
<div className="flex flex-1 flex-col justify-end space-y-2">
141+
<div className="flex flex-col gap-3">
142142
<div className="flex items-center gap-1.5">
143-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.vlessEncryptionLabel')}</Label>
143+
<Label>{t('coreConfigModal.vlessEncryptionLabel')}</Label>
144144
<VlessEncryptionExplanationPopover />
145145
</div>
146146
<Select value={vlessOptions.encryptionMethod} onValueChange={value => setVlessOptions(prev => ({ ...prev, encryptionMethod: value }))}>
@@ -158,9 +158,9 @@ export function VlessAdvancedGenerationModal({
158158
</div>
159159
</div>
160160

161-
<div className="grid gap-3 sm:grid-cols-2">
162-
<div className="space-y-2">
163-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.vlessServerTicket')}</Label>
161+
<div className="grid gap-4 sm:grid-cols-2">
162+
<div className="flex flex-col gap-3">
163+
<Label>{t('coreConfigModal.vlessServerTicket')}</Label>
164164
<Input
165165
value={vlessOptions.serverTicket}
166166
placeholder="600s or 100-500s"
@@ -169,8 +169,8 @@ export function VlessAdvancedGenerationModal({
169169
/>
170170
</div>
171171

172-
<div className="space-y-2">
173-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.vlessClientTicket')}</Label>
172+
<div className="flex flex-col gap-3">
173+
<Label>{t('coreConfigModal.vlessClientTicket')}</Label>
174174
<Select value={vlessOptions.clientTicket} onValueChange={value => setVlessOptions(prev => ({ ...prev, clientTicket: value }))}>
175175
<SelectTrigger className="h-9">
176176
<SelectValue />
@@ -186,11 +186,11 @@ export function VlessAdvancedGenerationModal({
186186
</div>
187187
</div>
188188

189-
<div className="space-y-3">
190-
<Label className="text-xs font-semibold tracking-wide text-muted-foreground">{t('coreConfigModal.padding', { defaultValue: 'Padding' })}</Label>
189+
<div className="flex flex-col gap-4">
190+
<Label>{t('coreConfigModal.padding', { defaultValue: 'Padding' })}</Label>
191191

192-
<div className="grid gap-3 sm:grid-cols-2">
193-
<div className="space-y-2">
192+
<div className="grid gap-4 sm:grid-cols-2">
193+
<div className="flex flex-col gap-3">
194194
<div className="flex items-center gap-2">
195195
<Checkbox
196196
id={serverPadId}
@@ -223,7 +223,7 @@ export function VlessAdvancedGenerationModal({
223223
/>
224224
</div>
225225

226-
<div className="space-y-2">
226+
<div className="flex flex-col gap-3">
227227
<div className="flex items-center gap-2">
228228
<Checkbox
229229
id={clientPadId}

0 commit comments

Comments
 (0)