1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00
Commit Graph

11617 Commits

Author SHA1 Message Date
Daniel James Smith
a684c102d7 Bump electron from 16.0.2 to 16.0.7 (#1243)
* Pull jslib to bump electron from 16.0.2 to 16.0.7

* Updates to package-lock.json
2022-01-20 12:22:22 +01:00
Thomas Rittson
11e7133aef Save usesKeyConnector using defaultOnDiskOptions (#617) 2022-01-20 19:32:44 +10:00
Thomas Rittson
9737c829f3 Fix migration to Key Connector in cli commands (#616)
* Move CLI Key Connector check out of base class

* Add missing await

* Move safe operation out of try/catch block

* Move Key Connector migration check to unlock command

* Set convertAccountRequired flag in syncService

* Remove unneeded service
2022-01-20 19:28:48 +10:00
Daniel James Smith
b73449159d Update copy on fingerprint phrase prompt (#1399) 2022-01-20 10:07:47 +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
Addison Beck
b796fe094f [Bug] [Account Switching] Improve State Management Performance (#1237)
* [dep] Implement new StateService factory parameter from jslib

* [bug] Ensure setLastActive uses the correct userId

Sometimes, because of how often it fires, setLastActive can cause accounts to override each other. To make sure the correct userId is always used we now subscribe to activeUser in the appComponent and pass that value into any setLastActive calls.

* [bug] Show loader when logging out

When logging out of a large vault the application can appear to hang. This commit turns on the app component loader while logout is doing work.

* [bug] Stop tracking activity without an active user

* [style] Ran prettier

* [chore] Update jslib
2022-01-19 11:00:28 -05:00
Addison Beck
ccd715d7b8 [Bug] [Account Switching] Improve State Management Performance (#611)
* [bug] Improve state management performance

Large vaults see a clear degrade in performance using the state service, especially when multiple vaults are authed and unlocked at the same time.

Some changes made to address this:
1. Clearing in memory decrypted data for non active accounts. This really should have been something we were doing anyway, but letting go of that memory burden has a noticable performance boost.
2. Not loading a bunch of unecsassary data from disk accounts into memory on application startup. This was being done to initilize in memory accounts, but brought a lot of extra baggage with it like storing encrypted data in memory, even though it is never referenced that way.
3. Breaking the on disk state object up into seperate keys for accounts instead of storing everything together under a "state" key. This ensures there is less information fetched from disk each time we call for an account.

There were some restructuring changes needed to facilitate these items:
1. We need to be able to construct an account in the StateService, but typescript doesn't allow for new() constraints on generics so a factory needs to be created and passed into the StateService for this to work.
2. Since we can't reference an all-knowing "accounts" object for on disk state anymore we have to maintain a list of authenticated accounts, and this has been added.
3. The StateMigration service needed to be updated to break up the accounts object, so current dev and QA state will be broken and need to be reset.

Some other general refactorings that were helpful gettings this working:
1. Added a constant for keys to the StateService and StateMigrationService.
2. Bundling everything needed to deauthenticate a user into a dedicated method.
3. Bundling all the disk storage clear methods (that should be refactored later into client specific state services) into one helper method.
4. Bundling everything needed to dynamically select a new active user into a dedicated method.

* [bug] Set environmentUrls appropriatly on account add

* [bug] Stop tracking activity without an active user

* [bug] Remove lastActive from globalState and globalState migration

* [style] Ran prettier
2022-01-19 10:51:10 -05:00
Kyle Spearrin
922cd1dc54 serve command (#451) 2022-01-19 10:45:14 -05:00
Thomas Rittson
84a0bfb07c Update jslib (#449) 2022-01-19 07:05:48 +10: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
Vince Grassia
ab7fda888f Update Version Bump action to latest (#2271) 2022-01-18 10:31:10 -05:00
Oscar Hinton
3cacf8a8c4 Rename package to @bitwarden/desktop (#1242) 2022-01-18 14:04:21 +01:00
Thomas Rittson
cc285e5ea7 Always migrate envUrls (#614) 2022-01-18 13:44:39 +10:00
Daniel James Smith
8460629de4 Bump electron from 16.0.2 to 16.0.7 (#613) 2022-01-17 17:27:14 +01:00
Oscar Hinton
31e433a49b Rename package to @bitwarden/browser (#2274) 2022-01-17 17:26:35 +01:00
Oscar Hinton
bf48434d0f Rename package to @bitwarden/web-vault (#1396) 2022-01-17 17:23:14 +01:00
Andrew Marquez
3f4032011a Send deletedCipher message to messagingService to refresh badge and menu. Fixes #1708 (#2244) 2022-01-17 16:25:32 +01:00
Oscar Hinton
b6d2d5bf71 [BEEEP] Use shared tsconfig (#1393) 2022-01-17 15:53:19 +01:00
Oscar Hinton
12011bf4da Add a shared tsconfig file (#609) 2022-01-17 13:21:20 +01:00
Vince Grassia
dad1a95fb0 Update Version Bump action to latest (#1238) 2022-01-14 13:32:16 -05:00
Vince Grassia
b6c8307437 Update Version Bump action to latest (#445) 2022-01-14 12:38:38 -05:00
Oscar Hinton
dfd62c7c3a Fix webpack assets using wrong name (#1391) 2022-01-14 13:35:44 +01:00
github-actions[bot]
5b6e5fc4fa Autosync the updated translations (#1236)
Co-authored-by: github-actions <>
2022-01-14 11:21:53 +01:00
github-actions[bot]
41d3bd8cf2 Autosync the updated translations (#1389)
Co-authored-by: github-actions <>
2022-01-14 11:21:40 +01:00
github-actions[bot]
c88f9a4140 Autosync the updated translations (#2268)
Co-authored-by: github-actions <>
2022-01-14 11:21:28 +01:00
Oscar Hinton
4644d03b28 Exclude dist-safari from prettier (#1234) 2022-01-13 18:10:59 +01:00
Matt Gibson
3b1ccb409e Fix/lowdb no cache (#443)
* Add jslib prettier commit to client ignore hashes

* Remove lowdb caching

* Fix state service remove being set to null

* Await in-memory key retrieval

* Fix key loading and unlock requests.

* Linter fixes

* linter fixes

* linter fixes
2022-01-13 11:03:19 -06:00
Daniel James Smith
abede3e5af Fix logging out of all accounts instead of one (#1231)
When logOut is triggered and the userId is not provided. Retrieve currentUserId
2022-01-13 15:43:00 +01:00
Daniel James Smith
7818ffc2fb [Account Switching] Fix menus (#1232)
* Fix enabled/disabling menu items with locked state

* Fix the empty about menu (title)

Moved the items to the help menu
2022-01-13 14:29:49 +01:00
Oscar Hinton
b6117d6801 Re-add native dependencies to src/package.json (#1233) 2022-01-13 10:46:33 +01:00
Thomas Rittson
b962af303a Fix always logging out instead of lock (#444) 2022-01-13 17:35:48 +10:00
Vince Grassia
3292d119fe Update Version Bump action (#1388) 2022-01-12 16:06:50 -05:00
Thomas Rittson
ddcfe23367 Make lowdbStorageService wait until initialised (#605)
* Make lowdbStorageService wait until initialised

* Fix prettier
2022-01-13 06:18:54 +10:00
Addison Beck
653ff8f45f [Bug] VaultTimeout incorrectly defaults to "Never" (#1230)
* [Bug] VaultTimeout incorrectly defaults to "Never"

The default desktop vault timeout value is "On Restart", but there is no default set for this in the state service and account model.
This commit extends the StateService and Account model to consider the special vault timeout default requirements needed for desktop.

* [style] Lint fixes

* [chore] Update jslib
2022-01-12 11:37:23 -05:00
Addison Beck
957e010036 [bug] Ensure neverLock vaults can be manually locked (#607)
The client side storage restructuring work incorrectly checks if a vault has ever been unlocked to determine neverLock scenerios, but production does the opposite.
This creates an inability to never manually lock neverLock vaults.
This commit sets that condition back to the way it was.
2022-01-12 11:32:45 -05:00
Daniel James Smith
71c2fee574 Close opened AccountSwitcher dropdown (#1228)
When a user clicks outside of an opened account switching dropdown, it should close automatically when clicking outside of the dropdown.
2022-01-12 17:20:19 +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
c7ccb997bd [bug] Use the correct login url in lock guard (#606) 2022-01-12 10:15:39 -05: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
Daniel James Smith
2b64ec5375 Fix null ref when building/updating the MenuBar (#1227) 2022-01-12 15:19:18 +01:00
Robyn MacCallum
172392ff3b [Account Switching] Fix options dropdowns being empty (#603)
* Fix dropdowns initially being empty

* run prettier

* Remove default nulls for locale and theme
2022-01-12 09:11:25 -05:00
Ivan Kovnatsky
da640794c4 Add git credential helper example (#388) 2022-01-12 04:54:33 -08:00
Danielle Flinn
42d8f99249 aligned dark theme variables to the new WV dark theme (#2241)
* aligned dark theme variables to the new WV dark theme

* Update plugins.scss

updated toast close button color

* Run prettier on plugins.scss

Co-authored-by: Daniel James Smith <djsmith@web.de>
2022-01-12 13:12:30 +01:00
Oscar Hinton
f6f0bd2bfb Remove webpack-node-externals and use asarUnpack (#1221) 2022-01-12 11:32:02 +01:00
Christian Oliff
b8de92435b Add Inputmode for tel and email (identities) (#1384) 2022-01-12 10:07:56 +01:00
Thomas Rittson
2341b1907a Fix "no amr found" error in bwdc cli (#589)
* Fix amr error when authing with org api key

* Fix linting

* Return null instead of error if no amr

* Return false instead of null
2022-01-11 13:22:52 +10:00
Oscar Hinton
23a7072341 Disable spellchecker (#1225) 2022-01-10 18:27:14 +01:00
Addison Beck
4074c2a45f [Bug] [Account Switching] Ensure EnvironmentUrls Pull From The Correction Location On Account Add (#602)
* [bug] Fully initilize environmentUrls default value

We want the full environmentUrls object to be saved to storage with null values as an indicator of using BW cloud.
Currently the initilization behavior creates an empty object instead. Setting property values returns the correct behavior.

* [bug] Return the correct environmentUrls when scaffloging a new account

To allow for setting environmentUrls before an account is created we save that value as a global setting and then apply it to any newly authed accounts.
There is a bug that will instead save the urls used by the previous logged in account, making account switching with multiple servers cause errors.

This commit resolves this by specifically getting environementUrls from global state when creating a new account
2022-01-10 12:25:38 -05:00
Oscar Hinton
def3c47a1e Disable spell checking (#601) 2022-01-10 16:38:10 +01:00
Oscar Hinton
fd1d512a0f Run prettier on #1232 (#1383) 2022-01-10 14:50:54 +01:00