Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-20 17:45:20 +0300
committerHamidreza Ghavami <70919649+hamid-gh98@users.noreply.github.com>2023-05-20 17:45:20 +0300
commit4831c2f1b2c73c1e40f23a61e728530b7cf4afe9 (patch)
treeedbc420456de52a9a936e76f99d09ec164e43eb2 /web
parent3166d497f99df530e3a909ab1ba134fe53ef39ff (diff)
Add tgLang option
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/model/models.js1
-rw-r--r--web/entity/entity.go1
-rw-r--r--web/network/auto_https_conn.go (renamed from web/network/autp_https_conn.go)0
-rw-r--r--web/service/setting.go5
4 files changed, 7 insertions, 0 deletions
diff --git a/web/assets/js/model/models.js b/web/assets/js/model/models.js
index a3fd2633..e1fb5d02 100644
--- a/web/assets/js/model/models.js
+++ b/web/assets/js/model/models.js
@@ -181,6 +181,7 @@ class AllSetting {
this.tgRunTime = "@daily";
this.tgBotBackup = false;
this.tgCpu = "";
+ this.tgLang = "";
this.xrayTemplateConfig = "";
this.secretEnable = false;
diff --git a/web/entity/entity.go b/web/entity/entity.go
index b370b7ba..52f26769 100644
--- a/web/entity/entity.go
+++ b/web/entity/entity.go
@@ -41,6 +41,7 @@ type AllSetting struct {
TgRunTime string `json:"tgRunTime" form:"tgRunTime"`
TgBotBackup bool `json:"tgBotBackup" form:"tgBotBackup"`
TgCpu int `json:"tgCpu" form:"tgCpu"`
+ TgLang string `json:"tgLang" form:"tgLang"`
XrayTemplateConfig string `json:"xrayTemplateConfig" form:"xrayTemplateConfig"`
TimeLocation string `json:"timeLocation" form:"timeLocation"`
SecretEnable bool `json:"secretEnable" form:"secretEnable"`
diff --git a/web/network/autp_https_conn.go b/web/network/auto_https_conn.go
index d1a9d521..d1a9d521 100644
--- a/web/network/autp_https_conn.go
+++ b/web/network/auto_https_conn.go
diff --git a/web/service/setting.go b/web/service/setting.go
index d3072252..fec324af 100644
--- a/web/service/setting.go
+++ b/web/service/setting.go
@@ -39,6 +39,7 @@ var defaultValueMap = map[string]string{
"tgRunTime": "@daily",
"tgBotBackup": "false",
"tgCpu": "0",
+ "tgLang": "en-US",
"secretEnable": "false",
}
@@ -256,6 +257,10 @@ func (s *SettingService) GetTgCpu() (int, error) {
return s.getInt("tgCpu")
}
+func (s *SettingService) GetTgLang() (string, error) {
+ return s.getString("tgLang")
+}
+
func (s *SettingService) GetPort() (int, error) {
return s.getInt("webPort")
}