Commit Graph

183 Commits

Author SHA1 Message Date
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
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
Gbubemi Smith 4c9cddd639
Re-\added the focusInput method to allow desktop build run (#3937) 2022-10-31 19:25:55 -04:00
Gbubemi Smith 05fe75d96f
Added focus to the email and master password fields (#3934) 2022-10-31 17:37:42 -04:00
Kyle Spearrin 5cb84927ea
400s only log out on invalid grant error (#3924) 2022-10-28 18:10:10 -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
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
Oscar Hinton 5f6f4bad82
[SM-251] Migrate to new avatar component (#3600) 2022-10-27 14:38:34 +02:00
Oscar Hinton 7fa0231616
[SM-298] Migrate search icon to bit icon component (#3823) 2022-10-27 14:35:37 +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
Rui Tomé 849ca1661a
[EC-417] Fix lint by renaming files to match angular filename convention (#3891)
* [EC-417] Rename files to match angular filename convention
2022-10-25 10:47:02 +01:00
Rui Tomé 754ea1e09a
[EC-417] Extracting the app name from the Android user item on CSV import (#3254)
* [EC-417] Extracting the app name from the Android user item on CSV import

* [EC-417] Updated android csv pattern to match starting with 'android://'

* [EC-417] Added unit tests for ChromeCsvImporter
2022-10-25 09:49:57 +01:00
Daniel James Smith 8c59eef257
[PS-1123] Improve hostname and domain retrieval (#3168)
* Add test cases from previous PR https://github.com/bitwarden/jslib/pull/547

* Install tldts as replacement for tldjs

* Use tldts for hostname and domain retrieval/validation

* Remove usage of old tldjs.noop-implementation

* Add handling of about protocol

* Remove usage of tldEndingRegex and use tldts check instead

* Uninstall @types/tldjs and tldjs

* Updated package-lock.json

* Fix accessibility cookie check

* Rename loginUriView.spec to login-uri-view.spec

* Add test for getDomain failing file links

* getHostName - Return null when given, data, about or file links
2022-10-24 19:26:50 +02:00
Oscar Hinton 94e9744d06
Update design urls to main figma file (#3880) 2022-10-24 19:20:38 +02:00
Shane Melton 3ed1221f7f
Fix MultiSelect component styles and CSP error (#3841)
* Update Web styles and CSP to support MultiSelect component

- Include the MultiSelect module in the CL barrel file of exports
- Import the MultiSelect scss into the Web styles.scss
- Add the necessary sha256 hash to webpack CSP policy to support ngSelect inline styles

* Undo removal of 127.0.0.1 from webpack CSP
2022-10-19 16:24:39 -07: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
Gbubemi Smith cc0199d351
[SG-698] Passwordless Login with 2FA enabled does not redirect to 2FA page (#3820)
* added 2fa enabled

* added passwordless authentication to 2fa

* passwordless strategy to authservice

* changes to 2FA to allow email sending for passwordless

* updated imports
2022-10-19 17:21:20 +01:00
Matt Gibson da0a17a2b6
PS-1620 Move AccountService.delete to Internal (#3687)
* Move AccountService.delete to Internal

* Remove unnecessary promise
2022-10-18 22:02:11 +02:00
Oscar Hinton dcc0a556a2
[SM-245] Change register and prelogin to always use api (#3553) 2022-10-18 21:39:35 +02: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
Oscar Hinton cf2d3f5382
[SM-288] Rename requests and responses to follow naming convention (#3806) 2022-10-18 19:01:42 +02:00
Danielle Flinn a5abbecf39
Storybook docs structure (#3755)
* updated naming of common to documentation

* Add button docs

* updated sort order

Documentation is now above the component library and allows the general pages to come before the component specific ones.

* fixed typos

* updated file name

* fixed typo in introduction.stories.mdx

* updated banner.stories.mdx to match new docs structure

* remove plural in button docs
2022-10-18 07:54:27 -07:00
Jaclyn Touchstone fcd388e888
Create banner.stories.mdx (#3695)
* Create banner.stories.mdx

Added documentation for Banner component in Common

* Update banner.stories.mdx

Added comment to test verification

* Update banner.stories.mdx

Removing test comment

* Trying our referencing stories in banner mdx

* fix: build errors

* Added stories for banner info, warning, danger

* Formatting update libs/components/src/banner/banner.stories.ts

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

* Update banner.stories.mdx

Added list formatting to text for readability, added section for Accessibility

* Update libs/components/src/stories/banner.stories.mdx

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

* Update libs/components/src/stories/banner.stories.mdx

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

* Updated banner.stories.mdx

Added section for Accessibility, improvements to text formatting for readability

Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
2022-10-17 13:25:55 -05:00
Oscar Hinton e941f06bac
[SM-288] Rename models to follow naming convention (#3795) 2022-10-14 18:25:50 +02:00
Aaron Toponce de13097a89
fix typo: EEFLongWordList -> EFFLongWordList (#3742)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2022-10-14 14:57:45 +02:00
Shane Melton d77713e3ba
Update bwi-font files and icon stylesheet (#3780) 2022-10-13 16:43:09 -07: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
Daniel James Smith ae5110aaee
Fix linting issue caused by #3259 (#3743) 2022-10-11 13:45:59 -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
Vincent Salucci 9578e7b6b4
[CL-27] [EC-455] Ng-Select Integration (#3383)
* [CL-27] Select -> Library initial commit

* [EC-455] NG-Select Integration

* Prettier

* [EC-455] [CL-27] Add option for removing items on close // Added loading/no item found text defaults // Fixed disabled bg color // Added templated loading icon

* [EC-455] [CL-27] Removed enter override // Fixed backspace removal // Clearing search on add // Gave label select states

* [EC-455] [CL-27] Added copy from text to theme

* [EC-455] [CL-27] Changed SimpleItemView to type - removed creation logic to shift responsibility to hosting component

* [EC-455] [CL-27] Updated custom theme to include CSS variable colors

* [CL-27] [EC-455] Initial pass at form field control // initial template for custom value accessor

* [EC-455] working baseItem input

* [EC-455] working value accessor

* [EC-455] Completed FormFieldControl implemntation // fixed badge disabled bug

* [EC-455] Prettier

* [EC-455] Removed obsolete variables

* [EC-455] Private value accessor functions

* [EC-455] Cleaned up default variables

* [EC-455] Imported Shared module to access i18n pipe // cleaned up string refs

* [EC-455] Adjusted padding for clear button // Changed hover color to text-main // Fixed pipe import on stories

* [EC-455] FormObj factory

* [EC-455] FormObj factory

* [EC-455] Updated FormFieldModule import/export statements

* [EC-455] Null check ngControl // added strings

* [EC-455] Fixed remaining null check // Added standalone story & input

* [EC-455] Actually adding the null check

* [EC-455] Removed injector logic // Removed Value Accessor PROVIDER // Self-assigned value accessor

* [EC-455] Fixed ID copy pasta // Forwarded desribed by to focusable input // Abstracted input for label

* [EC-455] Prettier
2022-10-11 07:49:31 -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
Andreas Coroiu ea12ee2b10
[EC-558] chore: cleanup unused code (#3740) 2022-10-11 10:50:46 +02:00
Thomas Rittson be040080db
Mark modalService.openViewRef as deprecated (#3697) 2022-10-11 06:57:45 +10:00
Oscar Hinton f6b2b75ad8
Forbid substitute (#3734) 2022-10-10 17:19:01 +02:00
Andreas Coroiu bb4f063fe7
[EC-558] Reflecting async progress on buttons and forms (#3548)
* [EC-556] feat: convert button into component

* [EC-556] feat: implement loading state

* [EC-556] feat: remove loading from submit button

* [EC-556] fix: add missing import

* [EC-556] fix: disabling button using regular attribute

* [EC-556] feat: implement bitFormButton

* [EC-556] feat: use bitFormButton in submit button

* [EC-556] fix: missing import

* [EC-558] chore: rename file to match class name

* [EC-558] feat: allow skipping bitButton on form buttons

* [EC-558]: only show spinner on submit button

* [EC-558] feat: add new bit async directive

* [EC-558] feat: add functionToObservable util

* [EC-558] feat: implement bitAction directive

* [EC-558] refactor: simplify bitSubmit using functionToObservable

* [EC-558] feat: connect bit action with form button

* [EC-558] feat: execute function immediately to allow for form validation

* [EC-558] feat: disable form on loading

* [EC-558] chore: remove duplicate types

* [EC-558] feat: move validation service to common

* [EC-558] feat: add error handling using validation service

* [EC-558] feat: add support for icon button

* [EC-558] fix: icon button hover border styles

* [EC-558] chore: refactor icon button story to show all styles

* [EC-558] fix: better align loading spinner to middle

* [EC-558] fix: simplify try catch

* [EC-558] chore: reorganize async actions

* [EC-558] chore: rename stories

* [EC-558] docs: add documentation

* [EC-558] feat: decouple buttons and form buttons

* [EC-558] chore: rename button like abstraction

* [EC-558] chore: remove null check

* [EC-558] docs: add jsdocs to directives

* [EC-558] fix: switch abs imports to relative

* [EC-558] chore: add async actions module to web shared module

* [EC-558] chore: remove unecessary null check

* [EC-558] chore: apply suggestions from code review

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

* [EC-558] fix: whitespaces

* [EC-558] feat: dont disable form by default

* [EC-558] fix: bug where form could be submit during a previous submit

* [EC-558] feat: remove ability to disable form

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-10-10 16:04:29 +02:00
Oscar Hinton 96c99058c4
[CL-42] Add code color (#3662) 2022-10-07 18:24:49 +02:00
cd-bitwarden 8676d194d0
fixes (#3708) 2022-10-06 12:31:31 -04: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
Oscar Hinton b153ed6d01
[SM-265] Add eslint rule forbidding get().value (#3671) 2022-10-04 15:40:00 +02:00
Thomas Rittson 162db0b600
[EC-582] Add domain object serialization (#3623) 2022-10-04 06:50:43 +10:00
Addison Beck 65989e3c38
Rename anonymousHub route to anonymous-hub (#3650) 2022-09-29 14:10:35 -04:00
Oscar Hinton 1fbfb89cc3
Ensure avatar component is stable (#3640) 2022-09-29 18:57:35 +02:00
Oscar Hinton a0e89af120
[SM-255] Forbid absolute imports in libs (#3624) 2022-09-29 16:38:50 +02:00
Shane Melton 870ced2235
Make content padding optional on Dialog components to support tab group content (#3634) 2022-09-28 09:05:35 -07: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
Andreas Coroiu cd7c9bfd9f
[EC-556] refactor cl button (#3537)
* [EC-556] feat: convert button into component

* [EC-556] feat: implement loading state

* [EC-556] feat: remove loading from submit button

* [EC-556] fix: add missing import

* [EC-556] fix: disabling button using regular attribute

* [EC-556] fix: missing loading input in story templates

* [EC-556] feat: remove and replace submit button

* Fix packaging on Build Web workflow (#3613)

(cherry picked from commit 67c447d54c)

* [EC-556] fix: replaced buttons should be primary

Co-authored-by: Vince Grassia <593223+vgrassia@users.noreply.github.com>
2022-09-27 11:25:53 +02:00
Andreas Coroiu b5de573497
fix: icon button style incompats (#3611) 2022-09-27 11:22:31 +02:00
Thomas Rittson 5ffa3ccd20
Prevent banned imports into libs/common (#3599)
Also fix typescript-eslint/parser config and fix linting errors
2022-09-27 11:17:43 +10: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