Commit Graph
12 Commits
Author SHA1 Message Date
YumeMichi 1b0116539f 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>
2026-06-04 19:31:48 +08:00
YumeMichi fa2efe4298 webui: Make some user preferences configurable
This extends 09f0237560.

- Extend user_pref with configurable profile fields and automatic migration defaults
- Move user info responses to read from user_pref instead of hardcoded values
- Add admin profile page for editing UI values after login

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 19:31:27 +08:00
YumeMichi e61c07a9a3 Reduce handler request boilerplate
- Add session.Attach to reuse per-request sessions across middleware and ghome handlers
- Make Session finalize/abort paths idempotent to avoid duplicate commit or rollback work
- Move request_data parsing helper to internal/utils
- Expand ParseRequestData usage across api, download, unit, live, multiunit, and subscenario handlers
- Extract download package metadata into internal/handler/download/types.go
- Return explicit errors from selected session lookup helpers and update callers
- Make api action handlers return errors directly instead of calling ss.CheckErr in nested layers

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 03:05:32 +08:00
YumeMichi 60677fe0dd Disable floating window permission requirement
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-06-04 02:24:40 +08:00
YumeMichi ecef4dfa2c Fix login SQLITE_BUSY by reusing session transaction
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-29 11:55:21 +08:00
YumeMichi 1e52fd04af Normalize phone input and default user phone
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 20:08:21 +08:00
YumeMichi 581990a52f Refactor user bootstrap
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 19:59:27 +08:00
YumeMichi f1066acbfb Replace recursive user id retry with bounded loop
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi eeaf1d9c73 Validate decoded query and required params
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi ae847f5e29 Validate rand key length before 3des operations
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi 150ce674ad Implement more endpoints & overhaul [2/n]
Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
2026-04-28 11:44:56 +08:00
YumeMichi c77241a883 Overhaul [1/n]
Signed-off-by: Sean Du <do4suki@gmail.com>
2026-01-29 02:42:28 +08:00