webui: Add user birthday settings

- Store birth month and day in user_pref with default 10/18
- Migrate existing user_pref rows to fill missing birthday fields
- Expose birthday editing in the webui profile page
- Replace hardcoded birthday values in user info, top info, and product list responses
- Fix birthday month/day field alignment in the profile form

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-05 05:48:36 +08:00
parent 101f7e8a3f
commit 947da92a66
14 changed files with 143 additions and 19 deletions
+2 -2
View File
@@ -18,8 +18,8 @@ func userInfo(ctx *gin.Context) {
ResponseData: userschema.UserInfoData{
User: ss.GetUserInfo(),
Birth: userschema.Birth{
BirthMonth: 10,
BirthDay: 18,
BirthMonth: ss.UserPref.EffectiveBirthMonth(),
BirthDay: ss.UserPref.EffectiveBirthDay(),
},
ServerTimestamp: time.Now().Unix(),
},