diff --git a/web/html/xui/inbound_info_modal.html b/web/html/xui/inbound_info_modal.html
index 33781157..b18d3c06 100644
--- a/web/html/xui/inbound_info_modal.html
+++ b/web/html/xui/inbound_info_modal.html
@@ -43,7 +43,7 @@
-
URL
[[ infoModal.link ]]
@@ -104,22 +166,24 @@
visible: false,
inbound: new Inbound(),
dbInbound: new DBInbound(),
+ settings: null,
clientSettings: new Inbound.Settings(),
clientStats: [],
upStats: 0,
downStats: 0,
clipboard: null,
link: null,
- index: 0,
+ index: null,
isExpired: false,
- show(dbInbound, index=0) {
+ show(dbInbound, index) {
this.index = index;
this.inbound = dbInbound.toInbound();
this.dbInbound = new DBInbound(dbInbound);
this.link = dbInbound.genLink(index);
- this.clientSettings = Object.values(JSON.parse(this.inbound.settings).clients)[index];
+ this.settings = JSON.parse(this.inbound.settings);
+ this.clientSettings = this.settings.clients ? Object.values(this.settings.clients)[index] : null;
this.isExpired = this.inbound.isExpiry(index);
- this.clientStats = this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email);
+ this.clientStats = this.settings.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : [];
this.visible = true;
infoModalApp.$nextTick(() => {
if (this.clipboard === null) {
@@ -147,22 +211,13 @@
return this.infoModal.inbound;
},
get isEnable() {
- if(infoModal.clientStats){
+ if(infoModal.clientStats.length){
return infoModal.clientStats.enable;
}
- return true;
+ return infoModal.dbInbound.isEnable;
}
},
methods: {
- setQrCode(elmentId,index) {
- content = infoModal.inbound.genLink(infoModal.dbInbound.address,infoModal.dbInbound.remark,index)
-
- new QRious({
- element: document.querySelector('#'+elmentId),
- size: 260,
- value: content,
- });
- },
copyTextToClipboard(elmentId,content) {
this.infoModal.clipboard = new ClipboardJS('#' + elmentId, {
text: () => content,
diff --git a/web/html/xui/inbounds.html b/web/html/xui/inbounds.html
index 29fa798e..725bc9c3 100644
--- a/web/html/xui/inbounds.html
+++ b/web/html/xui/inbounds.html
@@ -86,6 +86,12 @@
{{ i18n "pages.inbounds.export"}}
+
+
+
+ {{ i18n "info"}}
+
+
{{ i18n "pages.inbounds.resetTraffic" }}
@@ -287,6 +293,9 @@
case "qrcode":
this.showQrcode(dbInbound);
break;
+ case "showInfo":
+ this.showInfo(dbInbound);
+ break;
case "edit":
this.openEditInbound(dbInbound.id);
break;