1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-18 20:33:00 +01:00
bitwarden-estensione-browser/apps/desktop/src
Matt Gibson 7a7fe08a32
Ps/pm 2910/handle switch messaging (#6823)
* Handle switch messaging

TODO: handle loading state for account switcher

* Async updates required for state

* Fallback to email for current account avatar

* Await un-awaited promises

* Remove unnecessary Prune

Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning

* Fix temp password in browser

* Use direct memory access until data is serializable

Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service

* Reload badge and context menu on switch

* Gracefully switch account as they log out.

* Maintain location on account switch

* Remove unused state definitions

* Prefer null for state

undefined can be misinterpreted to indicate a value has not been set.

* Hack: structured clone in memory storage

We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context

* Null check nullable values

active account can be null, so we should include null safety in the
equality

* Correct background->foreground switch command

* Already providing background memory storage

* Handle connection and clipboard on switch account

* Prefer strict equal

* Ensure structuredClone is available to jsdom

This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.

* Fixup types in faker class
2023-11-29 09:59:50 -05:00
..
app Ps/pm 2910/handle switch messaging (#6823) 2023-11-29 09:59:50 -05:00
auth Assign ownership to many libs files (#6928) 2023-11-27 20:59:44 +00:00
images [PM-1222] Store passkeys in Bitwarden vault (#4715) 2023-10-17 15:34:44 -04:00
locales Autosync the updated translations (#6971) 2023-11-27 12:45:32 +01:00
main Switch NodeJS.Timer to NodeJS.Timeout (#6916) 2023-11-23 13:10:23 +01:00
models
platform Assign ownership to many libs files (#6928) 2023-11-27 20:59:44 +00:00
proxy
scss [PM-3000] Add Environment URLs to Account Switcher (#5978) 2023-11-15 11:02:11 -08:00
services Assign ownership to many libs files (#6928) 2023-11-27 20:59:44 +00:00
types [PM-3683] Remove ipcRenderer from electron-platform-utils (#6679) 2023-11-01 18:34:36 +01:00
vault/app Assign ownership to many libs files (#6928) 2023-11-27 20:59:44 +00:00
entry.ts
global.d.ts
index.html
main.ts Ps/pm 2910/add browser storage services (#6849) 2023-11-21 16:35:37 -05:00
package-lock.json Bumped desktop version to 2023.10.2 (#6833) 2023-11-08 11:17:35 -05:00
package.json Bumped desktop version to 2023.10.2 (#6833) 2023-11-08 11:17:35 -05:00
preload.ts [PM-3677] Remove ipcRenderer from desktop utils (#6477) 2023-11-09 12:48:18 +01:00
utils.spec.ts
utils.ts [PM-3677] Remove ipcRenderer from desktop utils (#6477) 2023-11-09 12:48:18 +01:00