1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-30 04:28:19 +02:00
bitwarden-browser/apps/browser
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
..
.vscode
config Ps/pm 2910/browser header component (#6641) 2023-10-25 18:27:32 +00:00
src Ps/pm 2910/handle switch messaging (#6823) 2023-11-29 09:59:50 -05:00
store Autosync the updated translations (#6852) 2023-11-10 07:17:38 +00:00
.gitignore Ps/pm 2910/browser header component (#6641) 2023-10-25 18:27:32 +00:00
crowdin.yml Fix Crowdin Pull workflow (#2667) 2022-05-10 10:20:32 -04:00
gulpfile.js [PM-4229] Autofill Overlay MVP (#6507) 2023-11-20 18:34:04 +00:00
jest.config.js [PM-2328] Fix jest deprecations (#5483) 2023-05-22 20:19:16 +02:00
package.json Bumped browser version to 2023.10.2 (#6816) 2023-11-06 20:42:24 -05:00
postcss.config.js [PM-2237] Add tailwind to desktop & browser (#5326) 2023-07-14 15:03:42 -04:00
README.md Update urls to match the contributing docs (#4192) 2022-12-06 11:20:27 +01:00
tailwind.config.js [PM-2237] Add tailwind to desktop & browser (#5326) 2023-07-14 15:03:42 -04:00
test.setup.ts Ps/pm 2910/add browser storage services (#6849) 2023-11-21 16:35:37 -05:00
tsconfig.json [PM-4222] Make importer UI reusable (#6504) 2023-10-19 11:17:23 +02:00
tsconfig.spec.json [PM-3285] Autofill v2 Feature Branch (#5939) 2023-09-07 15:33:04 -05:00
webpack.config.js [PM-4229] Autofill Overlay MVP (#6507) 2023-11-20 18:34:04 +00:00

Github Workflow build browser on master Crowdin Join the chat at https://gitter.im/bitwarden/Lobby

Bitwarden Browser Extension

The Bitwarden browser extension is written using the Web Extension API and Angular.

My Vault

Documentation

Please refer to the Browser section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.