Skip to content

Class code after change password#298

Open
180079995 wants to merge 3 commits intomainfrom
ClassCode-after-change-password
Open

Class code after change password#298
180079995 wants to merge 3 commits intomainfrom
ClassCode-after-change-password

Conversation

@180079995
Copy link
Contributor

This pull request updates the src/routes/profile/change-password/+page.svelte file to enhance user experience by introducing logic to handle a classCode for navigation and improve user context during the password change process.

Enhancements to user experience:

  • Added onMount logic to retrieve and process classCode: The onMount lifecycle function now fetches the user's profile using the getUser utility and extracts a classCode from the user's email domain if available. ([src/routes/profile/change-password/+page.svelteR6-R24](https://github.com/hinagiku-dev/Hinagiku/pull/298/files#diff-2ed60c2b9a8230da8752f8357bea68163cc9ac7af001e10afc8b908481fa0260R6-R24))
  • Updated navigation logic after password change: If a classCode is present, it is converted to uppercase and appended as a query parameter to the /login route for improved contextual navigation. ([src/routes/profile/change-password/+page.svelteR57-R60](https://github.com/hinagiku-dev/Hinagiku/pull/298/files#diff-2ed60c2b9a8230da8752f8357bea68163cc9ac7af001e10afc8b908481fa0260R57-R60))

@180079995 180079995 requested review from JacobLinCool and Copilot July 1, 2025 08:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the change password page to enhance user experience by introducing logic to extract a classCode from the user's email and incorporate it into navigation post-password change.

  • Added an onMount hook to retrieve the user's profile and extract a classCode from their email.
  • Updated the post-password change navigation logic to conditionally append the classCode as a query parameter.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants