From d132ff8839d1bab2ac2a22fadf57cdf9ed666f72 Mon Sep 17 00:00:00 2001 From: egregors Date: Sun, 31 Aug 2025 19:05:05 +0200 Subject: [PATCH] Remove periodic traffic reset fields from client --- database/model/model.go | 31 +++++++++++----------- web/assets/js/model/inbound.js | 14 ---------- web/html/form/client.html | 18 ------------- web/html/form/inbound.html | 36 +++++++++++++------------- web/html/modals/client_bulk_modal.html | 20 -------------- 5 files changed, 33 insertions(+), 86 deletions(-) diff --git a/database/model/model.go b/database/model/model.go index 9d9fb0ef..a34dc097 100644 --- a/database/model/model.go +++ b/database/model/model.go @@ -91,20 +91,19 @@ type Setting struct { } type Client struct { - ID string `json:"id"` - Security string `json:"security"` - Password string `json:"password"` - Flow string `json:"flow"` - Email string `json:"email"` - LimitIP int `json:"limitIp"` - TotalGB int64 `json:"totalGB" form:"totalGB"` - ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` - Enable bool `json:"enable" form:"enable"` - TgID int64 `json:"tgId" form:"tgId"` - SubID string `json:"subId" form:"subId"` - Comment string `json:"comment" form:"comment"` - Reset int `json:"reset" form:"reset"` - PeriodicTrafficReset string `json:"periodicTrafficReset" form:"periodicTrafficReset"` - CreatedAt int64 `json:"created_at,omitempty"` - UpdatedAt int64 `json:"updated_at,omitempty"` + ID string `json:"id"` + Security string `json:"security"` + Password string `json:"password"` + Flow string `json:"flow"` + Email string `json:"email"` + LimitIP int `json:"limitIp"` + TotalGB int64 `json:"totalGB" form:"totalGB"` + ExpiryTime int64 `json:"expiryTime" form:"expiryTime"` + Enable bool `json:"enable" form:"enable"` + TgID int64 `json:"tgId" form:"tgId"` + SubID string `json:"subId" form:"subId"` + Comment string `json:"comment" form:"comment"` + Reset int `json:"reset" form:"reset"` + CreatedAt int64 `json:"created_at,omitempty"` + UpdatedAt int64 `json:"updated_at,omitempty"` } diff --git a/web/assets/js/model/inbound.js b/web/assets/js/model/inbound.js index ec70a3c0..c91dbd11 100644 --- a/web/assets/js/model/inbound.js +++ b/web/assets/js/model/inbound.js @@ -1792,7 +1792,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass { subId = RandomUtil.randomLowerAndNum(16), comment = '', reset = 0, - periodicTrafficReset = 'never', created_at = undefined, updated_at = undefined ) { @@ -1808,7 +1807,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass { this.subId = subId; this.comment = comment; this.reset = reset; - this.periodicTrafficReset = periodicTrafficReset; this.created_at = created_at; this.updated_at = updated_at; } @@ -1826,7 +1824,6 @@ Inbound.VmessSettings.VMESS = class extends XrayCommonClass { json.subId, json.comment, json.reset, - json.periodicTrafficReset, json.created_at, json.updated_at, ); @@ -1910,7 +1907,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { subId = RandomUtil.randomLowerAndNum(16), comment = '', reset = 0, - periodicTrafficReset = 'never', created_at = undefined, updated_at = undefined ) { @@ -1926,7 +1922,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { this.subId = subId; this.comment = comment; this.reset = reset; - this.periodicTrafficReset = periodicTrafficReset; this.created_at = created_at; this.updated_at = updated_at; } @@ -1944,7 +1939,6 @@ Inbound.VLESSSettings.VLESS = class extends XrayCommonClass { json.subId, json.comment, json.reset, - json.periodicTrafficReset, json.created_at, json.updated_at, ); @@ -2058,7 +2052,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { subId = RandomUtil.randomLowerAndNum(16), comment = '', reset = 0, - periodicTrafficReset = 'never', created_at = undefined, updated_at = undefined ) { @@ -2073,7 +2066,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { this.subId = subId; this.comment = comment; this.reset = reset; - this.periodicTrafficReset = periodicTrafficReset; this.created_at = created_at; this.updated_at = updated_at; } @@ -2090,7 +2082,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { subId: this.subId, comment: this.comment, reset: this.reset, - periodicTrafficReset: this.periodicTrafficReset, created_at: this.created_at, updated_at: this.updated_at, }; @@ -2108,7 +2099,6 @@ Inbound.TrojanSettings.Trojan = class extends XrayCommonClass { json.subId, json.comment, json.reset, - json.periodicTrafficReset, json.created_at, json.updated_at, ); @@ -2231,7 +2221,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { subId = RandomUtil.randomLowerAndNum(16), comment = '', reset = 0, - periodicTrafficReset = 'never', created_at = undefined, updated_at = undefined ) { @@ -2247,7 +2236,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { this.subId = subId; this.comment = comment; this.reset = reset; - this.periodicTrafficReset = periodicTrafficReset; this.created_at = created_at; this.updated_at = updated_at; } @@ -2265,7 +2253,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { subId: this.subId, comment: this.comment, reset: this.reset, - periodicTrafficReset: this.periodicTrafficReset, created_at: this.created_at, updated_at: this.updated_at, }; @@ -2284,7 +2271,6 @@ Inbound.ShadowsocksSettings.Shadowsocks = class extends XrayCommonClass { json.subId, json.comment, json.reset, - json.periodicTrafficReset, json.created_at, json.updated_at, ); diff --git a/web/html/form/client.html b/web/html/form/client.html index fd205def..908f28d2 100644 --- a/web/html/form/client.html +++ b/web/html/form/client.html @@ -168,23 +168,5 @@ - - - - - {{ i18n "pages.inbounds.periodicTrafficReset.never" }} - {{ i18n "pages.inbounds.periodicTrafficReset.daily" }} - {{ i18n "pages.inbounds.periodicTrafficReset.weekly" }} - {{ i18n "pages.inbounds.periodicTrafficReset.monthly" }} - - {{end}} \ No newline at end of file diff --git a/web/html/form/inbound.html b/web/html/form/inbound.html index 04f0f50c..38d21660 100644 --- a/web/html/form/inbound.html +++ b/web/html/form/inbound.html @@ -44,24 +44,6 @@ - - - - - - - - - - - {{ i18n "pages.inbounds.periodicTrafficReset.never" }} - {{ i18n "pages.inbounds.periodicTrafficReset.daily" }} - {{ i18n "pages.inbounds.periodicTrafficReset.weekly" }} - {{ i18n "pages.inbounds.periodicTrafficReset.monthly" }} - -