From f1a87c7d925364f2a743315bb99ae816da633628 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Tue, 28 Mar 2023 23:58:45 +0200 Subject: [PATCH] [sub] fix conflicts --- database/model/model.go | 2 ++ web/assets/js/model/xray.js | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/database/model/model.go b/database/model/model.go index e87e8b6b..c1079914 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -74,5 +74,7 @@ type Client struct { Email string `json:"email"` TotalGB int64 `json:"totalGB" form:"totalGB"` ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` + Enable bool `json:"enable" from:"enable"` + TgID string `json:"tgId" from:"tgId"` SubID string `json:"subId" from:"subId"` } diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index 6e552d15..93693e33 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -1431,13 +1431,15 @@ Inbound.VmessSettings = class extends Inbound.Settings { } }; Inbound.VmessSettings.Vmess = class extends XrayCommonClass { - , subId='') { + constructor(id=RandomUtil.randomUUID(), alterId=0, email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.id = id; this.alterId = alterId; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; + this.enable = enable; + this.tgId = tgId; this.subId = subId; } @@ -1448,6 +1450,8 @@ Inbound.VmessSettings.Vmess = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, + json.enable, + json.tgId, json.subId, ); } @@ -1514,14 +1518,15 @@ Inbound.VLESSSettings = class extends Inbound.Settings { }; Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { - - , subId='') { + constructor(id=RandomUtil.randomUUID(), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.id = id; this.flow = flow; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; + this.enable = enable; + this.tgId = tgId; this.subId = subId; } @@ -1532,6 +1537,8 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, + json.enable, + json.tgId, json.subId, ); } @@ -1629,13 +1636,15 @@ Inbound.TrojanSettings = class extends Inbound.Settings { } }; Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { - , subId='') { + constructor(password=RandomUtil.randomSeq(10), flow='', email=RandomUtil.randomText(), totalGB=0, expiryTime=0, enable=true, tgId='', subId='') { super(); this.password = password; this.flow = flow; this.email = email; this.totalGB = totalGB; this.expiryTime = expiryTime; + this.enable = enable; + this.tgId = tgId; this.subId = subId; } @@ -1646,6 +1655,8 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { email: this.email, totalGB: this.totalGB, expiryTime: this.expiryTime, + enable: this.enable, + tgId: this.tgId, subId: this.subId, }; } @@ -1657,6 +1668,8 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { json.email, json.totalGB, json.expiryTime, + json.enable, + json.tgId, json.subId, ); }