Skip to content

Commit 1492ed4

Browse files
authored
style: adjust form style (#1561)
1 parent 5bd0bb1 commit 1492ed4

File tree

7 files changed

+40
-47
lines changed

7 files changed

+40
-47
lines changed

src/components/ConnectionsSettingsModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export const ConnectionsSettingsModal = (props: {
252252

253253
<input
254254
type="text"
255-
class="input"
255+
class="input w-full"
256256
onInput={(e) => setQuickFilterRegex(e.target.value)}
257257
value={quickFilterRegex()}
258258
/>
@@ -262,7 +262,7 @@ export const ConnectionsSettingsModal = (props: {
262262
<ConfigTitle withDivider>{t('tableSize')}</ConfigTitle>
263263

264264
<select
265-
class="select"
265+
class="select w-full"
266266
value={connectionsTableSize()}
267267
onChange={(e) =>
268268
setConnectionsTableSize(e.target.value as TAILWINDCSS_SIZE)

src/components/LogsSettingsModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const LogsSettingsModal: Component<{
3232
<ConfigTitle withDivider>{t('tableSize')}</ConfigTitle>
3333

3434
<select
35-
class="select"
35+
class="select w-full"
3636
value={logsTableSize()}
3737
onChange={(e) =>
3838
setLogsTableSize(e.target.value as TAILWINDCSS_SIZE)
@@ -48,7 +48,7 @@ export const LogsSettingsModal: Component<{
4848
<ConfigTitle withDivider>{t('logLevel')}</ConfigTitle>
4949

5050
<select
51-
class="select"
51+
class="select w-full"
5252
value={logLevel()}
5353
onChange={(e) => setLogLevel(e.target.value as LOG_LEVEL)}
5454
>
@@ -70,7 +70,7 @@ export const LogsSettingsModal: Component<{
7070
<ConfigTitle withDivider>{t('logMaxRows')}</ConfigTitle>
7171

7272
<select
73-
class="select"
73+
class="select w-full"
7474
value={logMaxRows()}
7575
onChange={(e) => setLogMaxRows(parseInt(e.target.value))}
7676
>

src/components/ProxiesSettingsModal.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const ProxiesSettingsModal: Component<{
5353
<ConfigTitle withDivider>{t('urlForLatencyTest')}</ConfigTitle>
5454

5555
<input
56-
class="input"
56+
class="input w-full"
5757
value={urlForLatencyTest()}
5858
onChange={(e) => setUrlForLatencyTest(e.target.value)}
5959
/>
@@ -66,7 +66,7 @@ export const ProxiesSettingsModal: Component<{
6666

6767
<input
6868
type="number"
69-
class="input"
69+
class="input w-full"
7070
value={latencyTestTimeoutDuration()}
7171
onChange={(e) =>
7272
setLatencyTestTimeoutDuration(Number(e.target.value))
@@ -78,7 +78,7 @@ export const ProxiesSettingsModal: Component<{
7878
<ConfigTitle withDivider>{t('proxiesSorting')}</ConfigTitle>
7979

8080
<select
81-
class="select"
81+
class="select w-full"
8282
value={proxiesOrderingType()}
8383
onChange={(e) =>
8484
setProxiesOrderingType(e.target.value as PROXIES_ORDERING_TYPE)
@@ -124,7 +124,7 @@ export const ProxiesSettingsModal: Component<{
124124
<ConfigTitle withDivider>{t('proxiesPreviewType')}</ConfigTitle>
125125

126126
<select
127-
class="select"
127+
class="select w-full"
128128
value={proxiesPreviewType()}
129129
onChange={(e) =>
130130
setProxiesPreviewType(e.target.value as PROXIES_PREVIEW_TYPE)
@@ -141,7 +141,7 @@ export const ProxiesSettingsModal: Component<{
141141

142142
<input
143143
type="number"
144-
class="input"
144+
class="input w-full"
145145
value={iconHeight()}
146146
onChange={(e) => setIconHeight(Number(e.target.value))}
147147
/>
@@ -150,7 +150,7 @@ export const ProxiesSettingsModal: Component<{
150150

151151
<input
152152
type="number"
153-
class="input"
153+
class="input w-full"
154154
value={iconMarginRight()}
155155
onChange={(e) => setIconMarginRight(Number(e.target.value))}
156156
/>

src/i18n/en.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ export default {
120120
tunModeStack: 'TUN Mode Stack',
121121
tunDeviceName: 'TUN Device Name',
122122
outboundInterfaceName: 'Outbound Interface Name',
123-
en: 'English',
124-
zh: 'Chinese',
125-
ru: 'Russian',
126123
port: '{{ name }} Port',
127124
quickFilter: 'Quick Filter',
128125
iconHeight: 'Icon Height',

src/i18n/ru.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ export default {
122122
tunModeStack: 'Стек режима TUN',
123123
tunDeviceName: 'Имя TUN-устройства',
124124
outboundInterfaceName: 'Имя исходящего интерфейса',
125-
en: 'Английский',
126-
zh: 'Китайский',
127-
ru: 'Русский',
128125
port: '{{ name }} Порт',
129126
quickFilter: 'Быстрый фильтр',
130127
iconHeight: 'Высота иконки',

src/i18n/zh.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ export default {
122122
tunModeStack: 'TUN 模式堆栈',
123123
tunDeviceName: 'TUN 设备名称',
124124
outboundInterfaceName: '出站接口名称',
125-
en: '英文',
126-
zh: '中文',
127-
ru: '俄文',
128125
port: '{{ name }} 端口',
129126
quickFilter: '快速过滤',
130127
iconHeight: '图标高度',

src/pages/Config.tsx

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -110,39 +110,41 @@ const DNSQueryForm = () => {
110110

111111
return (
112112
<div class="flex flex-col">
113-
<form use:form={form} class="flex gap-2 sm:flex-row">
113+
<form use:form={form} class="join">
114114
<Input
115115
type="search"
116116
name="name"
117-
class="flex-1"
117+
class="join-item w-full"
118118
placeholder={defaultDNSQueryTarget}
119119
onInput={(e) => {
120120
if (!e.target.value) setDNSQueryResult([])
121121
}}
122122
/>
123123

124-
<div class="flex items-center gap-2">
125-
<Select name="type">
126-
<option>A</option>
127-
<option>AAAA</option>
128-
<option>CNAME</option>
129-
<option>TXT</option>
130-
<option>MX</option>
131-
<option>SRV</option>
132-
<option>HTTPS</option>
133-
<option>NS</option>
134-
<option>DNSKEY</option>
135-
<option>DS</option>
136-
<option>SIG</option>
137-
<option>SOA</option>
138-
<option>RRSIG</option>
139-
<option>RP</option>
140-
</Select>
124+
<Select name="type" class="join-item max-w-max">
125+
<option>A</option>
126+
<option>AAAA</option>
127+
<option>CNAME</option>
128+
<option>TXT</option>
129+
<option>MX</option>
130+
<option>SRV</option>
131+
<option>HTTPS</option>
132+
<option>NS</option>
133+
<option>DNSKEY</option>
134+
<option>DS</option>
135+
<option>SIG</option>
136+
<option>SOA</option>
137+
<option>RRSIG</option>
138+
<option>RP</option>
139+
</Select>
141140

142-
<Button type="submit" class="btn-primary" loading={isSubmitting()}>
143-
{t('dnsQuery')}
144-
</Button>
145-
</div>
141+
<Button
142+
type="submit"
143+
class="join-item max-w-max btn-primary"
144+
loading={isSubmitting()}
145+
>
146+
{t('dnsQuery')}
147+
</Button>
146148
</form>
147149

148150
<Show when={DNSQueryResult().length > 0}>
@@ -418,15 +420,15 @@ const ConfigForXd = () => {
418420
const navigate = useNavigate()
419421
const languages = [
420422
{
421-
label: () => t('en'),
423+
label: 'English',
422424
value: LANG.EN,
423425
},
424426
{
425-
label: () => t('zh'),
427+
label: '简体中文',
426428
value: LANG.ZH,
427429
},
428430
{
429-
label: () => t('ru'),
431+
label: 'Русский',
430432
value: LANG.RU,
431433
},
432434
]
@@ -474,7 +476,7 @@ const ConfigForXd = () => {
474476
<For each={languages}>
475477
{(lang) => (
476478
<option selected={locale() === lang.value} value={lang.value}>
477-
{lang.label()}
479+
{lang.label}
478480
</option>
479481
)}
480482
</For>

0 commit comments

Comments
 (0)