webui: Add profile reset defaults

- Add a reset action for profile values in the admin page
- Restore reset values to the auto-created user defaults instead of the bootstrap user
- Remind users to re-login after saving or resetting profile changes

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-04 19:31:48 +08:00
parent 2e2b6259b5
commit 1b0116539f
4 changed files with 116 additions and 4 deletions
+2 -2
View File
@@ -136,8 +136,8 @@ func addUser(dbSession *xorm.Session, phone, password string, isDefault bool) (g
awardID := 1 // 音乃木坂学生
backgroundID := 1 // 初始背景
unitID := 31 // 初始高坂穂乃果
userName := "音乃木坂学生"
userDesc := "你好。"
userName := usermodel.DefaultAutoUserName
userDesc := usermodel.DefaultAutoUserDesc
// 是否初始化
if isDefault {
// 初始化默认用户