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:
@@ -2,10 +2,15 @@ package login
|
||||
|
||||
import (
|
||||
loginapischema "honoka-chan/internal/schema/api/login"
|
||||
"honoka-chan/internal/session"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func loginTopInfoOnce() (res any, err error) {
|
||||
func loginTopInfoOnce(ctx *gin.Context) (res any, err error) {
|
||||
ss := session.Get(ctx)
|
||||
|
||||
res = loginapischema.TopInfoOnceResp{
|
||||
Result: loginapischema.TopInfoOnceData{
|
||||
NewAchievementCnt: 0,
|
||||
@@ -22,7 +27,7 @@ func loginTopInfoOnce() (res any, err error) {
|
||||
Lbonus: false,
|
||||
Event: false,
|
||||
Secretbox: false,
|
||||
Birthday: true,
|
||||
Birthday: ss.UserPref.HasBirthDate(),
|
||||
},
|
||||
OpenArena: true,
|
||||
CostumeStatus: true,
|
||||
|
||||
Reference in New Issue
Block a user