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:
1 parent
93be3a2880
commit
aeb8adae4c
4 files changed
+78
-11
No files matched your search
@@ -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 }) });
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user