[PR #4484] Change User Accounts Simple Feature #4827

Open
opened 2026-03-17 02:19:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4484
Author: @Olly4k
Created: 10/27/2024
Status: 🔄 Open

Base: mainHead: feat/switch_users


📝 Commits (10+)

  • ad3e1bd Created a new vue file in firebase called switch
  • 5483113 updated siwtch vue
  • 9a28757 copied logout into switch vue
  • 60172af Made a new switch button
  • 938c7a3 Added login modal
  • d43a4fa fixed button name error
  • 8f43cb0 hidden login
  • 48b2f04 fixed rogue < bug
  • d2076fa modified on click handler in switch.vue
  • 09a2328 added debug logs and new action handler

📊 Changes

35 files changed (+461 additions, -0 deletions)

View changed files

📝 packages/hoppscotch-common/locales/af.json (+1 -0)
📝 packages/hoppscotch-common/locales/ar.json (+1 -0)
📝 packages/hoppscotch-common/locales/ca.json (+1 -0)
📝 packages/hoppscotch-common/locales/cn.json (+1 -0)
📝 packages/hoppscotch-common/locales/cs.json (+1 -0)
📝 packages/hoppscotch-common/locales/da.json (+1 -0)
📝 packages/hoppscotch-common/locales/de.json (+1 -0)
📝 packages/hoppscotch-common/locales/el.json (+1 -0)
📝 packages/hoppscotch-common/locales/en.json (+1 -0)
📝 packages/hoppscotch-common/locales/es.json (+1 -0)
📝 packages/hoppscotch-common/locales/fi.json (+1 -0)
📝 packages/hoppscotch-common/locales/fr.json (+1 -0)
📝 packages/hoppscotch-common/locales/he.json (+1 -0)
📝 packages/hoppscotch-common/locales/hu.json (+1 -0)
📝 packages/hoppscotch-common/locales/id.json (+1 -0)
📝 packages/hoppscotch-common/locales/it.json (+1 -0)
📝 packages/hoppscotch-common/locales/ja.json (+1 -0)
📝 packages/hoppscotch-common/locales/ko.json (+1 -0)
📝 packages/hoppscotch-common/locales/nl.json (+1 -0)
📝 packages/hoppscotch-common/locales/no.json (+1 -0)

...and 15 more files

📄 Description

Closes #4322

This PR provides a small, frontend based solution to the account switching feature mentioned in the linked issue. It is a quality of life change that prevents the need to logout of an account only to just log straight back in with another. It does this by placing a Change Accounts button above the logout button in the profile dropdown menu. This opens a variation on the login modal that can be used to login to a different account.

What's changed

  • Added Switch.vue file in hoppscotch-common's firebase resources next to both Login.vue and logout.vue. This contains the majority of code involved in rendering the button and the custom login modal. It has purposefully been separated from the login.vue file's component to allow for further modification if needed however it also can be replaced by the login modal if needed.
  • Added the FirebaseSwitch button component in components.d.ts
  • Used the FirebaseSwitch component in the Header.vue file's profile dropdown menu
  • Added a new label tag in all locales called auth.change_accounts that says "Change Accounts" in all languages
Screenshot 2024-10-27 at 11 07 22 pm Screenshot 2024-10-27 at 10 04 45 pm

Notes to reviewers

This is targeted as a temporary solution to the problem without reworking the backend. Since the issue is low priority I believe this fix will be enough for now with the option for improvements in the future.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4484 **Author:** [@Olly4k](https://github.com/Olly4k) **Created:** 10/27/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/switch_users` --- ### 📝 Commits (10+) - [`ad3e1bd`](https://github.com/hoppscotch/hoppscotch/commit/ad3e1bdc180732e8592a57a1da143f21f05be080) Created a new vue file in firebase called switch - [`5483113`](https://github.com/hoppscotch/hoppscotch/commit/5483113378b4a244e8478469a8d18ea9df08f022) updated siwtch vue - [`9a28757`](https://github.com/hoppscotch/hoppscotch/commit/9a28757669e2c0932a4af23bb3a8eafaa846dc12) copied logout into switch vue - [`60172af`](https://github.com/hoppscotch/hoppscotch/commit/60172af53dbc8dc3607114e0a07d53a80eb0fdab) Made a new switch button - [`938c7a3`](https://github.com/hoppscotch/hoppscotch/commit/938c7a3d340b2229cffa3d1162b90123537da1f7) Added login modal - [`d43a4fa`](https://github.com/hoppscotch/hoppscotch/commit/d43a4fa14e7cef50e93201dd4d1e243bb3e62b8a) fixed button name error - [`8f43cb0`](https://github.com/hoppscotch/hoppscotch/commit/8f43cb08e4dac557bdf288046c504abe1b2517f2) hidden login - [`48b2f04`](https://github.com/hoppscotch/hoppscotch/commit/48b2f0493473309b33fc5f7478187ec8c7373323) fixed rogue < bug - [`d2076fa`](https://github.com/hoppscotch/hoppscotch/commit/d2076fa0677e2133ac7ed3c944e7f9b1b25a3db1) modified on click handler in switch.vue - [`09a2328`](https://github.com/hoppscotch/hoppscotch/commit/09a2328c7e735820d6365b03d098fee038c73a77) added debug logs and new action handler ### 📊 Changes **35 files changed** (+461 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/af.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/ar.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/ca.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/cn.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/cs.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/da.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/de.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/el.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/es.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/fi.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/fr.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/he.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/hu.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/id.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/it.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/ja.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/ko.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/nl.json` (+1 -0) 📝 `packages/hoppscotch-common/locales/no.json` (+1 -0) _...and 15 more files_ </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #4322 <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> This PR provides a small, frontend based solution to the account switching feature mentioned in the linked issue. It is a quality of life change that prevents the need to logout of an account only to just log straight back in with another. It does this by placing a Change Accounts button above the logout button in the profile dropdown menu. This opens a variation on the login modal that can be used to login to a different account. ### What's changed <!-- Describe point by point the different things you have changed in this PR --> - Added Switch.vue file in hoppscotch-common's firebase resources next to both Login.vue and logout.vue. This contains the majority of code involved in rendering the button and the custom login modal. It has purposefully been separated from the login.vue file's component to allow for further modification if needed however it also can be replaced by the login modal if needed. - Added the FirebaseSwitch button component in components.d.ts - Used the FirebaseSwitch component in the Header.vue file's profile dropdown menu - Added a new label tag in all locales called auth.change_accounts that says "Change Accounts" in all languages <img width="898" alt="Screenshot 2024-10-27 at 11 07 22 pm" src="https://github.com/user-attachments/assets/8bd29c26-72ab-4af5-86ec-7a6a675ed338"> <img width="651" alt="Screenshot 2024-10-27 at 10 04 45 pm" src="https://github.com/user-attachments/assets/ad0c9b79-439b-4c8b-ad90-9a70d6b11595"> <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> This is targeted as a temporary solution to the problem without reworking the backend. Since the issue is low priority I believe this fix will be enough for now with the option for improvements in the future. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4827
No description provided.