This commit is contained in:
心隨緣動 2025-08-26 15:45:04 +08:00 committed by GitHub
parent 2c0ee7cbfe
commit f04677c810
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,19 +1,24 @@
{{define "form/inbound"}}
<!-- base -->
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<!-- 开关:启用/禁用 -->
<a-form-item label='{{ i18n "enable" }}'>
<a-switch v-model="dbInbound.enable"></a-switch>
</a-form-item>
<!-- 备注 -->
<a-form-item label='{{ i18n "remark" }}'>
<a-input v-model.trim="dbInbound.remark"></a-input>
</a-form-item>
<!-- 协议选择 -->
<a-form-item label='{{ i18n "protocol" }}'>
<a-select v-model="inbound.protocol" :disabled="isEdit" :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
</a-select>
</a-form-item>
<!-- 监听地址 -->
<a-form-item>
<template slot="label">
<a-tooltip>
@ -27,23 +32,60 @@
<a-input v-model.trim="inbound.listen"></a-input>
</a-form-item>
<a-form-item label='{{ i18n "pages.inbounds.port" }}'>
<a-input-number v-model.number="inbound.port" :min="1" :max="65531"></a-input-number>
</a-form-item>
<!-- 端口 + 总流量 在同一行 -->
<a-row :gutter="16">
<!-- 左侧:端口 -->
<a-col :span="12">
<a-form-item>
<template slot="label">
<a-tooltip>
<template slot="title">
端口范围1 - 65531请尽量使用高位端口
</template>
{{ i18n "pages.inbounds.port" }}
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
<a-input-number v-model.number="inbound.port" :min="1" :max="65531" style="width: 100%" />
</a-form-item>
</a-col>
<!-- 右侧:总流量 -->
<a-col :span="12">
<a-form-item>
<template slot="label">
<a-tooltip>
<template slot="title">
0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
</template>
{{ i18n "pages.inbounds.totalFlow" }}
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
<a-input-number v-model.number="dbInbound.totalGB" :min="0" style="width: 100%" />
</a-form-item>
</a-col>
</a-row>
<!-- 设备限制 单独占一行 -->
<a-form-item>
<template slot="label">
<a-tooltip>
<template slot="title">
0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
0 表示不限制(留空也表示不限制)
</template>
{{ i18n "pages.inbounds.totalFlow" }}
设备限制
<a-icon type="question-circle"></a-icon>
</a-tooltip>
</template>
<a-input-number v-model.number="dbInbound.totalGB" :min="0"></a-input-number>
<a-input-number
v-model.number="dbInbound.deviceLimit"
:min="0"
style="width: 100%"
placeholder="0 = 不限制" />
</a-form-item>
<!-- 到期时间 -->
<a-form-item>
<template slot="label">
<a-tooltip>