feat: P2.1/P2.2 settings API, age gate, block/mute UI (#18)
* feat(api): add preference, age declaration, block/mute client functions
Add UserPreferences, UpdatePreferencesInput, AgeDeclarationResponse types.
Add getPreferences, updatePreferences, declareAge, blockUser, unblockUser,
muteUser, unmuteUser client functions.
* feat(settings): wire settings page to real API endpoints
Load preferences on mount via GET /api/users/me/preferences, save via
PUT /api/users/me/preferences, handle age gate prompt for mature content
access. Add loading skeleton, error/success alerts, and localStorage
token check. Add MSW handlers for preferences, age-declaration,
block/mute endpoints. Update tests with localStorage mock.
* feat(settings): add age gate dialog for mature content access
Shows confirmation dialog when user tries to enable Mature content.
Calls POST /api/users/me/age-declaration on confirm. WCAG 2.2 AA
compliant with proper ARIA attributes.
* feat(block-mute): add block/mute UI button and integrate into profiles
Reusable BlockMuteButton component with block/unblock and mute/unmute
toggle. Integrated into user profile page with state management.
authored by