diff options
| author | Tara Rostami <132676256+TaraRostami@users.noreply.github.com> | 2024-03-09 16:06:16 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-09 16:06:16 +0300 |
| commit | ffa531f9cac29802af8778404679d6112b7a6b97 (patch) | |
| tree | a6b3f7db19da353277a64a02ab78b766627e3168 /web/html | |
| parent | 05deb89451b53b57b6ebe90f6b6df6a0b98bd156 (diff) | |
Minor Fixes (#1992)
autocomplete
max - min for input-number
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/login.html | 24 | ||||
| -rw-r--r-- | web/html/xui/common_sider.html | 26 | ||||
| -rw-r--r-- | web/html/xui/component/setting.html | 4 | ||||
| -rw-r--r-- | web/html/xui/component/themeSwitch.html | 12 | ||||
| -rw-r--r-- | web/html/xui/form/inbound.html | 2 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_kcp.html | 12 | ||||
| -rw-r--r-- | web/html/xui/inbounds.html | 2 | ||||
| -rw-r--r-- | web/html/xui/settings.html | 14 |
8 files changed, 38 insertions, 58 deletions
diff --git a/web/html/login.html b/web/html/login.html index 7655c66f..dfb01cea 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -374,6 +374,12 @@ transform: translateZ(-100px); } } + .ant-menu-item .anticon { + margin-right: 4px; + } + .ant-menu-inline .ant-menu-item { + padding: 0 16px !important; + } </style> <body> <a-layout id="app" v-cloak :class="themeSwitcher.currentTheme"> @@ -410,19 +416,19 @@ <a-col span="24"> <a-form> <a-form-item> - <a-input v-model.trim="user.username" placeholder='{{ i18n "username" }}' + <a-input autocomplete="username" v-model.trim="user.username" placeholder='{{ i18n "username" }}' @keydown.enter.native="login" autofocus> <a-icon slot="prefix" type="user" style="font-size: 16px;"></a-icon> </a-input> </a-form-item> <a-form-item> - <password-input icon="lock" v-model.trim="user.password" + <password-input autocomplete="current-password" icon="lock" v-model.trim="user.password" placeholder='{{ i18n "password" }}' @keydown.enter.native="login"> </password-input> </a-form-item> <a-form-item v-if="secretEnable"> - <password-input icon="key" v-model.trim="user.loginSecret" + <password-input autocomplete="secret" icon="key" v-model.trim="user.loginSecret" placeholder='{{ i18n "secretToken" }}' @keydown.enter.native="login"> </password-input> @@ -455,17 +461,7 @@ </a-form-item> <a-form-item> <a-row justify="center" class="centered"> - <a-col> - <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon> - </a-col> - <a-col> - <theme-switch></theme-switch> - <a-checkbox v-if="themeSwitcher.isDarkTheme" style="padding-left: 1rem; vertical-align: middle;" - :checked="themeSwitcher.isUltra" - @click="themeSwitcher.toggleUltra()"> - Ultra - </a-checkbox> - </a-col> + <theme-switch></theme-switch> </a-row> </a-form-item> </a-form> diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html index 78b833b9..bc8f4608 100644 --- a/web/html/xui/common_sider.html +++ b/web/html/xui/common_sider.html @@ -24,18 +24,7 @@ {{define "commonSider"}} <a-layout-sider :theme="themeSwitcher.currentTheme" id="sider" collapsible breakpoint="md" collapsed-width="0"> - <a-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys=""> - <a-menu-item mode="inline"> - <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon> - <theme-switch> - </theme-switch> - <a-checkbox v-if="themeSwitcher.isDarkTheme" style="padding-left: 1rem; vertical-align: middle;" - :checked="themeSwitcher.isUltra" - @click="themeSwitcher.toggleUltra()"> - Ultra - </a-checkbox> - </a-menu-item> - </a-menu> + <theme-switch></theme-switch> <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="['{{ .request_uri }}']" @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key"> {{template "menuItems" .}} @@ -49,18 +38,7 @@ <div class="drawer-handle" @click="siderDrawer.change()" slot="handle"> <a-icon :type="siderDrawer.visible ? 'close' : 'menu-fold'"></a-icon> </div> - <a-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys=""> - <a-menu-item mode="inline"> - <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon> - <theme-switch> - </theme-switch> - <a-checkbox v-if="themeSwitcher.isDarkTheme" style="padding-left: 1rem; vertical-align: middle;" - :checked="themeSwitcher.isUltra" - @click="themeSwitcher.toggleUltra()"> - Ultra - </a-checkbox> - </a-menu-item> - </a-menu> + <theme-switch></theme-switch> <a-menu :theme="themeSwitcher.currentTheme" mode="inline" :selected-keys="['{{ .request_uri }}']" @click="({key}) => key.startsWith('http') ? window.open(key) : location.href = key"> {{template "menuItems" .}} diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html index 82c0ae75..8adc000c 100644 --- a/web/html/xui/component/setting.html +++ b/web/html/xui/component/setting.html @@ -16,7 +16,7 @@ <a-input :value="value" @input="$emit('input', $event.target.value)" :placeholder="placeholder"></a-input> </template> <template v-else-if="type === 'number'"> - <a-input-number :value="value" :step="step" @change="value => $emit('input', value)" :min="min" style="width: 100%;"></a-input-number> + <a-input-number :value="value" :step="step" @change="value => $emit('input', value)" :min="min" :max="max" style="width: 100%;"></a-input-number> </template> <template v-else-if="type === 'switch'"> <a-switch :checked="value" @change="value => $emit('input', value)"></a-switch> @@ -29,7 +29,7 @@ {{define "component/setting"}} <script> Vue.component('setting-list-item', { - props: ["type", "title", "desc", "value", "min", "step", "placeholder"], + props: ["type", "title", "desc", "value", "min", "max" , "step", "placeholder"], template: `{{template "component/settingListItem"}}`, }); </script> diff --git a/web/html/xui/component/themeSwitch.html b/web/html/xui/component/themeSwitch.html index 2301da94..191632c1 100644 --- a/web/html/xui/component/themeSwitch.html +++ b/web/html/xui/component/themeSwitch.html @@ -1,8 +1,14 @@ {{define "component/themeSwitchTemplate"}} <template> - <a-switch size="small" :default-checked="themeSwitcher.isDarkTheme" - @change="themeSwitcher.toggleTheme()"> - </a-switch> + <a-menu :theme="themeSwitcher.currentTheme" mode="inline" selected-keys=""> + <a-menu-item mode="inline" class="ant-menu-theme-switch"> + <a-icon type="bulb" :theme="themeSwitcher.isDarkTheme ? 'filled' : 'outlined'"></a-icon> + <a-switch size="small" :default-checked="themeSwitcher.isDarkTheme" @change="themeSwitcher.toggleTheme()"></a-switch> + <template v-if="themeSwitcher.isDarkTheme"> + <a-checkbox style="margin-left: 1rem; vertical-align: middle;" :checked="themeSwitcher.isUltra" @click="themeSwitcher.toggleUltra()">Ultra</a-checkbox> + </template> + </a-menu-item> + </a-menu> </template> {{end}} diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html index 03df4926..92edb394 100644 --- a/web/html/xui/form/inbound.html +++ b/web/html/xui/form/inbound.html @@ -28,7 +28,7 @@ </a-form-item> <a-form-item label='{{ i18n "pages.inbounds.port" }}'> - <a-input-number v-model.number="inbound.port"></a-input-number> + <a-input-number v-model.number="inbound.port" :min="1" :max="65531"></a-input-number> </a-form-item> <a-form-item> diff --git a/web/html/xui/form/stream/stream_kcp.html b/web/html/xui/form/stream/stream_kcp.html index 5cdee701..97ca4071 100644 --- a/web/html/xui/form/stream/stream_kcp.html +++ b/web/html/xui/form/stream/stream_kcp.html @@ -23,25 +23,25 @@ <a-input v-model.trim="inbound.stream.kcp.seed"></a-input> </a-form-item> <a-form-item label='MTU'> - <a-input-number v-model.number="inbound.stream.kcp.mtu"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.mtu" :min="576" :max="1460"></a-input-number> </a-form-item> <a-form-item label='TTI (ms)'> - <a-input-number v-model.number="inbound.stream.kcp.tti"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.tti" :min="10" :max="100"></a-input-number> </a-form-item> <a-form-item label='Uplink (MB/s)'> - <a-input-number v-model.number="inbound.stream.kcp.upCap"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.upCap" :min="0"></a-input-number> </a-form-item> <a-form-item label='Downlink (MB/s)'> - <a-input-number v-model.number="inbound.stream.kcp.downCap"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.downCap" :min="0"></a-input-number> </a-form-item> <a-form-item label='Congestion'> <a-switch v-model="inbound.stream.kcp.congestion"></a-switch> </a-form-item> <a-form-item label='Read Buffer (MB)'> - <a-input-number v-model.number="inbound.stream.kcp.readBuffer"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.readBuffer" :min="0"></a-input-number> </a-form-item> <a-form-item label='Write Buffer (MB)'> - <a-input-number v-model.number="inbound.stream.kcp.writeBuffer"></a-input-number> + <a-input-number v-model.number="inbound.stream.kcp.writeBuffer" :min="0"></a-input-number> </a-form-item> </a-form> {{end}} diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 28d6b6e8..1177118c 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -537,7 +537,7 @@ { title: '{{ i18n "online" }}', width: 30, scopedSlots: { customRender: 'online' } }, { title: '{{ i18n "pages.inbounds.client" }}', width: 80, scopedSlots: { customRender: 'client' } }, { title: '{{ i18n "pages.inbounds.traffic" }}', width: 80, align: 'center', scopedSlots: { customRender: 'traffic' } }, - { title: '{{ i18n "pages.inbounds.expireDate" }}', width: 80, align: 'center', scopedSlots: { customRender: 'expiryTime' } }, + { title: '{{ i18n "pages.inbounds.expireDate" }}', width: 100, align: 'center', scopedSlots: { customRender: 'expiryTime' } }, ]; const innerMobileColumns = [ diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index d3e0ec48..507a93c7 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -138,7 +138,7 @@ </a-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.panelListeningIP"}}' desc='{{ i18n "pages.settings.panelListeningIPDesc"}}' v-model="allSetting.webListen"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.panelListeningDomain"}}' desc='{{ i18n "pages.settings.panelListeningDomainDesc"}}' v-model="allSetting.webDomain"></setting-list-item> - <setting-list-item type="number" title='{{ i18n "pages.settings.panelPort"}}' desc='{{ i18n "pages.settings.panelPortDesc"}}' v-model="allSetting.webPort" :min="0"></setting-list-item> + <setting-list-item type="number" title='{{ i18n "pages.settings.panelPort"}}' desc='{{ i18n "pages.settings.panelPortDesc"}}' v-model="allSetting.webPort" :min="1" :max="65531"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.publicKeyPath"}}' desc='{{ i18n "pages.settings.publicKeyPathDesc"}}' v-model="allSetting.webCertFile"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.privateKeyPath"}}' desc='{{ i18n "pages.settings.privateKeyPathDesc"}}' v-model="allSetting.webKeyFile"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.panelUrlPath"}}' desc='{{ i18n "pages.settings.panelUrlPathDesc"}}' v-model="allSetting.webBasePath"></setting-list-item> @@ -197,16 +197,16 @@ <a-divider>{{ i18n "pages.settings.security.admin"}}</a-divider> <a-form layout="horizontal" :colon="false" style="float: left; margin: 10px 0;" :label-col="{ md: {span:10} }" :wrapper-col="{ md: {span:14} }"> <a-form-item label='{{ i18n "pages.settings.oldUsername"}}'> - <a-input v-model="user.oldUsername"></a-input> + <a-input autocomplete="username" v-model="user.oldUsername"></a-input> </a-form-item> <a-form-item label='{{ i18n "pages.settings.currentPassword"}}'> - <password-input v-model="user.oldPassword"></password-input> + <password-input autocomplete="current-password" v-model="user.oldPassword"></password-input> </a-form-item> <a-form-item label='{{ i18n "pages.settings.newUsername"}}'> <a-input v-model="user.newUsername"></a-input> </a-form-item> <a-form-item label='{{ i18n "pages.settings.newPassword"}}'> - <password-input v-model="user.newPassword"></password-input> + <password-input autocomplete="new-password" v-model="user.newPassword"></password-input> </a-form-item> <a-form-item label=" "> <a-button type="primary" @click="updateUser">{{ i18n "confirm" }}</a-button> @@ -282,12 +282,12 @@ <setting-list-item type="switch" title='{{ i18n "pages.settings.subShowInfo"}}' desc='{{ i18n "pages.settings.subShowInfoDesc"}}' v-model="allSetting.subShowInfo"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subListen"}}' desc='{{ i18n "pages.settings.subListenDesc"}}' v-model="allSetting.subListen"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subDomain"}}' desc='{{ i18n "pages.settings.subDomainDesc"}}' v-model="allSetting.subDomain"></setting-list-item> - <setting-list-item type="number" title='{{ i18n "pages.settings.subPort"}}' desc='{{ i18n "pages.settings.subPortDesc"}}' v-model.number="allSetting.subPort"></setting-list-item> + <setting-list-item type="number" title='{{ i18n "pages.settings.subPort"}}' desc='{{ i18n "pages.settings.subPortDesc"}}' v-model.number="allSetting.subPort" :min="1" :max="65531"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subPath"}}' desc='{{ i18n "pages.settings.subPathDesc"}}' v-model="allSetting.subPath"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subCertPath"}}' desc='{{ i18n "pages.settings.subCertPathDesc"}}' v-model="allSetting.subCertFile"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subKeyPath"}}' desc='{{ i18n "pages.settings.subKeyPathDesc"}}' v-model="allSetting.subKeyFile"></setting-list-item> <setting-list-item type="text" title='{{ i18n "pages.settings.subURI"}}' desc='{{ i18n "pages.settings.subURIDesc"}}' v-model="allSetting.subURI" placeholder="(http|https)://domain[:port]/path/"></setting-list-item> - <setting-list-item type="number" title='{{ i18n "pages.settings.subUpdates"}}' desc='{{ i18n "pages.settings.subUpdatesDesc"}}' v-model="allSetting.subUpdates"></setting-list-item> + <setting-list-item type="number" title='{{ i18n "pages.settings.subUpdates"}}' desc='{{ i18n "pages.settings.subUpdatesDesc"}}' v-model="allSetting.subUpdates" :min="1"></setting-list-item> </a-list> </a-tab-pane> <a-tab-pane key="5" tab='{{ i18n "pages.settings.subSettings" }} Json' v-if="allSetting.subEnable"> @@ -531,4 +531,4 @@ }); </script> </body> -</html>
\ No newline at end of file +</html> |
