Commit Graph

351 Commits

Author SHA1 Message Date
Daniel James Smith d3c780e079
Revert "Use Multi-Messaging Service (#4304)" (#4374)
This reverts commit b1ee65dca8.
2023-01-03 14:13:54 -05:00
Daniel James Smith ec19fc7225
[PS-2072] Browser Badge fixes (#4363)
* Force update of badge icon and text on all windows

Affects MV2 and MV3
No longer pass in tab and windowId to setLoggedOut and setLocked

When the vault is locked or the user logs out, all open windows/tabs need to be updated

Iterating over all active tabs like in 2022.10.1 was missing:

488734577f/apps/browser/src/background/main.background.ts (L859-L867)

Create clearBadgeText function to take care of it.

* Only try to retrieve tab in unlocked state

* Remove lock icon when unlocking on all windows

* Only use windowId to retrieve tab when defined

In MV2 the `windowId` isn't passed into updateBage and fails to retrieve the correct tab to update.

This resorted in the badge not showing a match count in another window.

Fixes #4260

Ensure in MV3 that all listener pass on the windowId if present.

* Fix Firefox private mode

Only pass on the windowId if defined and within Firefox

In private mode the main.background bootstrap-method passes in the windowId

Do not refreshBadge when in private mode

Previously 488734577f/apps/browser/src/background/main.background.ts (L575-L586) setIcon would skip in private mode. Calling refreshBadge without this would update the badge on all windows (normal and private ones)
2023-01-03 18:06:21 +01:00
Brandon Maharaj d41b3b13ea
[SG-58] Avatar color selector (#3691)
* changes

* merge

* undo

* work

* stuffs

* chore: added custom color picker

* oops

* chore: everything but the broken sink

* picker v2

* fix: cleanup

* fix: linty

* fix: use tailwind

* fix: use tailwind

* undo: merge error

* remove: old color picker

* fix: merge issue

* chore: use input vs component

* fix: move logic out!

* fix: revert changes to bit-avatar

* fix: cleanup undos

* feat: color lookup for "me" badge in vault

* fix: naming stuff

* fix: event emitter

* fix: linty

* fix: protect

* fix: remove v1 states
work: navatar

* fix: big

* fix: messages merge issue

* bug: differing bg colors for generated components

* feat: added sync stuff

* fix: cli

* fix: remove service refs, use state

* fix: moved from EventEmitter to Subjects

* fix: srs

* fix: strict stuff is nice tbh

* SG-920 + SG-921 (#4342)

* SG-920 + SG-921

* Update change-avatar.component.html

* Update selectable-avatar.component.ts

* [SG-926] [SG-58] [Defect] - Selected Avatar color does not persist in the Account Settings menu (#4359)

* SG-926

* fix: comment

* fix: undo

* fix: imp

* work: done with static values (#4272)

* [SG-35] (#4361)

Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2023-01-01 10:30:09 -05:00
github-actions[bot] 2346bfbeab
Autosync the updated translations (#4355)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-30 12:33:35 +01:00
Justin Baur 53288d2087
Add Provider Filter to Browser Vault Select (#4322) 2022-12-29 16:45:17 -05:00
Daniel James Smith 1fc7798e7d
Update year in copyrights (#4325) 2022-12-28 21:59:23 +01:00
Matt Gibson c10e93c0d9
Handle null value URLs in autofiller script (#4277) 2022-12-28 08:49:38 -06:00
github-actions[bot] 4ad1b1fb91
Autosync the updated translations (#4310)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-23 01:24:59 +01:00
Patrick H. Lauke e1aceca72b
[PS-1386] Browser/Desktop/Web: Accessibility - Stop username regenerator button from losing focus (#3405)
* Make username regenerator button same as password one

it seems that (originally?) it wanted to be disabled at first and then become active again once the generator's async call was finished...but this seems unnecessary. removing all that extraneous stuff that doesn't seem to be actually doing anything makes this work just as well as the password generator button, and doesn't end up losing/resetting focus.

* Remove the `[disabled]` attribute from regenerate buttons

* Use `aria-disabled` instead of `disabled`, make click event conditional

* Make spinner show for `aria-disabled` controls as well
2022-12-23 01:18:18 +01:00
Justin Baur b1ee65dca8
Use Multi-Messaging Service (#4304)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-12-22 13:29:02 -05:00
Robyn MacCallum 3a98b415b0
Revert "[EC-772] Add i18n key typechecking in web (#4023)" (#4296)
This reverts commit 5a1940f3f4.
2022-12-21 17:46:23 -05:00
Patrick H. Lauke 7d3063942e
[PS-1692] Use `aria-describedby` for all help blocks/hints (#3802)
* Use aria-describedby for all help blocks/hints

* Add label to send notes textfield

* Use aria-describedby for all help blocks/hints / browser

* Tweak help block for confirming identity

* Remove aria-describedby for general login form

Seems unnecessary / doesn't need an extra description

* Fix compiler error

* Remove unnecessary aria-describedby

After testing, turns out the addition here was unnecessary, as the help block is already part of the `<label>`

* Fix aria-describedby reference for user verification component

* Remove redundant aria-describedby and generated id for radio buttons

* Fix aria-describedby for send editing in Safari

> When editing a send, the text below the deletion date is not recognized by the screen reader reliably (send-add-edit.component.html / efflux-dates.component.html). There might be an issues depending on which browser is used (deletionDateHelp vs. deletionDateCustomHelp

* Make custom environment container role="group", give it a label and description

> In the Environment Url Settings, the text “For advanced users…….“ is not not recognized by the screen reader. Not sure how to best solve this one, as it's below all individual url inputs. Ideally it gets announced with the baseUrl part or when focusing Custom Environment)
2022-12-21 20:48:22 +01:00
Thomas Rittson 5a1940f3f4
[EC-772] Add i18n key typechecking in web (#4023) 2022-12-21 14:27:00 +10:00
github-actions[bot] 1f0e184cff
Bumped browser version to 2022.12.1 (#4280)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-20 10:21:21 -05:00
Melanie Kanavakatini 35b33335fb
[EC-474] Add hidden char count toggle to web and desktop (#3262)
* feat-web: add hidden char count toggle

* Added toggle char count for desktop

* Use Tailwind and Component Library, add i18n

* Hide char count when password is hidden

* Initial proposal

* Update colors per design spec for all clients

Also make variable names consistent across clients

* Remove unused scss

* Add styling

* Set fixed with for password count elements

* Add separate wrapped stories

* Fix alignment of first char when wrapped

* Minor refactors

* Make naming consistent

* Add Figma url

* add barrel files

* Use CL component

* Fix template

* Remove duplicate style

* Use ColorPasswordComponent in web, remove old pipe

Also remove styling and move pipe out of jslib-module given that
it's no longer shared by all Angular clients

* Run prettier

* Remove unused scss vars

* Undo unnecessary changes

* Remove unnecessary changes

* Fix styling

* Fix selector

* Collect show password event

* Fix incorrect background in dark mode

* Fix linting

* Use color password for password history

* Add char count to hidden custom fields in desktop

* Fix char count background in web: take 2

* Update service name

* Add missing label toggleCharacterCount for desktop

Co-authored-by: Daniel James Smith <djsmith@web.de>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2022-12-20 13:31:18 +01:00
Shane Melton f67fffcc08
[EC 784] Refactor organization user service (#4163)
* [EC-784] Introduce OrganizationUserService and abstraction

* [EC-784] Move API response models into abstraction folder

* [EC-784] Register OrganizationUserService in JsLib

* [EC-784] Add OrganizationUserService to CLI Main

* [EC-784] Move getOrganizationUser()

- Move getOrganizationUser() implementation to OrganizationUserService
- Update any references to the API service in the CLI and Web projects

* [EC-784] Move getOrganizationUserGroups()

* [EC-784] Move and rename getOrganizationUsers()

* [EC-784] Move getOrganizationUserResetPasswordDetails()

* [EC-784] Move OrganizationUser API request models into abstraction folder

* [EC-784] Move postOrganizationUserInvite()

* [EC-784] Move postOrganizationUserReinvite()

* [EC-784] Move postManyOrganizationUserReinvite()

Also tweak the signature to avoid exposing the API request model

* [EC-784] Move postOrganizationUserAccept()

* [EC-784] Move postOrganizationUserConfirm()

* [EC-784] Move postOrganizationUsersPublicKey()

Also modify signature to avoid exposing API request model

* [EC-784] Move postOrganizationUserBulkConfirm()

* [EC-784] Move putOrganizationUser()

* [EC-784] Move putOrganizationUserGroups()

* [EC-784] Update abstraction method definitions to use abstract keyword

* [EC-784] Move putOrganizationUserResetPasswordEnrollment()

* [EC-784] Move putOrganizationUserResetPassword()

* [EC-784] Move deleteOrganizationUser()

* [EC-784] Move deleteManyOrganizationUsers()

* [EC-784] Move revokeOrganizationUser()

* [EC-784] Move revokeManyOrganizationUsers()

* [EC-784] Move restoreOrganizationUser()

* [EC-784] Move restoreManyOrganizationUsers()

* [EC-784] Move internal OrganizationUserBulkRequest model out of service abstraction

* [EC-784] Rename organizationUser folder to organization-user
2022-12-19 10:56:16 -08:00
Kyle Spearrin d18c32ab32
margin and padding style adjustments (#4264) 2022-12-19 12:50:47 -05:00
Jared Snider 1f92dcbf20
Defect/SG-825 - users in org w/ no personal vault still see personal vault (disabled org policies now still apply) (#4094)
* SG-825 - policy.service - Apply policies of disabled orgs

* SG-825 - OrgFilter - Show org suspended icon when org is disabled and remove personal vault policy enabled

* SG-825 - Org Filter refactor - Enterprise users can now access org options to leave orgs without selecting them (previously, you had to select an org to get the options to show up which was not possible for disabled orgs).  Users can now leave disabled orgs.

* SG-825 - fix aria label compile issue

* SG-825 - Browser - Vault filter CSS refactor - (1) Better ellipsis truncation implemented (2) Selected vault and dropdown widths now scale dynamically based on selection and container width

* SG-825 - Desktop - (1) Org suspended warning icon now displayed on disabled orgs even when personal vault removed policy applied (2) Org suspended icon now has same accessibility (title / label) as web & browser.
2022-12-16 15:22:27 -05:00
Hunter Bertoson 91ff4fc00d
[PS-1830] Updated the autofill.js file to no longer add the 'data.com' attribute to tags (#4001)
* Updated the autofill.js file to no longer add the 'data.com' attribute to tags

* Added Comments and removed empty lines
2022-12-16 17:02:13 +01:00
Robyn MacCallum c06c0f9f2c
[SG-742] (#4190)
* Remove default landing on masterpassword page

* Remove rememberEmail state service value that isn't needed

* Remove last occurence of setRememberEmail

* Remove alwaysRememberEmail functionality

* Remove always remember email from browser and add option to

* Add extra spacing around remember email check

* [SG-884] Fix Remember Email functionality for Login with SSO (#4238)

* Add saveEmailSettings method to LoginService

* Add StateService as a dependency to LoginService

* Update login components to utilize new login service method for saving rememberedEmail
2022-12-16 10:08:44 -05:00
github-actions[bot] 923cb21654
Autosync the updated translations (#4251)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-16 01:15:16 +01:00
Matt Gibson 161ff3de28
Ps/sync only when changed (#4245)
* Only sync if synced value changes

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>

* Catch error if no one is listening

This occurs if the background tries to update any visualizers, but none
are open.

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>

* Allow provided deserializer to handle not found

* Debounce synced items

* Remove object-hash

* Revert "Only sync if synced value changes"

This reverts commit 024fe226d9.

* Test debounce

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2022-12-15 17:20:46 -06:00
Patrick H. Lauke 002c3f6368
[PS-1793] Desktop/Browser/Web: tweak disclosure widget design (#3951)
* Move chevron/arrow to start of disclosure widget

in addition, changes the only expand/collapse disclosure widget like this on the web client to use the same `<h3><button>...</button></h3>` structure as on browser extension and desktop app

* Change collapsed/expanded icons

Make them more understandable and consistent with other expand/collapse controls

* Harmonise desktop +/- controls to use arrow/chevron icons as well

also removes the incorrect `A11yTitle` in the generator that currently overrides the visible "Options" text (leading to a failure of WCAG 2.5.3 Label in Name)

* Change the icons for the expand/collapse disclosure widget in SSO component

* Expand icon explanation

plus minor typo cleanup

* Add patch for Send button focus outline
2022-12-15 15:13:09 +01:00
github-actions[bot] b8a469b370
Bumped browser version to 2022.12.0 (#4231)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-14 10:15:52 -05:00
github-actions[bot] fcdb0ecffe
Autosync the updated translations (#4205)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-09 11:35:15 +01:00
Matt Gibson 750ff736cd
[ps-2003] Ps/ps 1854 fix pin (#4193)
* Await in `has` calls.

* Add disk cache to browser synced items

Note: `Map` doesn't serialize nicely so it's easier to swap over to a
`Record` object for out cache

* Mock and await init promises in tests

* Remove redundant settings checks
2022-12-06 16:26:42 -06:00
Daniel James Smith 200dd0a1fb
[PS-1906] Extract uploadEvents from EventService into new service (#4108)
* Move event.service to it's own folder

Move abstractions/event.service to abstractions/event/event.service
Move services/event.service to services/event/event.service
Fix all the imports

* Extract event-upload from event.service

Move `uploadEvents` from `EventService` to `EventUploadService`
Create event-upload-service-factory
Fix wiring up all the dependencies

* Remove clearEvents from EventService

clearEvents is only related to uploading events and can be moved into EventUploadService

Change the logout-method to only call EventUploadService.uploadEvents as that also calls clearEvents internally

* Rename EventService to EventCollectionService

Rename libs\common\abstraction\event\event.service.ts to libs\common\abstractions\event\event-collection.service.ts

Rename libs\common\services\event\event.service.ts to libs\common\services\event\event-collection.service.ts

Fix all the imports

Fix up service regristration/instantiation

Reanme \browser\src\background\service_factories\event-service.factory.ts to \browser\src\background\service_factories\event-collection-service.factory.ts

* Move interval to upload events to EventUploadSvc

Move the `init()` from event-collection.service to event-upload.service
Change call-site in web, desktop, browser
2022-12-06 14:47:42 +01:00
Oscar Hinton 84bd5ae7ee
Update urls to match the contributing docs (#4192) 2022-12-06 11:20:27 +01:00
Daniel James Smith bfa19a6749
Fix links in README to our contrib guidelines (#4186) 2022-12-05 13:08:43 +01:00
Rui Tomé 9dc72428d0
[EC-584] Update ApiService to remove any appendages to ClientVersion (#4008)
* [EC-584] Update ApiService to remove any appendages to ClientVersion

* [EC-584] Extract application version number logic from ApiService to PlatformUtils

* Update libs/electron/src/services/electronPlatformUtils.service.ts

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* [EC-584] Use getApplicationVersion as source for getApplicationVersionNumber

* [EC-584] Remove defaulting to dash on getApplicationVersionNumber and add unit tests

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-12-02 19:38:12 +00:00
Patrick H. Lauke 8e4e770ca3
Fix typo for DuckDuckGo form field (#4172) 2022-12-02 02:09:13 +01:00
github-actions[bot] 91dbb5dbf3
Autosync the updated translations (#4170)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-12-02 01:27:21 +01:00
Matt Gibson d4a8e5829a
Do not use object constructors for names (#4149)
* Do not use object constructors for names

Minification was selecting different class names for different instances
of services, which was causing them not to sync properly.

This was happening _only_ in production mode for some reason, perhaps
due to minifying post chunking?

* Add tests for additional synced properties
2022-11-29 17:40:39 -06:00
Daniel James Smith 42128d41f0
[PS-815] MV3: Replace usage of delayed/periodic operations with AlarmsAPI (#4103)
* Register alarms and listen to them

* Wire up alarms and actions

Register actions(commands) which can be executed by an alarm
Create methods in alarm-state to persists actions and execution times
Flesh out AlarmListener to iterate over registered commands and check if they need to execute
Simplify clearClipboard action as it only handles the action instead of also worrying if it should fire.
Enable previously disabled clear-clipboard tests (#3532)
Adjust clear-clipboard tests to new simpler execution

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>

* Make linter happy

* Revert accidentally commited with merging master

* Add jsdoc per PR comment

* Fixed types to simplify adding new alarm actions

Create a new alarm action (i.e `clear-clipboard.ts`)
Export a name for the alarm action (`clearClipboardAlarmName`)

`alarm-state.ts`
Import alarm action name
Extend `alarmKeys` and `alarmState`

`on-alarm-listener`
Import alarm action method and alarm action name
Add it to the switch case

* Add comment to clearClipboard action

Add comment to replace clearClipboard impl once clipboardApi's are accessible by service-workers

https://bugs.chromium.org/p/chromium/issues/detail?id=1160302

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-11-29 18:14:42 +01:00
Oscar Hinton d994faa8a6
[SM-252] Enable strict templates (#3601) 2022-11-28 18:59:46 +01:00
github-actions[bot] 35f8760435
Autosync the updated translations (#4132)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-28 16:47:15 +01:00
github-actions[bot] b00c18a57e
Autosync the updated translations (#4116)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-25 01:18:05 +01:00
Patrick H. Lauke 448637243d
Fix inconsistent line height in cipher box footer (#3561)
Closes #3559
2022-11-24 18:38:19 +01:00
Matt Gibson 7fbfce953d
[PS-1854] Split services between background and visualizations (#4075)
* Elevate Map <-> Record JSON helpers to Utils

* Build Account from a StateService provided AccountDeserializer

* Allow Manifest V2 usage of session sync

Expands use of SessionSyncer to all Subject types. Correctly handles
replay buffer for each type to ignore the flood of data upon
subscription to each Subject type.

* Create browser-synced Policy Service

* Move BrowserFolderService

* Libs account serialization improvements

* Serialize Browser Accounts

* Separate StateService in background/visualizations

Visualizer state services share storages with background page, which
nicely emulates mv3 synchronization through session/local storage. There
should not be multithreading issues since all of these services are
still running through a single thread, we just now have multiple places
we are reading/writing data from.

Smaller improvements
* Rename browser's state service to BrowserStateService
* Remove unused WithPrototype decorator :celebrate:
* Removed conversion on withPrototypeForArrayMembers. It's reasonable to
think that if the type is maintained, it doesn't need conversion.

Eventually, we should be able to remove the withPrototypeForArrayMembers
decorator as well, but that will require a bit more work on
(de)serialization of the Accounts.data property.

* Make Record <-> Map idempotent

Should we get in a situation where we _think_ an object has been
jsonified, but hasn't been, we need to correctly deal with the object
received to create our target.

* Check all requirements while duck typing

* Name client services after the client

* Use union type to limit initialize options

* Fixup usages of `initializeAs`

* Add OrganizationService to synced services

Co-Authored-By: Daniel James Smith <djsmith85@users.noreply.github.com>

* Add Settings service to synced services

Co-Authored-By: Daniel James Smith <djsmith85@users.noreply.github.com>

* Add missing BrowserStateService

* Fix factories to use browser-specific service overides

* Fix org-service registration in services.module

* Revert "Add missing BrowserStateService"

This reverts commit 81cf384e87.

* Fix session syncer tests

* Fix synced item metadata tests

* Early return null json objects

* Prefer abstract service dependencies

* Prefer minimal browser service overrides

* [SG-632] - Change forwarded providers radio buttons list to dropdown (#4045)

* SG-632 - Changed forwarded providers list of radio buttons to dropdown

* SG-632 - Added role attributes to improve accessibility.

* SG-632 - Added sorting to array and empty option

* SG-632 - Fix styling to match standards.

* rename cipehrs component to vault items component (#4081)

* Update the version hash for the QA Web build artifact to follow SemVer syntax (#4102)

* Remove extra call to toJSON() (#4101)

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith@web.de>
Co-authored-by: Carlos Gonçalves <carlosmaccam@gmail.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Joseph Flinn <58369717+joseph-flinn@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
2022-11-23 16:26:57 -06:00
Jake Fink a6ce83d9e0
rename cipehrs component to vault items component (#4081) 2022-11-22 08:30:33 -05:00
Carlos Gonçalves a6226c7c90
[SG-632] - Change forwarded providers radio buttons list to dropdown (#4045)
* SG-632 - Changed forwarded providers list of radio buttons to dropdown

* SG-632 - Added role attributes to improve accessibility.

* SG-632 - Added sorting to array and empty option

* SG-632 - Fix styling to match standards.
2022-11-21 17:08:47 +00:00
Justin Baur 076e605f10
[PS-1879] Fix Key Connector Migration Flow (#4080)
* Move OrganizationService to fullSync

* Add Tech Debt Tracking Link

* Remove Commented out code

* Add InternalOrganizationService

* Use InternalOrganization in services that get to update state
2022-11-18 16:38:28 -05:00
github-actions[bot] 166e5a747e
Autosync the updated translations (#4087)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-18 04:40:39 +01:00
github-actions[bot] 768e89a243
Autosync the updated translations (#4083)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-18 01:03:46 +01:00
Justin Baur a57424df75
[PS-1829] Fix Service Worker Startup in MV3 (#4000)
* Fix Service Worker Startup in MV3

* Removed unneeded plugin from shared main config
* Added plugin back behind MV2 check
* Added background entry behind MV2 check
* Added totally new config for MV3 behind check
* Target `webworker` for MV3 background
* Export array of configs

* Address PR feedback

* Remove comment
2022-11-17 15:15:34 -05:00
DanHillesheim ea8d2b91c0
[EC-665] Fix biometrics button style (#3979)
* fix biometrics button style

* expand button to fill space

this is a result of it being used outside the box-content

* remove padding from box-footer
2022-11-15 14:35:44 -07:00
Oscar Hinton 7fca2d722c
[SM-330] Disable managed environments for safari (#3953) 2022-11-15 14:13:37 +01:00
Thomas Rittson 55b46a2c62
Hide My Vault if Remove Individual Vault is on (#4052) 2022-11-14 10:14:01 +10:00
Vincent Salucci 4366e15602
[EC-743] Call super to ngOnInit to include policy observable changes (#4047) 2022-11-12 07:12:54 -06:00
Jared Snider b45704d513
SG-428 - Browser Extension - Send - Expiration / Deletion date calendar icon +… (#4034)
* Browser Extension - Send - Expiration / Deletion date calendar icon + datepicker pop up now respect theme better in Chrome / Chromium based browsers and Safari (Firefox datepicker pop up doesn't seem to have an easy mechanism for theming)

* SG-428 - Extension - Iconography for date inputs for Chromium browsers now reflects theme colors properly + hover states; icon not shown on non-Chromium browsers

* Variables.scss - ran prettier locally after tweaking comments to pass eslint checks
2022-11-11 15:41:07 -05:00
github-actions[bot] 137b61eaba
Autosync the updated translations (#4036)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-11 01:09:54 +01:00
DanHillesheim 4410eb6270
[PS-1840] - fix for covered dropdown on empty vault (#4019)
* fix for covered dropdown on empty vault

This could be done one of 2-3 ways. I think this might be the least problematic, but could also be done with just changing "position: absolute" to "relative on the ".no-items" class - base.css:461 For some reason, I'm unable to load the spinner to test.

* rename class
2022-11-09 17:57:01 +01:00
Justin Baur 88de7d2b47
Remove local vaultFilter (#4014)
* Use vault filter item from vaultFilterService
2022-11-08 16:45:32 -05:00
Thomas Rittson da542c84f2
[EC-661] Add web worker code bundles to Safari browser extension (#3986)
* Make browser bundle encrypt-worker.ts into a single named file

* Add encrypt-worker bundle to xcode proj
2022-11-08 11:15:12 +10:00
Matt Gibson 337e406e88
[PS-1734] Send saved urls to autofill script (#3861)
* Send all saved url to autofill script

* Handle array of matched urls in content script

* Prompt at most once to override insecure autofill

* Do not send never match URIs to content script

We know these URIs did not cause the autofill match, so we
can safely remove these from the list of potential matches.
2022-11-04 10:44:21 -05:00
github-actions[bot] 6dc846081a
Autosync the updated translations (#3973)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-04 15:09:17 +01:00
github-actions[bot] a5cf5ba35b
Autosync the updated translations (#3968)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-11-04 08:19:51 +01:00
Robyn MacCallum 4b495a1b2a
Use correct provider icon instead of bank icon (#3950) 2022-11-02 15:52:49 -04:00
Robyn MacCallum 636a982cd6
Add padding to top of Safari extension (#3949) 2022-11-02 15:16:36 -04:00
Gbubemi Smith 7c4f3ac5e9
[SG-792] Added focus to master password field on browser and desktop (#3939)
* Added focus to master password field on browser client

* Added focus to master password field on desktop client
2022-11-01 14:00:50 -04:00
DanHillesheim cd35f9a4fe
[EC-641] Browser Ext UI Update (#3842)
* more css changes

* add icon button hover

* Update apps/browser/src/popup/scss/box.scss

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update apps/desktop/src/scss/box.scss

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* feedback updates

* restore desktop pseudo rule

* update to include some variable fixes and deletions

* updates per oscar

* feedback updates

more universal variable, adjusted box padding (per Kyle), and aligned footer text

* changes per product design

added border for selects, border around generator, and hover for solarizeddark

* add more helper text space below for visual separation

* group new variable

* login page button fix

Dflinn found an odd margin on the login page

* Revert "Merge branch 'master' into browser-ext-ui-update-test"

This reverts commit b8007102f9, reversing
changes made to 246768cb12.

* fix button height

* revert file changes

* test adjustments

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
2022-11-01 09:06:25 -04:00
Andreas Coroiu 7b8507cf9b
[EC-522] Improve handling of rxjs subjects (#3772)
* [EC-522] feat: no public rxjs subjects

* [EC-522] feat: improve null handling

* [EC-552] fix: init subject with empty set instead of null

* [EC-552] fix: don't push null into account subject

* [EC-522] feat: remove null filter
2022-11-01 11:25:46 +01:00
cd-bitwarden 23ffbcbc99
Ps 1754 community pr reviewed (#3929)
* community PR reviewed, Update search cancel button to be visible in all themes

* community PR reviewed, Update search cancel button to be visible in all themes 2
2022-10-31 18:01:55 -04:00
Todd Martin 2cd65939d5
Two-Step Login (#3852)
* [SG-163] Two step login flow web (#3648)

* two step login flow

* moved code from old branch and reafctored

* fixed review comments

* [SG-164] Two Step Login Flow - Browser (#3793)

* Add new messages

* Remove SSO button from home component

* Change create account button to text

* Add top padding to create account link

* Add email input to HomeComponent

* Add continue button to email input

* Add form to home component

* Retreive email from state service

* Redirect to login after submit

* Add error message for invalid email

* Remove email input from login component

* Remove loggingInTo from under MP input

* Style the MP hint link

* Add self hosted domain to email form

* Made the mp hint link bold

* Add the new login button

* Style app-private-mode-warning in its component

* Bitwarden -> Login text change

* Remove the old login button

* Cancel -> Close text change

* Add avatar to login header

* Login -> LoginWithMasterPassword text change

* Add SSO button to login screen

* Add not you button

* Allow all clients to use the email query param on the login component

* Introduct HomeGuard

* Clear remembered email when clicking Not You

* Make remember email opt-in

* Use formGroup.patchValue instead of directly patching individual controls

* [SG-165] Desktop login flow changes (#3814)

* two step login flow

* moved code from old branch and reafctored

* fixed review comments

* Make toggleValidateEmail in base class public

* Add desktop login messages

* Desktop login flow changes

* Fix known device api error

* Only submit if email has been validated

* Clear remembered email when switching accounts

* Fix merge issue

* Add 'login with another device' button

* Remove 'log in with another device' button for now

* Pin login pag content to top instead of center justified

* Leave email if 'Not you?' is clicked

* Continue when enter is hit on email input

Co-authored-by: gbubemismith <gsmithwalter@gmail.com>

* [SG-750] and [SG-751] Web two step login bug fixes (#3843)

* Continue when enter is hit on email input

* Mark email input as touched on 'continue' so field is validated

* disable login with device on self-hosted (#3895)

* [SG-753] Keep email after hint component is launched in browser (#3883)

* Keep email after hint component is launched in browser

* Use query params instead of state for consistency

* Send email and rememberEmail to home component on navigation (#3897)

* removed avatar and close button from the password screen (#3901)

* [SG-781] Remove extra login page and remove rememberEmail code (#3902)

* Remove browser home guard

* Always remember email for browser

* Remove login landing page button

* [SG-782] Add login service to streamline login form data persistence (#3911)

* Add login service and abstraction

* Inject login service into apps

* Inject and use new service in login component

* Use service in hint component to prefill email

* Add method in LoginService to clear service values

* Add LoginService to two-factor component to clear values

* make login.service variables private

Co-authored-by: Gbubemi Smith <gsmith@bitwarden.com>
Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: gbubemismith <gsmithwalter@gmail.com>
2022-10-28 14:54:55 -04:00
github-actions[bot] 2ffa5811f3
Autosync the updated translations (#3919)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-28 15:34:38 +02:00
github-actions[bot] acef1584e2
Autosync the updated translations (#3915)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-28 02:15:58 +02:00
Thomas Rittson da47992a22
[EC-272] Web workers using EncryptionService (#3532)
* Add item decryption to encryptService
* Create multithreadEncryptService subclass to handle web workers
* Create encryption web worker
* Refactor cipherService to use new interface
* Update dependencies
2022-10-28 07:38:54 +10:00
Rafael Kraut 2ffafa1f23
[PS-1693] feat(browser): implement theming for notification bar (#3805)
* feat(browser): implement theming for notification bar

* refactor(browser): split notification bar function

* refactor(browser): use own method for getCurrentTheme

* chore(browser): add close.svg file as an asset

this file is embedded in apps/browser/src/notification/bar.html

* feat(browser): change textContrast color on primary buttons

* feat(browser): use dedicated color variable for close button

* feat(browser): use textColor for close button

* feat(browser): implement styling for select fields

* feat(browser): improve close button styling, add hover effect
2022-10-27 19:34:47 +02:00
dgoodman-bw 41d6b6bd21
Ps 976 moving of read only organization collection items to different folder not possible (#3474)
* PS-976 - when user has cipher readonly permissions, prevent user from editing cipher fields and make separate api call that only updates Favorite and Folder values

* PS-976 - in the readonly edit cipher view, hide non-operable buttons and display select values as readonly input text

* PS-976 - update failing test

* PS-976 - split cipher saveWithServer call into Create and Update calls

* PS-976 - replace property with function call to get the card expiration month for the readonly view

* MM-976 - when user has readonly permissions hide "delete" button on View Item view, hide generate username/password buttons on Edit Item view

* PS-976 - rename cipherPartialRequest file to align with new naming convention
2022-10-25 12:24:21 -07:00
Matt Gibson d49b5e0647
[PS-1735] Do not autofill if sandboxed (#3860)
* Do not autofill if sandboxed

`self.origin` is 'null' if inside a frame with sandboxed csp or iframe tag

* Update apps/browser/src/content/autofill.js

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Record changes in autofill.js

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-10-21 11:55:20 -05:00
github-actions[bot] ad5b9c8c9a
Autosync the updated translations (#3862)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-21 02:16:01 +02:00
github-actions[bot] 6512f21683
Bumped browser version to 2022.10.2 (#3857)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-20 19:59:25 +01:00
Patrick H. Lauke 7aada169a1
[PS-1341] Add folder to item view (#3347)
* Initial - add folder id to popup item view

* Add folder service to view component

* Move folder info higher in the item view as proper box

* Add folder name handling to component

* Add folder field to browser view

* Add folder field to desktop view

* Make folder field draggable

following the merging of https://github.com/bitwarden/clients/pull/3321 also make the folder field draggable

* Use `<label>` and readonly `<input>`

In anticipation of https://github.com/bitwarden/clients/pull/3485 being merged

* Changes from review

- change input name to `folderName`, match it in the `for` attribute on the `<label>`
- add an `if` check before querying folder names

* Match `name` to `id`

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2022-10-20 01:12:19 +02:00
Daniel James Smith 6dc6d2087d
Fix about info not selectable/copyable (#3610) 2022-10-19 17:14:21 +02:00
github-actions[bot] c872c61e3f
Bumped browser version to 2022.10.1 (#3836)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-19 14:59:05 +01:00
Matt Gibson b4ac5a8bef
Ps 1291 fix extension icon updates (#3571)
* Add needed factories for AuthService

WIP: Allow console logs

* Add badge updates

* Init by listener

* Improve tab identification

* Define MV3 background init

* Init services in factories.

Requires conversion of all factories to promises.

We need to initialize in factory since the requester of a service
doesn't necessarily know all dependencies for that service. The only
alternative is to create an out parameter for a
generated init function, which isn't ideal.

* Improve badge setting

* Use `update-badge` in mv2 and mv3

Separates menu and badge updates

* Use update-badge everywhere

* Use BrowserApi where possible

* Update factories

* Merge duplicated methods

* Continue using private mode messager for now

* Add static platform determination.

* Break down methods and extract BrowserApi Concerns

* Prefer strict equals

* Init two-factor service in factory

* Use globalThis types

* Prefer `globalThis`

* Use Window type definition updated with Opera

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>

* Distinguish Opera from Safari

Opera includes Gecko, Chrome, Safari, and Opera in its user agent. We need to make sure that
we're not in Opera prior to testing Safari.

* Update import

* Initialize search-service for update badge context

* Build all browser MV3 artifacts

only uploading Chrome, Edge and Opera artifacts for now, as those support manifest V3

Also corrects build artifact to lower case.

* Remove individual dist

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2022-10-19 08:55:57 -05:00
Matt Gibson 23d4dcd839
Build all browser MV3 artifacts (#3835)
only uploading Chrome, Edge and Opera artifacts for now, as those support manifest V3

Also corrects build artifact to lower case.
2022-10-19 07:31:04 -05:00
Patrick H. Lauke 0e9d6ec4bd
Desktop/browser: explicitly define themed text `::selection` styles (#3675) 2022-10-19 02:22:20 +02:00
Patrick H. Lauke e1ee4e4098
Tweak styles for selects and desktop form groups (#3646) 2022-10-19 02:10:46 +02:00
Justin Baur d7c003808f
Update clear-clipboard path (#3826)
PR #3575 merged in master just before the file name changes were enforced in CI
2022-10-18 13:38:17 -04:00
Justin Baur 1d1986e5e3
[PS-817] Add Generate Password Shortcut to MV3 (#3575)
* Add generate command

* Add JSDoc

* Minor improvements

* Remove unneeded comment

* Make some properties optional

* Remove main.background.ts changes

* One more

* Lint

* Make all but length optional

* Address PR feedback

* Move generate command code to command

* Address PR feedback

* Use new alarm scheme

* Let feature handle state keys

Moves to a feature folder and creates clipboard-module level state
handler functions.

StateService is being paired down to storage routing, so we are handling storage
specifics in-module.

Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: Daniel Smith <djsmith85@users.noreply.github.com>

* Missed some changes

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Justin Baur <justindbaur@users.noreply.github.com>
Co-authored-by: Daniel Smith <djsmith85@users.noreply.github.com>
2022-10-18 13:03:09 -04:00
Thomas Rittson 04aebbc3bc
Use settings in base.json and merge config keys (#3804) 2022-10-18 12:00:40 +10:00
Oscar Hinton a9ebed0d8d
[PS-1674] Correct truncation of ciphers in browser (#3792) 2022-10-17 13:57:51 -04:00
Oscar Hinton e941f06bac
[SM-288] Rename models to follow naming convention (#3795) 2022-10-14 18:25:50 +02:00
github-actions[bot] 62aaa8b54d
Autosync the updated translations (#3783)
Co-authored-by: bitwarden-devops-bot <106330231+bitwarden-devops-bot@users.noreply.github.com>
2022-10-14 12:55:37 +02:00
dgoodman-bw 8d80698e36
[PS-1335] problem with dropped letters keypresses when searching vault from browser extension debounce (#3680)
* PS-1335 - replace custom debounce with built-in debounce, extend time to 500ms

* PS-1335 - replace custom autofocus with directive

* PS-1335 - update access modifiers of observable variables
2022-10-13 16:12:55 -07:00
github-actions[bot] 984cda2437
Autosync the updated translations (#3713)
Co-authored-by: github-actions <>
2022-10-12 15:00:36 +02:00
github-actions[bot] 95a35cd90e
Bumped browser version to 2022.10.0 (#3764)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-12 13:48:31 +01:00
David Frankel 18bc209b73
[PS-1194] Display Creation Date in Clients (#3181)
* Add CreationDate to common libs

* Add CreationDate to Browser

* Add CreationDate to CLI

* Add CreationDate to Desktop

* Add CreationDate to Web

* Update tests

Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-10-11 20:25:27 -05:00
Danielle Flinn ddfa49cf30
[PS-1531]Sentence case browser (#3578)
Copy updated. Transition browser strings to use sentence case for all UI elements, except the following terms:
• Branded Names: Provider(s) + Provider Portal, Send(s) + Send, Directory Connector
• Plan Names: Premium, Families, Teams, Enterprise
2022-10-11 17:38:52 -07:00
Justin Baur e290492d14
[PS-1569] Fix spelling of totpServiceFactory (#3746) 2022-10-11 15:39:20 -04:00
Matt Gibson 4bfe44d303
PS 1569 update on command listener (#3647)
* Add windows to platform utils service

Note, this will result in conflicts with several in-flight PRs, but is necessary for following commits.

* Add necessary background service factories

* Simplify autofill command

* Remove noop event service
2022-10-11 11:24:33 -05:00
Rui Tomé 3a298bd989
[EC-377] Transition Policy service into providing observables (#3259)
* Added abstractions for PolicyApiService and PolicyService

* Added implementations for PolicyApiService and PolicyService

* Updated all references to new PolicyApiService and PolicyService

* Deleted old PolicyService abstraction and implementation

* Fixed CLI import path for policy.service

* Fixed main.background.ts policyApiService dependency for policyService

* Ran prettier

* Updated policy-api.service with the correct imports

* [EC-377] Removed methods from StateService that read policies

* [EC-377] Updated policy service getAll method to use observable collection

* [EC-377] Added first unit tests for policy service

* [EC-377] Added more unit tests for Policy Service

* [EC-376] Sorted methods order in PolicyApiService

* [EC-376] Removed unused clearCache method from PolicyService

* [EC-376] Added upsert method to PolicyService

* [EC-376] PolicyApiService putPolicy method now upserts data to PolicyService

* [EC-377] Removed tests for deleted clearCache method

* [EC-377] Added unit test for PolicyService.upsert

* [EC-377] Updated references to state service observables

* [EC-377] Removed getAll method from PolicyService and refactored components to use observable collection

* [EC-377] Updated components to use concatMap instead of async subscribe

* [EC-377] Removed getPolicyForOrganization from policyApiService

* [EC-377] Updated policyAppliesToUser to return observable collection

* [EC-377] Changed policyService.policyAppliesToUser to return observable

* [EC-377] Fixed browser settings.component.ts getting vault timeout

* Updated people.component.ts to get ResetPassword policy through a subscription

* [EC-377] Changed passwordGenerationService.getOptions to return observable

* [EC-377] Fixed CLI generate.command.ts getting enforcePasswordGeneratorPoliciesOnOptions

* [EC-377] Fixed eslint errors on rxjs

* [EC-377] Reverted changes on passwordGeneration.service and vaultTimeout.service

* [EC-377] Removed eslint disable on web/vault/add-edit-component

* [EC-377] Changed AccountData.policies to TemporaryDataEncryption

* [EC-377] Updated import.component to be reactive to policyAppliesToUser$

* [EC-377] Updated importBlockedByPolicy$

* [EC-377] Fixed missing rename

* [EC-377] Updated policyService.masterPasswordPolicyOptions to return observable

* [EC-377] Fixed vaultTimeout imports from merge

* [EC-377] Reverted call to passwordGenerationService.getOptions

* [EC-377] Reverted call to enforcePasswordGeneratorPoliciesOnOptions

* [EC-377] Removed unneeded ngOnDestroy

* Apply suggestions from code review

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* [EC-377] Fixed login.component.ts and register.component.ts

* [EC-377] Updated PolicyService to update vaultTimeout

* [EC-377] Updated PolicyService dependencies

* [EC-377] Renamed policyAppliesToUser to policyAppliesToActiveUser

* [EC-377] VaultTimeoutSettings service now gets the vault timeout directly instead of using observables

* [EC-377] Fixed unit tests by removing unneeded vaultTimeoutSettingsService

* [EC-377] Set getDecryptedPolicies and setDecryptedPolicies as deprecated

* [EC-377] Set PolicyService.getAll as deprecated and updated to use prototype.hasOwnProperty

* [EC-565] Reverted unintended change to vaultTimeoutSettings that was causing a bug to not display the correct vault timeout

* [EC-377] Removed unneeded destroy$ from preferences.component.ts

* [EC-377] Fixed policy.service.ts import of OrganizationService

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: mimartin12 <77340197+mimartin12@users.noreply.github.com>
2022-10-11 13:08:48 +01:00
Oscar Hinton f6b2b75ad8
Forbid substitute (#3734) 2022-10-10 17:19:01 +02:00
Daniel James Smith 43d586ff99
[PS-1514] Do not subscribe to activeAccount-observable and execute load asynchronously (#3608)
* Fix async subscribe

* Revert "[PS-1066] Browser and Desktop - SSO User does not see Update Master Password screen after Owner does a Admin Password Reset (#3207)"

This reverts commit 0eda418591.
2022-10-04 20:43:51 +02:00
Patrick H. Lauke cb7b8313a4
[PS-1198] Desktop / Browser: Accessibility - make TOTP countdown announce for assistive technology users (#2660)
* Make totp countdown `aria-hidden`, add copy of countdown as `sr-only` inside totp button, only make it conditionally "exist" on parent focus

* Make exact same changes to desktop totp

* Tweak copy button accessible name approach

instead of `aria-label`, which overrides the content of the button and, because JAWS has trouble announcing the live region in the desktop app, results in JAWS not announcing ANY countdown at all, this at least announces the current countdown number when the button receives focus in JAWS

* Add `aria-atomic="true"`

avoid JAWS/Firefox only announcing the specific digit that updates, rather than the number as a whole

* Update, run prettier, lint

* Remove orphaned jslibs

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2022-10-03 16:53:44 +02:00
github-actions[bot] 9ad9645ebe
Autosync the updated translations (#3656)
Co-authored-by: github-actions <>
2022-09-30 03:07:52 +02:00
Oscar Hinton a0e89af120
[SM-255] Forbid absolute imports in libs (#3624) 2022-09-29 16:38:50 +02:00
Justin Baur 188ee5df4f
Add Types for Opera API (#3631)
* Add global types

* Update to self

* Remove main.backgroun changes

* Remove one more change
2022-09-28 18:06:10 -04:00
Justin Baur c6dccc354c
[PS-1092] Organization Service Observables (#3462)
* Update imports

* Implement observables in a few places

* Add tests

* Get all clients working

* Use _destroy

* Address PR feedback

* Address PR feedback

* Address feedback
2022-09-27 16:25:19 -04:00
Colton Hurst d168d5ee9b
Fix last seen & spacing issue (#3567)
* Fix last seen & spacing issue

* Address PR comments, moving try catch to config service
2022-09-27 11:09:48 -04:00
Gbubemi Smith 22a878792e
[SG-168] Passwordless login web MVP (#3424)
* passwordless login page redesign

* passwordless login page redesign

* restyled login form to use tailwind

* restyled login form to use tailwind

* moved texts on login device template to locales

* made reactive form changes for clients

* added request model

* made more changes

* added implmentation to auth request api

* fixed refrencing issue

* renamed model property

* Added resend notification functionality

* Added new file

* login with device first draft

* login with device first draft

* login with device first draft

* login with device first draft

* connection to anonymous hub

* connection to anonymous hub

* refactored confirm login response

* removed comment

* cleaned up login

* changed uptyped form builder

* changed uptyped form builder

* [SG-168] Update login strategy with passwordless login credentials.

* [SG-168] Removed logs. Changed inputs for passwordless logic strategy. Removed tokenRequestPasswordless it is using the same as password.

* code cleanup

* code cleanup

* removed login with device from self hosted

* fixed PR comments

* added module for login

* fixed post request bug

* added feature flag

* added feature flag

* added feature flag

Co-authored-by: André Bispo <abispo@bitwarden.com>
2022-09-26 23:26:10 +01:00
github-actions[bot] a50d1004fa
Autosync the updated translations (#3617)
Co-authored-by: github-actions <>
2022-09-26 21:19:40 +02:00
Matt Gibson df9e6e21c9
Ps 1291/apply to from json pattern to state (#3425)
* Clean up dangling behaviorSubject

* Handle null in utils

* fix null check

* Await promises, even in async functions

* Add to/fromJSON methods to State and Accounts

This is needed since all storage in manifest v3 is key-value-pair-based
and session storage of most data is actually serialized into an
encrypted string.

* Simplify AccountKeys json parsing

* Fix account key (de)serialization

* Remove unused DecodedToken state

* Correct filename typo

* Simplify keys `toJSON` tests

* Explain AccountKeys `toJSON` return type

* Remove unnecessary `any`s

* Remove unique ArrayBuffer serialization

* Initialize items in MemoryStorageService

* Revert "Fix account key (de)serialization"

This reverts commit b1dffb5c2c, which was breaking serializations

* Move fromJSON to owning object

* Add DeepJsonify type

* Use Records for storage

* Add new Account Settings to serialized data

* Fix failing serialization tests

* Extract complex type conversion to helper methods

* Remove unnecessary decorator

* Return null from json deserializers

* Remove unnecessary decorators

* Remove obsolete test

* Use type-fest `Jsonify` formatting rules for external library

* Update jsonify comment

Co-authored-by: @eliykat

* Remove erroneous comment

* Fix unintended deep-jsonify changes

* Fix prettierignore

* Fix formatting of deep-jsonify.ts

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2022-09-22 07:51:14 -05:00
github-actions[bot] 0be448b4da
Autosync the updated translations (#3581)
Co-authored-by: github-actions <>
2022-09-21 19:07:01 +02:00
cyprain-okeke 684eb7adf3
[Ps 1319] When the name of an entry is too long, the Icon indicating it is shared is not shown (#3500)
* fixing the bug ps-1319 by using ellipsis pipe which deafultg 25 character length

* pass 20 as the limit length instead default 25

Co-authored-by: dynwee <onwudiweokeke@gmail.com>
2022-09-17 11:53:55 +01:00
github-actions[bot] cdafe26ec8
Autosync the updated translations (#3545)
Co-authored-by: github-actions <>
2022-09-16 03:22:46 +02:00
aj-rosado f5336a2839
[PS-1111] Added prefix "Vault:" for accessibility on vault selector items (#3188)
* PS-1111 Added prefix "Vault:" for accessibility to vault selector items

* improved html readability

* PS-1111 Added more screen reader accessibility data to the Vault selector on Desktop and Web clients

* PS-1111 removed duplicated aria-label

* PS-1111 Removed unnecessary aria-label attribute

* PS-1111 Changed browser vault item accessibility title from span to button
2022-09-15 12:27:21 +01:00
github-actions[bot] 6d10434d66
Bump Browser version to 2022.9.1 (#3527)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-14 09:26:05 -06:00
github-actions[bot] ea8cb4c66b
Autosync the updated translations (#3517)
Co-authored-by: github-actions <>
2022-09-14 00:33:59 +02:00
Patrick H. Lauke 06e88a38e0
Make all item fields (except linked fields) draggable (#3321)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2022-09-13 20:38:38 +02:00
André Filipe da Silva Bispo acf332b689
[SG-659] Classic 2019 plans no longer generating TOTP codes for Free users (#3509)
* [SG-659] Fixed TOTP code visibility for users with classic plans.

* [SG-659] Refactored condition.

* [SG-659] Ran prettier

* [SG-659] Simplified expression.
2022-09-13 17:56:10 +01:00
github-actions[bot] df81de686f
Bump Browser version to 2022.9.0 (#3494)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-09-12 09:48:26 -06:00
github-actions[bot] d24f749a6b
Autosync the updated translations (#3472)
Co-authored-by: github-actions <>
2022-09-09 12:30:43 +02:00
Oscar Hinton 4e54b5a077
[SM-204] Add the `curly` eslint rule (#3464) 2022-09-09 09:30:51 +02:00
Justin Baur f47dbccdef
Fix file casing (#3468) 2022-09-08 14:57:10 -04:00
Daniel James Smith 28f8f245d9
[PS-1184] Remove specific keyboard shortcut logic (#3173)
* Removed logic for keyboard shortcuts specific to Vivaldi

* Removed shortcut.ts and related parts

* Removed dependency on mousetrap

* Safari: Remove sidebar_action and_execute_sidebar_action from manifest.json

* Rebuilt package-lock.json

* Fixed merge issue from pulling master
2022-09-08 14:48:45 +02:00
Colton Hurst 3b69a60511
SM-90: Add Server Version to Browser About Page (#3223)
* Add structure to display server version on browser

* Add getConfig to State Service interface

* Clean up settings component code

* Switch to ServerConfig, use Observables in the ConfigService, and more

* Fix runtime error

* Sm 90 addison (#3275)

* Use await instead of then

* Rename stateServerConfig -> storedServerConfig

* Move config validation logic to the model

* Use implied check for undefined

* Rename getStateServicerServerConfig -> buildServerConfig

* Rename getApiServiceServerConfig -> pollServerConfig

* Build server config in async

* small fixes and add last seen text

* Move config server to /config folder

* Update with concatMap and other changes

* Config project updates

* Rename fileds to convention and remove unneeded migration

* Update libs/common/src/services/state.service.ts

Update based on Oscar's recommendation

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update options for Oscar's rec

* Rename abstractions to abstracitons

* Fix null issues and add options

* Combine classes into one file, per Oscar's rec

* Add null checking

* Fix dependency issue

* Add null checks, await, and fix date issue

* Remove unneeded null check

* In progress commit, unsuitable for for more than dev env, just backing up changes made with Oscar

* Fix temp code to force last seen state

* Add localization and escapes in the browser about section

* Call complete on destroy subject rather than unsubscribe

* use mediumDate and formatDate for the last seen date messaging

* Add ThirdPartyServerName in example

* Add deprecated note per Oscar's comment

* [SM-90] Change to using a modal for browser about (#3417)

* Fix inconsistent constructor null checking

* ServerConfig can be null, fixes this

* Switch to call super first, as required

* remove unneeded null checks

* Remove null checks from server-config.data.ts class

* Update via PR comments and add back needed null check in server conf obj

* Remove type annotation from serverConfig$

* Update self-hosted to be <small> per design decision

* Re-fetch config every hour

* Make third party server version <small> and change wording per Oscar's PR comment

* Add expiresSoon function and re-fetch if the serverConfig will expire soon (older than 18 hours)

* Fix misaligned small third party server message text

Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-09-08 08:27:19 -04:00
Thomas Rittson 09a96e4ee1
Move Injection Tokens to own file (#3456) 2022-09-08 06:23:32 +10:00
Patrick H. Lauke 55e5e008c7
Don't prevent whitespace wrapping in links/buttons, widen desktop pages (#3407)
Allowing whitespace to wrap solves the issue of long link/button text awkwardly breaking out of controls
Widening desktop "pages" prevents some unnecessary wrapping in places like the "Create account" button on the login screen, whose content is slightly wider than it should be (but this is currently masked by the `nowrap`)

Closes https://github.com/bitwarden/clients/issues/2620
2022-09-06 20:32:01 +02:00
Daniel James Smith 57d60e2114
[PS-1282] Enable Arabic language support for desktop, browser, web (#3333)
* Register Arabic language with native name

* Register Arabic language for web vault

* Register Arabic language for browser

* Register Arabic language for desktop
2022-09-05 21:18:18 +02:00
Ali Alkeldi b1f48aa065
fix typo: 'salted hashtag' to 'salted hashing' (#3402) 2022-09-05 20:46:38 +02:00
Matt Gibson 123db002dc
Handle special serialization case for native messaging. (#3442)
It would be nice to fix this by processing the encString properly in
Desktop, but that wouldn't be backwards compatible with existing
installs.
2022-09-02 22:42:52 -05:00
github-actions[bot] 49f45e1e63
Autosync the updated translations (#3433)
Co-authored-by: github-actions <>
2022-09-02 11:11:54 +02:00
Thomas Rittson cff2422d7f
[EC-499] Add encryptService to domain model decryption (#3385)
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
2022-09-02 11:15:19 +10:00
Daniel James Smith 25207c2858
Extract settings related methods into VaultTimeoutSettingsService (#3419)
* Extract into new VaultTimeoutSettingsService

* Ensure new service is instantiated and registered for DI

* Create vaultTimeoutSettingsServiceFactory

* Fix VaultTimeoutServiceFactory

* Remove any and use void instead
2022-08-30 22:30:43 +02:00
Daniel James Smith 88a6541bd8
Refactorings for vaultTimeoutService/ServiceFactories (#3416)
* Move vaultTimeoutAbstraction  into it's own folder

* Move vaultTimeout service into it's own folder

* Added vaultTimeoutServiceFactory and it's missing dependencies
2022-08-30 16:11:19 +02:00
Matt Gibson a022c58b16
Add more factories (#3381)
* Add more factories

Revert main.background factory usage.

We could still do this, but factories must init their services and so need
to be async, which is not compatible with initializing in constructors

* Fix conflicts
2022-08-29 13:46:42 -05:00
Justin Baur 2c208edb98
Add `sync$` observable (#3384)
* Add sync$ observable

* Update lock method

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2022-08-29 14:14:59 -04:00
Oscar Hinton e7c7037a14
Add eslint-plugin-rxjs & rxjs-angular (#3373) 2022-08-26 18:09:28 +02:00
Oscar Hinton feb6e67bc4
[SM-184] Remove manifest.storage in Firefox since it's not supported (#3390) 2022-08-26 15:54:06 +02:00
github-actions[bot] 8a4bc9dfc8
Autosync the updated translations (#3387)
Co-authored-by: github-actions <>
2022-08-26 10:05:20 +02:00
Thomas Rittson 90137936fa
[EC-473] Add feature flags to common code (#3324) 2022-08-26 13:00:14 +10:00
Matt Gibson aed78a5b61
PS-818 Add managed schema to mv3 manifest (#3357) 2022-08-25 13:47:21 -05:00
Daniel James Smith 4c5a46ce13
[PS-1363] Tech debt and small refactorings (#3377)
* Remove cast to any as Utils.gobal got typed with #3131

* BitwardenFileUploadService: Remove unneeded dependency

* Remove allowSoftLock from vaultTimeoutService

* ImportService: Remove dependency on PlatformUtilsSvc
2022-08-25 19:09:27 +02:00
Kyle Spearrin bb70113279
feedback from fastmail (#3375)
* feedback from fastmail

* follow redirects for getting account id api
2022-08-25 10:54:02 -04:00
Justin Baur 7145b13df1
[PS-1093] Move Organization Api Calls (#3243)
* Move organization api calls into seperate service

* Remove unneeded unknown

* Address PR feedback
2022-08-24 12:33:05 -04:00
Daniel James Smith 364d2f311e
Remove stateService from browserPlatformUtilsService (#3362) 2022-08-24 00:22:18 +02:00
Kyle Spearrin 2a49824581
[SG-515] add fastmail integration for generator (#3318)
* add fastmail integration for generator

* prettier

* introduce forwarder interface and implementations
2022-08-19 14:52:14 -04:00
David S 4c099aca46
[PS-1302] added duckduckgo's email forwarding service 🦆 (#3306)
* added duckduckgo's email forwarding

* removed unnecessary excxeption

* renamed "Private Duck Address" to "DuckDuckGo"

Co-authored-by: Dattito <github@relay.datti.to>
2022-08-19 09:45:02 -04:00
Patrick H. Lauke a48bf9269f
[PS-1301] Accessibility: improve item edit for URIs and custom fields (#3305)
* Add `role="group"` and accName to URI and custom field groups (browser)

Provides more context when editing fields (to understand what the remove, options, etc buttons are all about)

* Add `aria-describedby` to custom field value fields (browser)

provides further context other than the generic "Value" label

* Add `role="group"` and accName to URI and custom field groups, add `aria-describedby` to custom field value fields (desktop)

* Add `role="group"` and accName to URI and custom field groups, add `aria-describedby` to custom field value fields (web)

* Use `attr.aria-label` instead of `appA11yTitle`

don't need/want the tooltips appearing everywhere
2022-08-19 14:17:20 +02:00
github-actions[bot] 9dbad19ff1
Autosync the updated translations (#3337)
Co-authored-by: github-actions <>
2022-08-19 11:27:18 +02:00
Matt Gibson f74aa6f314
Add Manifest v3 artifact to pipelines (#3331)
This requires a second build due to the differences being handled in webpack.
2022-08-18 11:07:02 -05:00
Daniel James Smith dcd858d8ae
[PS-1286] Enable Basque language support for desktop, browser, web (#3332)
* Register basque language with native name

* Register basque language for web vault

* Register basque language for browser

* Register basque language for desktop
2022-08-18 17:55:41 +02:00
Matt Gibson 179a3b3726
[PS-1265] fix on install hook (#3278)
* Create service factories

* Add onInstall hook to service worker

* Add factory helper and common options structure

* Use factories in main.background

* simplify common factory options

* Split factory service cache and options.

Improve factory method base type handling.

* Add dev flag for managed environment.
2022-08-18 09:23:16 -05:00
Patrick H. Lauke babfa30c68
[PS-1222] Remove `appBlurClick` throughout the popup and web code (#3208)
* Remove appBlurClick throughout the popup code

`appBlurClick` leads to focus being lost/reset for assistive technology users. It should not be necessary in any case - if focus does need to move after an action, explicitly set it somewhere programmatically using `focus()` rather than relying on browser heuristics

* Remove now redundant blur-click directive
2022-08-17 10:42:26 +02:00
Patrick H. Lauke b1a47b85b5
[PS-1303] Desktop/browser: tweak `.box-header-expandable` styles (#3308)
* Add extra margin for desktop settings expanded header buttons

* Only change box-header-expandable background on `:focus-visible` not `:focus`

Avoids having the background colour "stick" when clicking with the mouse until you click somewhere else
2022-08-16 21:05:31 +02:00
Patrick H. Lauke da9dca6dd6
Don't suppress outline for input[type="file"] controls (#3210)
Closes https://github.com/bitwarden/clients/issues/3209
2022-08-16 20:51:45 +02:00
Matt Gibson 7c3facec80
Split session key and synced item property key (#3317) 2022-08-16 10:59:50 -05:00
Matt Gibson 5339344630
PS-1133 Feature/mv3 browser observable memory caching (#3245)
* Create sessions sync structure

* Add observing to session-syncer

* Do not run syncer logic in decorator tests

* Extract test constants

* Change Observables to BehaviorSubject

* Move sendMessage to static method in BrowserApi

* Implement session sync

* only watch in manifest v3

* Use session sync on folder service

* Add array observable sync

* Bypass cache on update from message

* Create feature and dev flags for browser

* Protect development-only methods with decorator

* Improve todo comments for long-term residency

* Use class properties in init

* Do not reuse mocks

* Use json (de)serialization patterns

* Fix failing session storage in dev environment

* Split up complex EncString constructor

* Default false for decrypted session storage

* Try removing hydrate EncString method

* PR review

* PR test review
2022-08-16 07:05:03 -05:00