diff options
| author | Shishkevich D. <135337715+shishkevichd@users.noreply.github.com> | 2025-05-09 06:46:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-09 06:46:29 +0300 |
| commit | 1ddfe4aba3ff16df9e5006051407d2488ffe4a59 (patch) | |
| tree | 28eb61df88797217558fd168e3a3bac7b49dc7b6 /web/controller/setting.go | |
| parent | fe3b1c9b52f584b0f045907585b206344fed55db (diff) | |
chore: toasts translation refactoring
Diffstat (limited to 'web/controller/setting.go')
| -rw-r--r-- | web/controller/setting.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/controller/setting.go b/web/controller/setting.go index dd99e0f5..ddd9f55a 100644 --- a/web/controller/setting.go +++ b/web/controller/setting.go @@ -80,11 +80,11 @@ func (a *SettingController) updateUser(c *gin.Context) { } user := session.GetLoginUser(c) if user.Username != form.OldUsername || !crypto.CheckPasswordHash(user.Password, form.OldPassword) { - jsonMsg(c, I18nWeb(c, "pages.settings.toasts.modifyUser"), errors.New(I18nWeb(c, "pages.settings.toasts.originalUserPassIncorrect"))) + jsonMsg(c, I18nWeb(c, "pages.settings.toasts.modifyUserError"), errors.New(I18nWeb(c, "pages.settings.toasts.originalUserPassIncorrect"))) return } if form.NewUsername == "" || form.NewPassword == "" { - jsonMsg(c, I18nWeb(c, "pages.settings.toasts.modifyUser"), errors.New(I18nWeb(c, "pages.settings.toasts.userPassMustBeNotEmpty"))) + jsonMsg(c, I18nWeb(c, "pages.settings.toasts.modifyUserError"), errors.New(I18nWeb(c, "pages.settings.toasts.userPassMustBeNotEmpty"))) return } err = a.userService.UpdateUser(user.Id, form.NewUsername, form.NewPassword) @@ -98,7 +98,7 @@ func (a *SettingController) updateUser(c *gin.Context) { func (a *SettingController) restartPanel(c *gin.Context) { err := a.panelService.RestartPanel(time.Second * 3) - jsonMsg(c, I18nWeb(c, "pages.settings.restartPanel"), err) + jsonMsg(c, I18nWeb(c, "pages.settings.restartPanelSuccess"), err) } func (a *SettingController) getDefaultXrayConfig(c *gin.Context) { |
