feat: public user profile API + settings swipe navigation

- GET /api/users/profile/:username public endpoint (no auth) for user
  pages, matching upstream main; UserProfile uses it (was admin /users
  search)
- Settings page: vertical scroll-snap panels (profile/security/recovery),
  swipe up/down to switch smoothly; sidebar nav scrolls to panel and
  active highlight follows scroll position
This commit is contained in:
lezi-fun committed 2026-08-11 10:07:21 +08:00
1 parent fe71b03d2e
commit 0b86c54867
4 files changed
+78 -11

No files matched your search

+1
View File
@@ -75,6 +75,7 @@ export const API = {
// 用户管理
getUsers() { return apiFetch('/users'); },
getUsersByUsername(username) { return apiFetch('/users?username=' + encodeURIComponent(username)); },
getUserProfile(username) { return apiFetch('/users/profile/' + encodeURIComponent(username)); },
updateUserRole(userId, role) {
return apiFetch('/users/' + userId + '/role', { method: 'PUT', body: JSON.stringify({ role }) });
},