1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00
Commit Graph

291 Commits

Author SHA1 Message Date
Oscar Hinton
f3ff1e98ec Remove standalone true from vault (#15040)
Remove standalone: true from every instance since it's the default as of Angular 19.
2025-06-02 13:22:57 -07:00
Matt Gibson
9f9cb0d13d Add-userid-to-encryption-methods (#14844)
* Get userId from response if available

This is a small improvement for the Auth team which avoids inspection of the access token, sometimes.

* Initialize sdk clients with a userId

* return both Cipher and encryptedFor when encrypting a cipher

Update cipher api requests to include encryptedFor attribute

* Prefer named types with documentation

* Update sdk to latest

* Fixup types

* Fixup tests

* Revert getting userId from identity token response

---------

Co-authored-by: Shane <smelton@bitwarden.com>
2025-05-30 10:50:54 -07:00
Addison Beck
0e0be0a3de ignore one eslint error (#14896) 2025-05-23 09:07:32 -04:00
Addison Beck
56a3b14583 Introduce eslint errors for risky/circular imports (#14804)
* first draft at an idea dependency graph

* ignore existing errors

* remove conflicting rule regarding internal platform logic in libs

* review: allow components to import from platform
2025-05-23 08:01:25 -04:00
Nick Krantz
f52e4e27a0 [PM-12770] Assign to Collections Hint (#14529)
* allow use of common spec in lib/vault tests

* pass readonly collections to the assign collection component

- The assign to collections component filters them out already.
-They're also needed to display copy within the component

* add hint to assign to collections component when there are read only collections assigned to a cipher already

* add readonly hint to desktop

* only show collection hint for collections that are assigned to the provided ciphers

* consider admin/owner edit everything permission when assigning to collections

* fix icon in test
2025-05-22 11:09:33 -05:00
Jason Ng
fd10a26df9 [PM-18804] generator nudges (#14705)
* added generator spotlight to credential generator component

* moved generator spotlight to browser component and add as slot in libs. update copy for send

* added an aria label for the generator nudge body content

* new copy and styles for browser send will be behind feature flag

* update featureflag call to observable in send-v2

* changed how nudge text is made in credential generator

* added new observable to vault nudges to return specific boolean. Update naming of vault types. update observable calls in credential-generator and send-v2

* update send-v2 and credential generator to use new renamed nudges

* update to create nudge generator spotlight component. using this inside the credential generator for nudge spotlight

* fix imports for Nudge related code

* add libs/angular to storybook

---------

Co-authored-by: Nick Krantz <nick@livefront.com>
2025-05-21 12:46:02 -05:00
Nick Krantz
1c4d851046 [PM-21005] Clear Add/Edit form cache when browser loses focus (#14634) 2025-05-21 08:00:49 -05:00
Jordan Aasen
4474aa8c96 [PM-21569] - sshkey view - replace bit-card with read-only-cipher-card (#14811)
* use replace bit-card with read-only-cipher-card

* remove unnecessary class
2025-05-20 12:00:07 -07:00
Nick Krantz
83c4438efe Refactor: Move NudgesService to libs/angular/vault (#14843)
* move NudgesService to libs/angular/vault to avoid circular dependencies

* remove fix for spotlight component in storybook
2025-05-19 15:21:14 -05:00
Oscar Hinton
c8629b92d3 [CL-694] Remove unused imports (#14795)
* Remove unused imports

* Remove more unused imports
2025-05-16 17:11:18 +02:00
Jordan Aasen
e35882afc8 fix margin in identity component (#14809) 2025-05-15 14:56:20 -07:00
Jason Ng
ee4c3cfd94 [PM-21663] nudge service name refactor (#14789)
* update names of vault nudge service and their corresponding files, convert components using showNudge$ to instead target spotlight and badges directly with new observables. Core logic for dismiss remains the same
2025-05-15 15:10:38 -04:00
Jordan Aasen
b30faeb62b [PM-21554] - Creating a new item while editing edits the item (#14770)
* fix adding new cipher while editing a cipher

* don't set updatedCipherView if the cached cipher has an id and the new one doesn't

* fix cipher form config
2025-05-15 10:09:51 -07:00
SmithThe4th
ad3121f535 [PM-12423] Migrate Cipher Decryption to Use SDK (#14206)
* Created mappings for client domain object to SDK

* Add abstract decrypt observable

* Added todo for future consideration

* Added implementation to cipher service

* Added adapter and unit tests

* Created cipher encryption abstraction and service

* Register cipher encryption service

* Added tests for the cipher encryption service

* changed signature

* Updated feature flag name

* added new function to be used for decrypting ciphers

* Added new encryptedKey field

* added new function to be used for decrypting ciphers

* Manually set fields

* Added encrypted key in attachment view

* Fixed test

* Updated references to use decrypt with feature flag

* Added dependency

* updated package.json

* lint fix

* fixed tests

* Fixed small mapping issues

* Fixed test

* Added function to decrypt fido2 key value

* Added function to decrypt fido2 key value and updated test

* updated to use sdk function without prociding the key

* updated localdata sdk type change

* decrypt attachment content using sdk

* Fixed dependency issues

* updated package.json

* Refactored service to handle getting decrypted buffer using the legacy and sdk implementations

* updated services and component to use refactored version

* Updated decryptCiphersWithSdk to use decryptManyLegacy for batch decryption, ensuring the SDK is only called once per batch

* Fixed merge conflicts

* Fixed merge conflicts

* Fixed merge conflicts

* Fixed lint issues

* Moved getDecryptedAttachmentBuffer to cipher service

* Moved getDecryptedAttachmentBuffer to cipher service

* ensure CipherView properties are null instead of undefined

* Fixed test

* ensure AttachmentView properties are null instead of undefined

* Linked ticket in comment

* removed unused orgKey
2025-05-14 07:30:01 -07:00
Jordan Aasen
7de6befbf4 replace bit-section with section for all shared cipher form and views (#14710) 2025-05-13 16:26:36 -07:00
Jason Ng
d68574fc40 [PM-21395] Vault Nudges Bugs (#14737)
* updates to empty vault and has items nudges
2025-05-13 16:49:41 -04:00
Patrick-Pimentel-Bitwarden
0b0397c3f0 fix(enums-eslint): Enum Rule for ESLint (#14650)
* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.

* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.

* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.

* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
2025-05-13 10:07:38 -04:00
Todd Martin
eed18c9294 chore(view-cache): [PM-21154] Move view-cache its own feature package and adjust imports
* Moved view-cache services to directory

* Fixed DI for browser extension.

* Fixed tests.
2025-05-12 14:26:52 -04:00
Jordan Aasen
2282a74abd [PM-21021] - fix toggled hidden field state for custom fields view (#14595)
* fix toggled hidden field state for custom fields view

* fix hidden field toggle for cards and login details
2025-05-09 18:09:26 -07:00
Jordan Aasen
e538425e7a [PM-21343] - add download bitwarden to list of nudges for settings badge (#14682)
* add download bitwarden to list of nudges for settings badge

* update tests
2025-05-09 12:07:14 -07:00
Jordan Aasen
a7efd2158e [PM-18802] - Autofill Settings Nudges and Settings Badge (#14439)
* autofill nudge

* remove undismiss logic

* revert change to popup view cache service

* move browser autofill logic to platform. cleanup

* fix test

* adjustments to autofill nudges

* add missing provider

* updates to autofill nudges

* fix date logic

* change autofillBrowserSettingsService isBrowserAutofillSettingOverridden to function

* fix up browser autofill overridden settings logic

* remove check for privacy in isBrowserAutofillSettingOverridden
2025-05-09 08:52:54 -07:00
Daniel James Smith
26ecf3191c Fix angular performance issue on color-password.component (#14560)
* Fix performance issue, by using track $index instead of character as it can contain duplicate characters

* Migrate component to use Angular signal inputs

* Make file ts-strict compliant

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2025-05-08 17:19:09 -04:00
Jordan Aasen
fc1ebcfb58 various fixes to desktop cipher form (#14576) 2025-05-08 13:25:16 -07:00
Brandon Treston
f9edf048e3 [PM-19383] admins unable to download attachments (#14652)
* add admin support for downloading attachments

* fix delete and upload

* fix delete admin to return a response

* fix upload

* add missing param

* use getCipherAdmin

* fix cli

* fix QA bugs

* null check

* fix test

* cleanup

* add null check

* change comment
2025-05-08 09:49:15 -04:00
Vicki League
8ecb32f30f [CL-333] Icon Refresh Feature Branch (#14298)
* [CL-571] Update icons to new fileset and metaphors (#14163)

* [CL-518] Convert icons docs to stories (#14299)

* [CL-574] Update inline autofill icons (#14379)

---------

Co-authored-by: William Martin <contact@willmartian.com>
2025-05-07 17:07:14 -04:00
Jason Ng
daaf81ec36 [PM-21060] Refactor Has Nudges Service (#14653)
* refactor has nudges service to be its own Observable inside the vault nudges service.
2025-05-07 13:12:46 -04:00
Daniel James Smith
574891d617 [PM-16132][16249] Custom hidden field missing color and character count toggle (#13402)
* Add colored characters to custom hidden field

* Add character count toggle to hidden field

* Check correct variable for revealed hidden field

* Merge branch 'main' into vault/pm-16132/custom-hidden-field-missing-color-and-character-count-toggle

* Toggle character count on per field basis

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
Co-authored-by: Leslie Tilton <23057410+Banrion@users.noreply.github.com>
2025-05-07 09:53:57 -05:00
Bernd Schoolmann
744c1b1b49 [PM-21001] Move vault code to new encrypt service interface (#14546)
* Move vault code to new encrypt service interface

* Fix tests
2025-05-06 21:24:53 +00:00
Jordan Aasen
1486cee8b9 [PM-18799] - Settings Tab Badge Updates (#14405)
* download bitwarden page

* add has download bitwarden nudge service

* download bitwarden component and nudge

* fix test

* fix potential badge flash. prefer use of getUserId

* catch profileCreation error. clean up settings observables

* add profile date as observable

* fix failing tests

* remove debugging code and IntroCarouselDismissal

* fix observable name
2025-05-06 13:08:33 -07:00
Nick Krantz
46df5279a3 [PM-18485] Remove new device verification guard (#14417)
* remove NewDeviceVerificationGuard and all associated entities. New Device verification feature has rolled out in production, this guard is no longer needed.

* remove unused properties from the vault profile service
2025-05-06 13:08:30 -05:00
Nick Krantz
f3acfb29e5 short circuit well known URL check on all platforms but the browser (#14566) 2025-05-05 13:48:16 -05:00
Brandon Treston
fd43222938 [PM-19383] admins unable to download attachments (#14363)
* add admin support for downloading attachments

* fix delete and upload

* fix delete admin to return a response

* fix upload

* add missing param

* use getCipherAdmin

* fix cli
2025-05-05 13:36:49 -04:00
Jason Ng
60bafc1311 [PM-18803] New Item Nudge Login Spotlight Bold Copy Text (#14589)
* updated new-item-nudge.component to include bold text for login spotlight. and link in ssh spotlight
2025-05-05 11:59:25 -04:00
Jordan Aasen
237002b633 [PM-20988][PM-20986][PM-20983][PM-20971][PM-21019] - Multiple defect fixes for desktop cipher form update (#14559)
* multiple bug fixes

* favor getters to local state

* fix tests
2025-05-02 14:21:08 -07:00
Nick Krantz
ebe3e98a1f [PM-21022] Remove fido2Credentials when cloning a cipher (#14573)
* remove fido2Credentials from cipherView when cloning a cipher

* add check for login on cloning cipher
2025-05-02 10:11:29 -05:00
ronymc
d9fee1d1ad Fix-Reordering URIs in an item loses match detection for all URIs #14188. (#14315)
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
2025-05-02 07:03:14 -07:00
Shane Melton
cba5f826d6 [PM-21041] Fix cipher view security tasks fetching (#14569)
* [PM-21041] Add taskEnabled$ dependency to tasks$ observable

* [PM-21041] Rework cipher view component to only check tasks for organization Login type ciphers

- Remove dependency on feature flag check (handled by tasks$ observable now)
- Add try/catch in case of request failures to avoid breaking component initialization

* [PM-21041] Remove now redundant taskEnabled$ chain

* [PM-21041] Fix tests
2025-05-01 11:22:32 -07:00
Nick Krantz
de6b58c10a [PM-20110] Disabled copy buttons on vault (#14549)
* export BitIconButtonComponent from component library

* manually update the disabled state of the icon button for copy cipher field directive

* add tests for `CopyCipherFieldDirective`
2025-05-01 12:44:08 -05:00
Jason Ng
a62d269a89 [PM-18803] nudges new items (#14523)
* Added new-items-nudge service and component to show spotlight for new item nudges
2025-05-01 12:43:55 -04:00
Jason Ng
106dd33ef4 [PM-18800] vault onboarding nudges and badge (#14278)
* added empty vault nudge service and has items vault nudge service with spotlight and settings badge to vault v2 in browser
* Refactor Vault Nudge Service for clarity between spotlight and badge dismissals
2025-04-30 12:16:09 -04:00
Rui Tomé
9cd08e8a9f [PM-18322] Fix: Allow organization admins to upload attachments for items without direct access (#14361)
* Wire organization ID into AttachmentsV2Component for org-based ciphers

* Enhance AttachmentsV2Component to accept organization ID for improved handling of org-based ciphers

* Integrate organization ID into VaultComponent for AttachmentsV2Component to enhance org-based cipher handling

* Add unit tests for CipherAttachmentsComponent to validate attachment saving behavior for admins

- Introduced mocks for ApiService and OrganizationService in the test setup.
- Updated tests to check `saveAttachmentWithServer` calls with the correct parameters, including an `isAdmin` flag for admin API usage.

* Fix unit tests for AttachmentsV2Component by adding mocks for ApiService and OrganizationService

* Fix AttachmentsV2Component tests
2025-04-29 12:42:02 +01:00
Jordan Aasen
fe3e6fd198 migrate to tw class name (#14317) 2025-04-23 15:26:53 -07:00
Jordan Aasen
b589951c90 [PM-18520] - Update desktop cipher forms to use the same UI as web app and extension - (#13992)
* WIP - cipher form refactor

* cipher clone

* cipher clone

* finalize item view and form changes

* fix tests

* hide changes behind feature flag

* set flag to false

* create vault items v2. add button selector

* revert change to flag and vault items

* add attachments

* revert change to tsconfig

* move module

* fix modules

* cleanup

* fix import

* fix import

* fix import

* remove showForm

* update feature flag

* wip - cleanup

* fix up services

* cleanup

* fix type errors

* fix lint errors

* add dialog component

* revert changes to menu

* revert changes to menu

* fix vault-items-v2

* set feature flag to FALSE

* add missing i18n keys. fix collection state

* remove generator. update modules. bug fix

* fix restricted imports

* mark method as deprecated. add uri arg back

* fix shared.module

* fix shared.module

* fix shared.module

* add uri

* check and prompt for premium when opening attachments dialog

* move VaultItemDialogResult back

* fix import in spec file

* update copy functions

* fix MP reprompt issue
2025-04-23 11:13:44 -07:00
Jordan Aasen
18d47a29df [CL-420][PM-18798] - Berry component and tab navigation (#14135)
* berry component and nav slot

* remove debug

* don't worry about routes

* add announce and tests

* fix story

* use existing notification color. fix border radius

* fix berry component class

* finalize berry component

* fix tests

* fix story

* move logic to tabs-v2 component.

* move navButtons to tabs-v2.component

* fix layout

* move story.

* cleanup
2025-04-22 10:18:10 -07:00
Shane Melton
143473927e [PM-10611] End user notification sync (#14116)
* [PM-10611] Remove Angular dependencies from Notifications module

* [PM-10611] Move end user notification service to /libs/common/vault/notifications

* [PM-10611] Implement listenForEndUserNotifications() for EndUserNotificationService

* [PM-10611] Add missing taskId to notification models

* [PM-10611] Add switch cases for end user notification payloads

* [PM-10611] Mark task related notifications as read when visiting the at-risk password page

* [PM-10611] Revert change to default-notifications service

* [PM-10611] Fix test

* [PM-10611] Fix tests and log warning in case more notifications than the default page size are available

* [PM-10611] Use separate feature flag for end user notifications

* [PM-10611] Fix test
2025-04-21 08:57:57 -07:00
Jason Ng
9f61b6aaa7 [PM-20182] update colors for intro carousel svg for dark theme (#14280) 2025-04-16 17:14:27 -04:00
Jordan Aasen
defbbd586f [PM-19357] - [Defect] Unauthorised access allows limited access user to change custom hidden field of Items (#14068)
* update tests

* finish tests

* only disallow hidden fields for hiddenPassword users

* fix failing tests

* fix story

* only disable hidden field option when editing
2025-04-16 11:06:40 -07:00
Jeffrey Holland
46470cce2a PM-19102 Autofill new identity information in the popout (#13822)
* PM-17187 Autofill new card information in the popout

* Add new identity autofill to browser extension

* Add ability to save values from autoselect fields
2025-04-10 08:08:13 +02:00
Shane Melton
6503cc64fd [PM-19906] Add appStopClick to prevent default event (#14134) 2025-04-04 15:34:02 -07:00
Jason Ng
263598d9e0 [PM-18790] browser intro carousel component (#14097)
* build intro carousel for browser to show for new installations
2025-04-04 10:52:18 -04:00