diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-12 18:49:32 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2024-01-12 18:49:32 +0300 |
| commit | 98cf1f2db6ddf2b8afb8cd2d9be7238940eb6b5a (patch) | |
| tree | a13936c5d9ae0ef5277907434c625e80a657f9bb | |
| parent | 4b5dd99555d30dc1edf6dcbe57c0f6eadc711284 (diff) | |
[bug] fix switch enable inbound
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
| -rw-r--r-- | web/html/xui/inbounds.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html index 7c50f48e..8bbc440d 100644 --- a/web/html/xui/inbounds.html +++ b/web/html/xui/inbounds.html @@ -244,7 +244,7 @@ </span> </a-menu-item> <a-menu-item v-if="isMobile"> - <a-switch size="small" v-model="dbInbound.enable" @change="switchEnable(dbInbound.id)"></a-switch> + <a-switch size="small" v-model="dbInbound.enable" @change="switchEnable(dbInbound.id,dbInbound.enable)"></a-switch> {{ i18n "pages.inbounds.enable" }} </a-menu-item> </a-menu> @@ -314,7 +314,7 @@ </a-popover> </template> <template slot="enable" slot-scope="text, dbInbound"> - <a-switch v-model="dbInbound.enable" @change="switchEnable(dbInbound.id)"></a-switch> + <a-switch v-model="dbInbound.enable" @change="switchEnable(dbInbound.id,dbInbound.enable)"></a-switch> </template> <template slot="expiryTime" slot-scope="text, dbInbound"> <a-popover v-if="dbInbound.expiryTime > 0" :overlay-class-name="themeSwitcher.currentTheme"> @@ -1034,9 +1034,9 @@ newDbInbound = this.checkFallback(dbInbound); infoModal.show(newDbInbound, index); }, - switchEnable(dbInboundId) { + switchEnable(dbInboundId,state) { dbInbound = this.dbInbounds.find(row => row.id === dbInboundId); - dbInbound.enable = !dbInbound.enable; + dbInbound.enable = state; this.submit(`/panel/inbound/update/${dbInboundId}`, dbInbound); }, async switchEnableClient(dbInboundId, client) { |
