mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-13 09:36:05 +00:00
fix(ui): correct responsive breakpoints for inbound form and settings
InboundFormModal forms specified label/wrapper cols only at md (>=768), leaving 576-767 unset and breaking the grid in that range. Move the breakpoint down to sm so the desktop 8/14 split applies from 576 upward. SettingListItem had its breakpoints inverted: at <992 no span was set so the meta and control cols squeezed side-by-side, and at lg (992-1199) they stacked. Switch to xs/lg so input stacks below the text under 992 and sits beside it from 992 upward.
This commit is contained in:
parent
9735d26b3d
commit
1478124712
2 changed files with 16 additions and 16 deletions
|
|
@ -17,13 +17,13 @@ const padding = computed(() =>
|
||||||
<template>
|
<template>
|
||||||
<a-list-item :style="{ padding }">
|
<a-list-item :style="{ padding }">
|
||||||
<a-row :gutter="[8, 16]">
|
<a-row :gutter="[8, 16]">
|
||||||
<a-col :lg="24" :xl="12">
|
<a-col :xs="24" :lg="12">
|
||||||
<a-list-item-meta>
|
<a-list-item-meta>
|
||||||
<template #title><slot name="title" /></template>
|
<template #title><slot name="title" /></template>
|
||||||
<template #description><slot name="description" /></template>
|
<template #description><slot name="description" /></template>
|
||||||
</a-list-item-meta>
|
</a-list-item-meta>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="24" :xl="12">
|
<a-col :xs="24" :lg="12">
|
||||||
<slot name="control" />
|
<slot name="control" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ watch(
|
||||||
<a-tabs v-if="inbound && dbForm" default-active-key="basic">
|
<a-tabs v-if="inbound && dbForm" default-active-key="basic">
|
||||||
<!-- ============================== BASICS ============================== -->
|
<!-- ============================== BASICS ============================== -->
|
||||||
<a-tab-pane key="basic" :tab="t('pages.xray.basicTemplate')">
|
<a-tab-pane key="basic" :tab="t('pages.xray.basicTemplate')">
|
||||||
<a-form :colon="false" :label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }">
|
<a-form :colon="false" :label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }">
|
||||||
<a-form-item :label="t('enable')">
|
<a-form-item :label="t('enable')">
|
||||||
<a-switch v-model:checked="dbForm.enable" />
|
<a-switch v-model:checked="dbForm.enable" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -621,7 +621,7 @@ watch(
|
||||||
<template v-if="isMultiUser">
|
<template v-if="isMultiUser">
|
||||||
<a-collapse v-if="mode === 'add' && firstClient" default-active-key="0">
|
<a-collapse v-if="mode === 'add' && firstClient" default-active-key="0">
|
||||||
<a-collapse-panel key="0" header="Client">
|
<a-collapse-panel key="0" header="Client">
|
||||||
<a-form :colon="false" :label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }">
|
<a-form :colon="false" :label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }">
|
||||||
<a-form-item label="Enable">
|
<a-form-item label="Enable">
|
||||||
<a-switch v-model:checked="firstClient.enable" />
|
<a-switch v-model:checked="firstClient.enable" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -729,8 +729,8 @@ watch(
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- VLess decryption / encryption -->
|
<!-- VLess decryption / encryption -->
|
||||||
<a-form v-if="protocol === Protocols.VLESS" :colon="false" :label-col="{ md: { span: 8 } }"
|
<a-form v-if="protocol === Protocols.VLESS" :colon="false" :label-col="{ sm: { span: 8 } }"
|
||||||
:wrapper-col="{ md: { span: 14 } }" class="mt-12">
|
:wrapper-col="{ sm: { span: 14 } }" class="mt-12">
|
||||||
<a-form-item label="Decryption">
|
<a-form-item label="Decryption">
|
||||||
<a-input v-model:value="inbound.settings.decryption" />
|
<a-input v-model:value="inbound.settings.decryption" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -751,8 +751,8 @@ watch(
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<!-- Shadowsocks shared fields (method/network/ivCheck) -->
|
<!-- Shadowsocks shared fields (method/network/ivCheck) -->
|
||||||
<a-form v-if="protocol === Protocols.SHADOWSOCKS" :colon="false" :label-col="{ md: { span: 8 } }"
|
<a-form v-if="protocol === Protocols.SHADOWSOCKS" :colon="false" :label-col="{ sm: { span: 8 } }"
|
||||||
:wrapper-col="{ md: { span: 14 } }" class="mt-12">
|
:wrapper-col="{ sm: { span: 14 } }" class="mt-12">
|
||||||
<a-form-item label="Encryption method">
|
<a-form-item label="Encryption method">
|
||||||
<a-select v-model:value="inbound.settings.method" @change="onSSMethodChange">
|
<a-select v-model:value="inbound.settings.method" @change="onSSMethodChange">
|
||||||
<a-select-option v-for="(m, k) in SSMethods" :key="k" :value="m">{{ k }}</a-select-option>
|
<a-select-option v-for="(m, k) in SSMethods" :key="k" :value="m">{{ k }}</a-select-option>
|
||||||
|
|
@ -779,7 +779,7 @@ watch(
|
||||||
|
|
||||||
<!-- HTTP / Mixed accounts -->
|
<!-- HTTP / Mixed accounts -->
|
||||||
<a-form v-if="protocol === Protocols.HTTP || protocol === Protocols.MIXED" :colon="false"
|
<a-form v-if="protocol === Protocols.HTTP || protocol === Protocols.MIXED" :colon="false"
|
||||||
:label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }" class="mt-12">
|
:label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }" class="mt-12">
|
||||||
<a-form-item label="Accounts">
|
<a-form-item label="Accounts">
|
||||||
<a-button size="small" @click="protocol === Protocols.HTTP
|
<a-button size="small" @click="protocol === Protocols.HTTP
|
||||||
? inbound.settings.addAccount(new Inbound.HttpSettings.HttpAccount())
|
? inbound.settings.addAccount(new Inbound.HttpSettings.HttpAccount())
|
||||||
|
|
@ -823,8 +823,8 @@ watch(
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<!-- Tunnel -->
|
<!-- Tunnel -->
|
||||||
<a-form v-if="protocol === Protocols.TUNNEL" :colon="false" :label-col="{ md: { span: 8 } }"
|
<a-form v-if="protocol === Protocols.TUNNEL" :colon="false" :label-col="{ sm: { span: 8 } }"
|
||||||
:wrapper-col="{ md: { span: 14 } }" class="mt-12">
|
:wrapper-col="{ sm: { span: 14 } }" class="mt-12">
|
||||||
<a-form-item label="Address">
|
<a-form-item label="Address">
|
||||||
<a-input v-model:value="inbound.settings.address" />
|
<a-input v-model:value="inbound.settings.address" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -844,8 +844,8 @@ watch(
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<!-- WireGuard -->
|
<!-- WireGuard -->
|
||||||
<a-form v-if="protocol === Protocols.WIREGUARD" :colon="false" :label-col="{ md: { span: 8 } }"
|
<a-form v-if="protocol === Protocols.WIREGUARD" :colon="false" :label-col="{ sm: { span: 8 } }"
|
||||||
:wrapper-col="{ md: { span: 14 } }" class="mt-12">
|
:wrapper-col="{ sm: { span: 14 } }" class="mt-12">
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<template #label>
|
<template #label>
|
||||||
Secret key
|
Secret key
|
||||||
|
|
@ -930,7 +930,7 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-form v-for="(fallback, idx) in inbound.settings.fallbacks" :key="idx" :colon="false"
|
<a-form v-for="(fallback, idx) in inbound.settings.fallbacks" :key="idx" :colon="false"
|
||||||
:label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }">
|
:label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }">
|
||||||
<a-divider style="margin: 0">
|
<a-divider style="margin: 0">
|
||||||
Fallback {{ idx + 1 }}
|
Fallback {{ idx + 1 }}
|
||||||
<DeleteOutlined class="danger-icon" @click="delFallback(idx)" />
|
<DeleteOutlined class="danger-icon" @click="delFallback(idx)" />
|
||||||
|
|
@ -1001,7 +1001,7 @@ watch(
|
||||||
<!-- ============================== STREAM ============================== -->
|
<!-- ============================== STREAM ============================== -->
|
||||||
<a-tab-pane v-if="canEnableStream" key="stream"
|
<a-tab-pane v-if="canEnableStream" key="stream"
|
||||||
tab="Stream"><!-- "Stream" stays literal — it's a wire-format identifier -->
|
tab="Stream"><!-- "Stream" stays literal — it's a wire-format identifier -->
|
||||||
<a-form :colon="false" :label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }">
|
<a-form :colon="false" :label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }">
|
||||||
<a-form-item v-if="protocol !== Protocols.HYSTERIA" label="Transmission">
|
<a-form-item v-if="protocol !== Protocols.HYSTERIA" label="Transmission">
|
||||||
<a-select v-model:value="network" :style="{ width: '75%' }">
|
<a-select v-model:value="network" :style="{ width: '75%' }">
|
||||||
<a-select-option value="tcp">TCP (RAW)</a-select-option>
|
<a-select-option value="tcp">TCP (RAW)</a-select-option>
|
||||||
|
|
@ -1660,7 +1660,7 @@ watch(
|
||||||
|
|
||||||
<!-- ============================== SNIFFING ============================== -->
|
<!-- ============================== SNIFFING ============================== -->
|
||||||
<a-tab-pane key="sniffing" tab="Sniffing"><!-- "Sniffing" stays literal — xray config term -->
|
<a-tab-pane key="sniffing" tab="Sniffing"><!-- "Sniffing" stays literal — xray config term -->
|
||||||
<a-form :colon="false" :label-col="{ md: { span: 8 } }" :wrapper-col="{ md: { span: 14 } }">
|
<a-form :colon="false" :label-col="{ sm: { span: 8 } }" :wrapper-col="{ sm: { span: 14 } }">
|
||||||
<a-form-item label="Enabled">
|
<a-form-item label="Enabled">
|
||||||
<a-switch v-model:checked="inbound.sniffing.enabled" />
|
<a-switch v-model:checked="inbound.sniffing.enabled" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue