Skip to content

Commit

Permalink
[bug] fix switch enable inbound
Browse files Browse the repository at this point in the history
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
  • Loading branch information
MHSanaei and alireza0 committed Jan 12, 2024
1 parent 4b5dd99 commit 98cf1f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/html/xui/inbounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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">
Expand Down Expand Up @@ -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) {
Expand Down

1 comment on commit 98cf1f2

@amiinhamiid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

من پنل میخوام کجا باید پیام بدم؟؟

Please sign in to comment.