diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css
index a452dceb16..f1b208ebd7 100644
--- a/web/assets/css/custom.css
+++ b/web/assets/css/custom.css
@@ -180,7 +180,7 @@
.ant-card-dark:hover {
border-color: #e8e8e8;
- box-shadow: 0 2px 8px rgba(255,255,255,.15);
+ /* box-shadow: 0 2px 8px rgba(255,255,255,.15); */
}
.ant-card-dark .ant-table-thead th {
@@ -236,6 +236,10 @@
background-color: #1a212a;
}
+.ant-input-number {
+ min-width: 100px;
+}
+
.ant-card-dark .ant-input,
.ant-card-dark .ant-input-number,
.ant-card-dark .ant-input-number-handler-wrap,
diff --git a/web/controller/inbound.go b/web/controller/inbound.go
index 4559f2a2c1..8360cf629e 100644
--- a/web/controller/inbound.go
+++ b/web/controller/inbound.go
@@ -93,7 +93,7 @@ func (a *InboundController) addInbound(c *gin.Context) {
inbound := &model.Inbound{}
err := c.ShouldBind(inbound)
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.addTo"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.create"), err)
return
}
user := session.GetLoginUser(c)
@@ -101,7 +101,7 @@ func (a *InboundController) addInbound(c *gin.Context) {
inbound.Enable = true
inbound.Tag = fmt.Sprintf("inbound-%v", inbound.Port)
inbound, err = a.inboundService.AddInbound(inbound)
- jsonMsgObj(c, I18n(c, "pages.inbounds.addTo"), inbound, err)
+ jsonMsgObj(c, I18n(c, "pages.inbounds.create"), inbound, err)
if err == nil {
a.xrayService.SetToNeedRestart()
}
@@ -123,7 +123,7 @@ func (a *InboundController) delInbound(c *gin.Context) {
func (a *InboundController) updateInbound(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
inbound := &model.Inbound{
@@ -131,11 +131,11 @@ func (a *InboundController) updateInbound(c *gin.Context) {
}
err = c.ShouldBind(inbound)
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
inbound, err = a.inboundService.UpdateInbound(inbound)
- jsonMsgObj(c, I18n(c, "pages.inbounds.revise"), inbound, err)
+ jsonMsgObj(c, I18n(c, "pages.inbounds.update"), inbound, err)
if err == nil {
a.xrayService.SetToNeedRestart()
}
@@ -156,7 +156,7 @@ func (a *InboundController) clearClientIps(c *gin.Context) {
err := a.inboundService.ClearClientIps(email)
if err != nil {
- jsonMsg(c, "Revise", err)
+ jsonMsg(c, "Update", err)
return
}
jsonMsg(c, "Log Cleared", nil)
@@ -165,7 +165,7 @@ func (a *InboundController) addInboundClient(c *gin.Context) {
data := &model.Inbound{}
err := c.ShouldBind(data)
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
@@ -183,7 +183,7 @@ func (a *InboundController) addInboundClient(c *gin.Context) {
func (a *InboundController) delInboundClient(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
clientId := c.Param("clientId")
@@ -205,7 +205,7 @@ func (a *InboundController) updateInboundClient(c *gin.Context) {
inbound := &model.Inbound{}
err := c.ShouldBind(inbound)
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
@@ -223,7 +223,7 @@ func (a *InboundController) updateInboundClient(c *gin.Context) {
func (a *InboundController) resetClientTraffic(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
email := c.Param("email")
@@ -251,7 +251,7 @@ func (a *InboundController) resetAllTraffics(c *gin.Context) {
func (a *InboundController) resetAllClientTraffics(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
@@ -266,7 +266,7 @@ func (a *InboundController) resetAllClientTraffics(c *gin.Context) {
func (a *InboundController) delDepletedClients(c *gin.Context) {
id, err := strconv.Atoi(c.Param("id"))
if err != nil {
- jsonMsg(c, I18n(c, "pages.inbounds.revise"), err)
+ jsonMsg(c, I18n(c, "pages.inbounds.update"), err)
return
}
err = a.inboundService.DelDepletedClients(id)
diff --git a/web/controller/setting.go b/web/controller/setting.go
index 2726c22839..bd9c2a5f4d 100644
--- a/web/controller/setting.go
+++ b/web/controller/setting.go
@@ -49,7 +49,7 @@ func (a *SettingController) initRouter(g *gin.RouterGroup) {
func (a *SettingController) getAllSetting(c *gin.Context) {
allSetting, err := a.settingService.GetAllSetting()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
jsonObj(c, allSetting, nil)
@@ -58,7 +58,7 @@ func (a *SettingController) getAllSetting(c *gin.Context) {
func (a *SettingController) getDefaultJsonConfig(c *gin.Context) {
defaultJsonConfig, err := a.settingService.GetDefaultJsonConfig()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
jsonObj(c, defaultJsonConfig, nil)
@@ -67,22 +67,22 @@ func (a *SettingController) getDefaultJsonConfig(c *gin.Context) {
func (a *SettingController) getDefaultSettings(c *gin.Context) {
expireDiff, err := a.settingService.GetExpireDiff()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
trafficDiff, err := a.settingService.GetTrafficDiff()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
defaultCert, err := a.settingService.GetCertFile()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
defaultKey, err := a.settingService.GetKeyFile()
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.getSetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.getSettings"), err)
return
}
result := map[string]interface{}{
@@ -98,27 +98,27 @@ func (a *SettingController) updateSetting(c *gin.Context) {
allSetting := &entity.AllSetting{}
err := c.ShouldBind(allSetting)
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifySetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err)
return
}
err = a.settingService.UpdateAllSetting(allSetting)
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifySetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err)
}
func (a *SettingController) updateUser(c *gin.Context) {
form := &updateUserForm{}
err := c.ShouldBind(form)
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifySetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err)
return
}
user := session.GetLoginUser(c)
if user.Username != form.OldUsername || user.Password != form.OldPassword {
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifyUser"), errors.New(I18n(c, "pages.setting.toasts.originalUserPassIncorrect")))
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifyUser"), errors.New(I18n(c, "pages.settings.toasts.originalUserPassIncorrect")))
return
}
if form.NewUsername == "" || form.NewPassword == "" {
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifyUser"), errors.New(I18n(c, "pages.setting.toasts.userPassMustBeNotEmpty")))
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifyUser"), errors.New(I18n(c, "pages.settings.toasts.userPassMustBeNotEmpty")))
return
}
err = a.userService.UpdateUser(user.Id, form.NewUsername, form.NewPassword)
@@ -127,19 +127,19 @@ func (a *SettingController) updateUser(c *gin.Context) {
user.Password = form.NewPassword
session.SetLoginUser(c, user)
}
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifyUser"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifyUser"), err)
}
func (a *SettingController) restartPanel(c *gin.Context) {
err := a.panelService.RestartPanel(time.Second * 3)
- jsonMsg(c, I18n(c, "pages.setting.restartPanel"), err)
+ jsonMsg(c, I18n(c, "pages.settings.restartPanel"), err)
}
func (a *SettingController) updateSecret(c *gin.Context) {
form := &updateSecretForm{}
err := c.ShouldBind(form)
if err != nil {
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifySetting"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifySettings"), err)
}
user := session.GetLoginUser(c)
err = a.userService.UpdateUserSecret(user.Id, form.LoginSecret)
@@ -147,7 +147,7 @@ func (a *SettingController) updateSecret(c *gin.Context) {
user.LoginSecret = form.LoginSecret
session.SetLoginUser(c, user)
}
- jsonMsg(c, I18n(c, "pages.setting.toasts.modifyUser"), err)
+ jsonMsg(c, I18n(c, "pages.settings.toasts.modifyUser"), err)
}
func (a *SettingController) getUserSecret(c *gin.Context) {
loginUser := session.GetLoginUser(c)
diff --git a/web/controller/xui.go b/web/controller/xui.go
index 5832be846b..1844181dce 100644
--- a/web/controller/xui.go
+++ b/web/controller/xui.go
@@ -23,7 +23,7 @@ func (a *XUIController) initRouter(g *gin.RouterGroup) {
g.GET("/", a.index)
g.GET("/inbounds", a.inbounds)
- g.GET("/setting", a.setting)
+ g.GET("/settings", a.settings)
a.inboundController = NewInboundController(g)
a.settingController = NewSettingController(g)
@@ -37,6 +37,6 @@ func (a *XUIController) inbounds(c *gin.Context) {
html(c, "inbounds.html", "pages.inbounds.title", nil)
}
-func (a *XUIController) setting(c *gin.Context) {
- html(c, "setting.html", "pages.setting.title", nil)
+func (a *XUIController) settings(c *gin.Context) {
+ html(c, "settings.html", "pages.settings.title", nil)
}
diff --git a/web/html/xui/client_bulk_modal.html b/web/html/xui/client_bulk_modal.html
index 00e385b130..274f858838 100644
--- a/web/html/xui/client_bulk_modal.html
+++ b/web/html/xui/client_bulk_modal.html
@@ -43,7 +43,7 @@
-
+
@@ -65,7 +65,7 @@
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
@@ -79,7 +79,7 @@
-
+
diff --git a/web/html/xui/common_sider.html b/web/html/xui/common_sider.html
index 278dc4e501..d059e92024 100644
--- a/web/html/xui/common_sider.html
+++ b/web/html/xui/common_sider.html
@@ -7,9 +7,9 @@
{{ i18n "menu.inbounds"}}
-
+
- {{ i18n "menu.setting"}}
+ {{ i18n "menu.settings"}}
diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html
index 00eeb2599b..efd616842f 100644
--- a/web/html/xui/component/setting.html
+++ b/web/html/xui/component/setting.html
@@ -9,7 +9,7 @@
-
+ $emit('input', value)" :min="min" style="width: 100%;">
diff --git a/web/html/xui/form/client.html b/web/html/xui/form/client.html
index 38402ec7ec..501861db25 100644
--- a/web/html/xui/form/client.html
+++ b/web/html/xui/form/client.html
@@ -22,7 +22,7 @@
-
+
@@ -43,7 +43,7 @@
-
+
@@ -82,7 +82,7 @@
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
@@ -108,7 +108,7 @@
-
+
diff --git a/web/html/xui/form/inbound.html b/web/html/xui/form/inbound.html
index 09e7099d18..603ca46a0a 100644
--- a/web/html/xui/form/inbound.html
+++ b/web/html/xui/form/inbound.html
@@ -25,11 +25,11 @@
-
+
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
diff --git a/web/html/xui/form/protocol/dokodemo.html b/web/html/xui/form/protocol/dokodemo.html
index 53c82c3cbd..f9204b8ca0 100644
--- a/web/html/xui/form/protocol/dokodemo.html
+++ b/web/html/xui/form/protocol/dokodemo.html
@@ -4,7 +4,7 @@
-
+
diff --git a/web/html/xui/form/protocol/socks.html b/web/html/xui/form/protocol/socks.html
index 2662f1d68d..89cde72c38 100644
--- a/web/html/xui/form/protocol/socks.html
+++ b/web/html/xui/form/protocol/socks.html
@@ -1,6 +1,5 @@
{{define "form/socks"}}
-
inbound.settings.auth = checked ? 'password' : 'noauth'">
diff --git a/web/html/xui/form/protocol/trojan.html b/web/html/xui/form/protocol/trojan.html
index b52c4dd900..e63943e610 100644
--- a/web/html/xui/form/protocol/trojan.html
+++ b/web/html/xui/form/protocol/trojan.html
@@ -33,7 +33,7 @@
-
+
@@ -43,7 +43,7 @@
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
@@ -113,7 +113,7 @@
-
+
diff --git a/web/html/xui/form/protocol/vless.html b/web/html/xui/form/protocol/vless.html
index 1d733d021b..33e0c17060 100644
--- a/web/html/xui/form/protocol/vless.html
+++ b/web/html/xui/form/protocol/vless.html
@@ -33,7 +33,7 @@
-
+
@@ -49,7 +49,7 @@
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
@@ -119,7 +119,7 @@
-
+
diff --git a/web/html/xui/form/protocol/vmess.html b/web/html/xui/form/protocol/vmess.html
index 9cd48544bb..6471e20dd7 100644
--- a/web/html/xui/form/protocol/vmess.html
+++ b/web/html/xui/form/protocol/vmess.html
@@ -15,7 +15,7 @@
-
+
@@ -36,11 +36,11 @@
-
+
- {{ i18n "pages.inbounds.totalFlow" }}(GB)
+ {{ i18n "pages.inbounds.totalFlow" }} (GB)
0 {{ i18n "pages.inbounds.meansNoLimit" }}
@@ -67,7 +67,7 @@
-
+