Commit Graph

10 Commits

Author SHA1 Message Date
Oscar Hinton 3aa52a5537
Add eslint (#1369) 2022-02-24 20:50:19 +01:00
Daniel James Smith 2b58861296
[AccountSwitching]Make account switcher accessible (#1289)
* Make account switcher keyboard accessible

* ScreenReader: Announce submenu and expansion

* ScreenReader: Announc switch account button with account info

* Fix tab focus on dropdown

* Fix esc not changing state

* Fix linting issues

Co-authored-by: Hinton <oscar@oscarhinton.com>
2022-02-03 17:46:14 +01:00
Addison Beck d211b3fcd2
Unset active account when adding additional accounts (#1258) 2022-01-24 07:28:39 -05:00
Oscar Hinton 0edee78da1
Change account switching dropdown to align with the right side (#1248) 2022-01-20 16:32:05 +01:00
Daniel James Smith 12bb8b060c
[Account switching] Design changes (#1240)
* Various design changes to the account switcher

* Hide serverUrl on cloud accounts

* Display account limit reached instead of add account
2022-01-19 17:03:34 +01:00
Daniel James Smith 8b521aa35e
[Account switching] Hide active account (#1241)
* Hide active account from dropdown

* No longer need to check if selected account is active before switching

* Applied feedback from PR review
2022-01-18 21:43:14 +01:00
Daniel James Smith d885e3296b
Do not switch accounts if it is already the active account (#1229) 2022-01-12 17:20:07 +01:00
Addison Beck f32b917a9f
[Account Switching] Misc Bug Fixes and Refactors (#1223)
* [bug] Pull serverUrl directly from stateService for the account switcher

Create a small extended Account model for handling the switchers server url, and pull environment urls from disk where they actually live

* [refactor] Add a message handler for switching accounts

* This allows for logic reuse between manually switching accounts and automatically switching accounts on login
* This commit also adds a loading spinner to app root while syncing after a switch

* [bug] Remove vertical scrollbar

* An old styling fix to add extra height and padding seems to be now creating an unecassary scroll bar. It is likely that since making more use of flexbox for our containers that this issue has been resolved without the manually added extra hight & padding

* [refactor] Turn down activity monitoring

Saving last activity is a disk call, and we currently do this a lot more than is necassary. For example:
* We track mousedown & click, which is redundant
* We track every mouse movement regardless of if an action is taken. This seems inappropriate for use in locking behavior.

* [bug] Address potential race condition when locking

Sometimes when swapping between an unlocked account and a locked account a race condition occurs that swaps the user but doesn't redirect to the lock screen
This commit just adds some awaits and restructures lock order of operations to be more in line with other message handlers

* [refactor] Change click event to mousedown event for the account switcher

This is simply a little snappier, and ensures we stay ahead of change detection and don't get stuck not properly interpreting the action

* [chore] Update jslib

* [chore] Linter fixes

* [chore] Linter fixes

* [chore] Update jslib

* [chore] Update jslib
2022-01-12 09:23:00 -05:00
Oscar Hinton 521feae535
Apply Prettier (#1202) 2021-12-20 15:47:17 +01:00
Addison Beck 0b306ca1a7
[Account Switching] [Feature] Add the ability to maintain state for up to 5 accounts at once (#1079)
* [refactor] Remove references to deprecated services

* [feature] Implement account switching

* [bug] Fix state handling for authentication dependent system menu items

* [bug] Enable the account switcher to fucntion properly when switching to a locked accounts

* [feature] Enable locking any account from the menu

* [bug] Ensure the avatar instance used in the account switcher updates on account change

* [style] Fix lint complaints

* [bug] Ensure the logout command callback can handle any user in state

* [style] Fix lint complaints

* rollup

* [style] Fix lint complaints

* [bug] Don't clean up state until everything else is done on logout

* [bug] Navigate to vault on a succesful account switch

* [bug] Init the state service on start

* [feature] Limit account switching to 5 account maximum

* [bug] Resolve app lock state with 5 logged out accounts

* [chore] Update account refrences to match recent jslib restructuring

* [bug] Add missing awaits

* [bug] Update app menu on logout

* [bug] Hide the switcher if there are no authed accounts

* [bug] Move authenticationStatus display information out of jslib

* [bug] Remove unused active style from scss

* [refactor] Rewrite the menu bar

* [style] Fix lint complaints

* [bug] Clean state of loggout out user after redirect

* [bug] Redirect on logout if not explicity provided a userId that isn't active

* [bug] Relocated several settings items to persistant storage

* [bug] Correct account switcher styles on all themes

* [chore] Include state migration service in services

* [bug] Swap to next account on logout

* [bug] Correct DI service

* [bug] fix loginGuard deps in services.module

* [chore] update jslib

* [bug] Remove badly merged scss

* [chore] update jslib

* [review] Code review cleanup

* [review] Code review cleanup

Co-authored-by: Hinton <oscar@oscarhinton.com>
2021-12-15 17:32:00 -05:00