Closed jptrsn closed 3 months ago
The changes enhance user profile management in the application by integrating supporter profiles through the addition of new actions, effects, and UI components. This includes a variety of modifications across multiple files, allowing for retrieval, display, and management of supporter-related data, along with improved localization support for different languages. The overall aim is to enrich user interactions and provide better insights regarding user contributions via Patreon.
Files | Change Summary |
---|---|
packages/client/src/app/actions/user.actions.ts |
Added new actions for handling supporter profiles, including fetching and managing success or failure states. |
packages/client/src/app/effects/user.effects.ts |
Introduced a new effect to manage the loading of supporter profiles in response to user actions. |
packages/client/src/app/modules/user/components/user-profile/*.html , *.scss , *.ts |
Enhanced user profile component to display patronage information, with conditional rendering for active supporters and improved styling. |
packages/client/src/app/modules/user/services/user.service.ts |
Added a method for retrieving supporter profiles and improved error handling consistency. |
packages/client/src/app/reducers/user.reducer.ts |
Extended the UserState interface to include a SupporterProfile and updated reducers to manage new actions related to this profile. |
packages/client/src/app/selectors/user.selector.ts |
Introduced a new selector for accessing supporter profile data from the state. |
packages/client/src/assets/i18n/*.json |
Updated localization files for multiple languages to include new strings related to Patreon login, account deletion feedback, and supporter status messages. |
packages/server/src/app/models/supporter.model.ts |
Enhanced the Supporter model with more specific types for properties and added comments for better clarity. |
packages/server/src/app/modules/user/user.controller.ts |
Added a new route to retrieve user support information, integrating with the AppService . |
packages/server/src/app/modules/user/user.module.ts |
Modified the user module to include the Supporter model and AppService , enhancing functionality. |
packages/server/src/app/strategies/jwt.strategy.ts |
Removed unnecessary logging from the JWT validation process to streamline performance. |
sequenceDiagram
participant User
participant UserController
participant UserService
participant AppService
participant Store
participant UserProfileComponent
User->>UserController: GET /profile/:id/support
UserController->>UserService: fetchUser(id)
UserService->>AppService: getSupporterProfile(email)
AppService-->>UserService: SupporterProfile data
UserService-->>UserController: SupporterProfile data
UserController-->>User: SupporterProfile JSON
User->>UserProfileComponent: Update Profile View
UserProfileComponent->>Store: selectUserSupportProfile()
Store-->>UserProfileComponent: Display Supporter Information
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This PR adds the ability to render patreon information for supporters who are found in the database.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style
Chores