Commit Graph

80 Commits

Author SHA1 Message Date
Justin Baur 43d428b3df
[PS-816] Add Autofill Shortcut to MV3 Extension (#3131)
* Work on background service worker.

* Work on shortcuts

* Work on supporting service worker

* Put new background behind version check

* Fix build

* Use new storage service

* create commands from crypto service (#2995)

* Work on service worker autofill

* Got basic autofill working

* Final touches

* Work on tests

* Revert some changes

* Add modifications

* Remove unused ciphers for now

* Cleanup

* Address PR feedback

* Update lock file

* Update noop service

* Add chrome type

* Handle "/" in branch names

Updates web workflow to handle the `/` in branch names when it's a PR.

* Remove any

Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Micaiah Martin <77340197+mimartin12@users.noreply.github.com>
2022-08-09 21:30:26 -04:00
Daniel James Smith cfc8858ef9
Fix active account and searchBar observables/subscriptions (#3268)
* Change subscription to rely on observables and not on BehaviourSubject

* Ensure OnDestroy is added to AppComponent

* Fix check for no active accounts to redirect to the login page instead of lock

* Change subscription handling on SearchBarService

* Fix naming convention: Observables should have a $ suffix

* Remove obsolete linter hint

* Fix activeAccountUnlocked getting exposed as Observable but is instantiated as BehaviourSubject
2022-08-09 21:11:51 +02:00
Addison Beck 95bb429281
[SG-360] Remove the /modules/ folder (#3225)
* Move Web's SharedModule to /app/shared/

This commit relocates `SharedModule` from `/app/modules` to `/app/shared` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference `SharedModule`.

* Move /modules/pipes to /shared/pipes

This commit relocates `PipesModule` from `/app/modules` to `/app/shared` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference `PipesModule`.

* Move LooseComponentsModule to /shared/

This commit relocates `LooseComponentsModule` from `/app/modules` to `/app/shared` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference `LooseComponentsModule`.

* Move VerticalStepperModule to /shared/

This commit relocates `VerticalStepperModule` from `/app/modules` to `/app/shared` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference `VerticalStepperModule`.

* Move TrialInitiationModule to /shared/

This commit relocates `TrialInitiationModule` & `RegisterFormModule` from `/app/modules` to `/app/shared` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference `TrialInitiationModule` or `RegisterFormModule`.

* Move /modules/organization to /organization

This commit relocates all modules in `/app/modules/organization` to `/app/organization` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference the moved modules.

* Move /modules/vault/ to /vault

This commit relocates the IndividualVaultModule to `/app/modules/vault`, and the OrganizationVaultModule to `/app/organization/vault` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference the moved modules.

* Move VaultFiltersModule to /vault

This commit relocates the `VaultFilterModule` to `/app/vault/vault-filter`, and the OrganizationVaultFilterComponent to `/app/organization/vault/vault-filter` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference the moved modules.

* Remove the /modules/ folder from desktop

This commit relocates the `VaultFilterModule` to `/app/vault/vault-filter`, and the OrganizationVaultFilterComponent to `/app/organization/vault/vault-filter` to
align with [ADR #11](https://adr.bitwarden.com/decisions/0011-angular-folder-structure)

All other changes are just to adjust imports that reference the moved modules.

* Move Libs' VaultFiltersComponent to /vault/

This commit moves the lib's logic for `VaultFiltersModule` from
`/modules/` to `/vault/`

All other changes are just to adjust imports that reference the moved
files.

* Rename VaultModule -> SharedVaultModule

* Rename IndividualVaultModule -> VaultModule

* Rename OrganizationVaultModule -> VaultModule

* Rename OrganizationVaultFilterComponent

Rename OrganizationVaultFilterComponent to VaultFilterComponent

* Seperate the two VaultFilterComponents

This commit seperate the `OrganizationVaultFilterComponent` from the `VaultFilerModule`, which is only used by the individual vault.
A `VaultFilterSharedModule` was created to declare shared components and provide shared services between the two implementations.
This was done to align with best practices for NgModules.

* [r] Move VerticalStepperModule to /account/

More specifically, /account/trial/

* [r] Declare PaymentComponent in LooseComponentsModule

`PaymentComponent` is not reused across domains and should not be
declared in `SharedModule`.

I've moved it to `LooseComponentsModule` for now, but later it will need
to be exported from a `SettingsModule`.

* [r] Declare TaxInfoComponent in LooseComponentsModule

* [r] Reloacte Pipes out of /shared/

* [r] Extract locales out of SharedModule

* [r] Add documentation to shared module

* [r] Cleanup imports

* [r] Use an index.ts file for /shared/

* [r] Add eslint rule restricting access to /shared/

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2022-08-08 15:08:35 -04:00
Vincent Salucci 07c7357825
[Component Library] Text/Button Links (#3126)
* Initial commit

* Updated stories / Fixed issues with dark theme constrast color

* Force colors so bootstrap doesn't override

* Fixed text colors / Added initial tests

* Added jest debugging ability to components package

* Removed spec file

* Fixed anchor layout

* revert base font-size

* [CL-28] fixed indentation, used focus-visible, adjusted disabled colors

* [CL-28] Reduced ring thickness to better match figma

* [CL-28] Updated story link

* [CL-44] [CL-28] Updated tabs disabled color / Converted to rgb format with helper
2022-08-08 11:21:46 -05:00
Oscar Hinton af371af6e1
[SM-88] [BEEEP] Add support for chrome.storage.managed for environment urls (#3120)
* Add managed_schema

* Add note on login page which server you are logging into.

* Implement it

* Remove caching logic since it seems unecessary

* Add error

* Handle error in hasManagedEnvironment

* Fix compile
2022-08-08 07:40:09 -04:00
Rui Tomé c263eacd88
[EC-376] Extract API logic from PolicyService to PolicyApiService (#3203)
* 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

* Updated policy-api.service with the correct imports

* [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
2022-08-08 10:04:36 +01:00
Daniel James Smith a1e536a5ef
[PS-1175] Resolve issue with processReload not executing (#3240)
* Removed check for getBiometricLocked
It always returned false even when no biometrics were used.

* Remove the other check for getBiometricsLocked

* Ensure that biometricFingerprintValidation is reset, when biometrics are disabled

* Removed getBiometricsLocked and setBiometricsLocked
With nothing in the codebase reading the state of getBiometricsLocked, I've removed all places where it was set or saved.

* Refactor execution of reload into a separate method

* Conditonally pass the window object to `BrowserApi.reloadExtension`

* Clarify in comment, that the PIN has to be set with ask for Master Password on restart

* Ensure the process reload is executed on logout

* Use accounts instead of lastActive == null to determine a reload on logout

* Moved identical logic from desktop and browser into system.service

* Simplified check for refresh to handle no accounts found, logout, lock with lastActive longer than 5 seconds
2022-08-05 20:04:27 +02:00
Oscar Hinton 762fac062f
[CL-46] Dialogs (#3237) 2022-08-05 17:45:36 +02:00
Thomas Rittson b625767f13
Fix non-enterprise users being able to access scim (#3250) 2022-08-05 10:40:16 +10:00
Thomas Rittson 8626e1d4e6
[EC-281] Add de/serialization methods to CipherView objects (#2970) 2022-08-05 08:07:24 +10:00
Thomas Rittson 83c0456340
[EC-364] Expose key getters on CryptoService (#3170)
* Move resolveLegacyKey to encryptService for utf8 decryption

* Deprecate account.keys.legacyEtmKey

Includes migration to tidy up leftover data

* Use new IEncrypted interface
2022-08-04 07:09:36 +10:00
Oscar Hinton 6b1652e34c
[SM-108] Refactor Reports - Add storybook stories (#3204) 2022-08-03 21:40:04 +02:00
Oscar Hinton 75cd41b9b3
Remove absolute value in toggle group (#3213) 2022-08-02 17:43:50 +02:00
Oscar Hinton 379036123f
[SM-110] Add prettier-plugin-tailwindcss (#3215) 2022-08-02 08:45:59 +02:00
Gbubemi Smith 257fb0c0af
[SG-414] Refactor password strength component (#3186)
* moved password strength to libs

* refactored password strength component

* made changes on desktop and browser to reuse component

* resolved suggestions from PR review

* shared module restructure

* shared module restructure
2022-08-01 23:26:50 +01:00
Andreas Coroiu a22ef4d36c
[EC-317] Desktop client delete user account (#3151)
* [EC-317] feat: add delete account section in settings

* [EC-317] feat: add new delete account modal

* [EC-317] feat: add ability to replace top-most modal

* [EC-317] chore: remove unecessary lint ignore

* [EC-317] fix: so delete account is closed if export vault is opened

* [EC-317] feat: inital delete account design without i18n

* [EC-317] feat: disabled but basic working delete functionality

* [EC-317] feat: implement according to new design

* [EC-317] feat: use translations

* [EC-317] feat: implement working deletion

* [EC-317] feat: add loading state and error messages

* [EC-317] feat: add menu bar item

* [EC-317] feat: update form to support typed reactive forms

* [EC-317] chore: update translation text after design review

* [EC-317] feat: move deletion logic to service

* [EC-317] refactor: update web deletion

* [EC-317] feat: disable submit if secret is empty

* [EC-317] fix: handle errors in components as well

* [EC-317] fix: use abstraction as interface

* [EC-317] refactor: extract deleteAccount from api service

* [EC-317] fix: typo in translations

* [EC-317] chore: rename to accountApiService
2022-07-29 21:49:58 +02:00
Justin Baur a46510bab4
[PS-1202] Also update the decrypted history (#3205) 2022-07-29 09:47:30 -04:00
Oscar Hinton 4fc278b956
[CL-24] Add tables (#2950) 2022-07-28 12:43:00 +02:00
Rui Tomé da341e1317
[EC-247] Add columns to provider portal clients table (#3147)
* Added properties "userCount", "seats" and "plan" to ProviderOrganizationResponse

* Added text message "numberOfUsers"

* Updated provider clients component with new columns

* Removed never used dependency

* Changed userCount to non nullable number

* Added condition on the component to only show seats number if not null

* Changed view condition to an explicit check
2022-07-28 09:31:57 +01:00
Thomas Rittson 2c9ccefa12
Do not set state to null and throw if this occurs (#3191) 2022-07-28 10:14:28 +10:00
Oscar Hinton 2011131bb2
[PS-182] Upgrade Angular to V14 (#2948) 2022-07-26 14:48:11 +02:00
Thomas Rittson c90eb42ead
[EC-271] Refactor CryptoService - move symmetric encryption to EncryptService (#3042)
* move decryptFromBytes, decryptToBytes, and encryptToBytes from CryptoService to EncryptService
* leave redirects in CryptoService
* combine encryptService decryptFromBytes and decryptToBytes methods
* move parsing logic into EncArrayBuffer
* add tests
2022-07-26 11:40:32 +10:00
Oscar Hinton 5c57b5e663
Fix folder tests (#3171) 2022-07-25 13:53:22 +02:00
Oscar Hinton 0c1bd57cfd
[BEEEP] [EC-141] Rust - Windows hello (#2635) 2022-07-25 13:24:13 +02:00
Rui Tomé b50de43556
[EC-320] Add organization vault export to event logs (#3136)
* Added organizationId to EventData and EventRequest

* Added EventType Organization_ClientExportedVault

* Sending organizationId on Organization Export event

* Checking that the user belongs to the organization

* Added organizationExportResponse model

* Added API method to get Organization vault export data

* Updated getOrganizationDecryptedExport to use new API method
2022-07-25 09:56:03 +01:00
Thomas Rittson 0f44789d0f
[EC-338] Update SCIM code naming conventions (revoked/restore) (#3160) 2022-07-25 10:47:56 +10:00
Vincent Salucci 8694227b92
[CL-17] Use focus-visible for keyboard selection (#3152) 2022-07-22 14:22:37 -05:00
Matt Gibson 528af15eb0
Do not use deprecated method (#3155) 2022-07-22 11:41:02 -05:00
Thomas Avery 8cb92d425c
[CL-29] Modal Components for the component library (#3053)
The purpose of this PR is to add Modals into the component library.

To note, this PR is focused on the visual of the modal that will "pop-up" and not the actual pop-up implementation.
2022-07-22 10:55:45 -05:00
Gbubemi Smith 9fef1d21a4
[SG-430] Modify registration component to use static ids (#3144)
* refactored form to use static ids

* renamed ids to meet standard

* renamed ids to meet standard

* renamed ids to meet standard
2022-07-22 11:22:01 +01:00
cyprain-okeke 01dd22fda8
Ps 971/rate limiting error gives html (#3097)
* made changes in the errorResponse.ts to return toast message for status 429

* refactor the existing bug implementation

Co-authored-by: dynwee <onwudiweokeke@gmail.com>
2022-07-20 20:21:13 +01:00
Thomas Rittson adecf4eeba
[EC-339] Add eventType and UI strings for Restore/Revoke OrgUser (#3137) 2022-07-20 11:57:25 +10:00
Gbubemi Smith f07e071f09
[SG-69] Billing payment step (#3133)
* billing folder added

* initial commit

* [SG-74] Trial Initiation Component with Vertical Stepper (#2913)

* Vertical stepper PoC

* Convert stepper css to tailwind

* trial component start

* trial component params

* tailwind-ify header

* Support teams, enterprise, and families layout param and more layout ui work

* Some more theming fixes

* Rename TrialModule to TrialInitiationModule

* Stepper fixes, plus more functionality demo

* Cleanup

* layout params and placeholders

* Only allow trial route to be hit if not logged in

* fix typo

* Use background-alt2 color for header

* Move vertical stepper out of trial-initiation

* Create components for the different plan types

* Remove width on steps

* Remove content projection for label

* Tailwind style fixes

* Extract step content into a component

* Remove layout param for now

* Remove step tags

* remove pointer classes from step button

* Remove most tailwind important designations

* Update apps/web/src/app/modules/vertical-stepper/vertical-step.component.ts

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

* Tailwind and layout fixes

* Remove container

* lint & prettier fixes

* Remove extra CdkStep declaration

* Styles fixes

* Style logo directly

* Remove 0 margin on image

* Fix tiling and responsiveness

* Minor padding fixes for org pages

* Update apps/web/src/app/modules/trial-initiation/trial-initiation.component.html

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

* prettier fix

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

* [SG-65] Reusable Registration Form (#2946)

* created reusable registration form

* fixed conflicts

* replicated reactive form changes in other clients

* removed comments

* client template cleanup

* client template cleanup

* removed comments in template file

* changed to component suffix

* switched show password to use component

* comments resolution

* comments resolution

* added toast disable functionality

* removed unused locale

* mode custom input validator generic

* fixed button

* fixed linter

* removed horizontal rule

* switched to button component

* Added billng step

* Added keys to locale

* billing trial initiation step

* billing trial initiation step

* Dont load billing content until the step is selected

* billing trial initiation step

* billing trial initiation step

* billing trial initiation step

* made the get plans endpoint anonymous

* merged with master and extra changes

* major changes on billing step

* billing step sub label

* Made changes to billing step sub label

* removed unused variable

* removed unused logic

* cleanup

* fixed suggestions

* removed unused reference

* added billing sub label

Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
Co-authored-by: addison <addisonbeck1@gmail.com>
2022-07-20 02:00:25 +01:00
Vitaly Baev 0a4b8b15bc
[PS-1122] Adds Mir payment system (#3079)
* Adds Mir payment system

* Fixes Mir regex pattern and formatting

* Changes Mir logos to Russian ones

* Localize Mir in select
2022-07-19 12:20:37 +02:00
Brandon Maharaj 4d5df858e9
chore: added new ui fields (#2991) 2022-07-18 17:47:53 -04:00
Oscar Hinton abed118ef0
Fix input group disabled button styling (#3130) 2022-07-18 19:08:41 +02:00
Vincent Salucci 5ef3aac5e2
[CL-17] Tabs - Router (#2952)
* [CL-17] Tabs - Routing

* Updated titles

* Revision changes

* Replaced testing module to achieve active default state

* Z-index for tab vs disabled

* Revision changes

* Updated z index on focus

* Fixed background color of selected tab

* Force text colors in-case bootstrap tries to override

* Remove unecessary css rules, fix tabs moving when active

Co-authored-by: Hinton <hinton@users.noreply.github.com>
2022-07-18 09:17:31 -05:00
Oscar Hinton fbff2e5f00
[PS-1134] Folder fixes, including revamped auth logic (#3118) 2022-07-18 14:39:12 +02:00
Andreas Coroiu cd5aef1757
[Cl-10] Button group (#3031)
* chore: setup initial bit-button-group using bitButton as template

* feat: working radio group with preliminary styling

* chore: cleanup

* feat: implement proper basic styling

* feat: implement focus handling and keyboard navigation

* feat: implement size support

* feat: add labeling support

* feat: add input for button selection

* feat: implement output handler on radio button interaction

* feat: implement internal input/output seletion handling

* feat: add external input support

* feat: add external output support

* chore: simplify storybook example a bit

* fix: module imports

* refactor: simplify both components

* feat: remove size

* chore: rename button-group to toggle-group

* chore: rename toggle-group-element to toggle-group-button

* chore: update story example

* fix: compatibility with web vault

* fix: imports in tests after rename

* fix: remove unnecessary inject decorator

* fix: clarify field names and html tags

* feat: add badge centering fix

* feat: set pointer cursor on label

* chore: comment on special css rules

* chore: remove focusable option from button

* Update libs/components/src/toggle-group/toggle-group-button.component.ts

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

* chore: rename to `bit-toggle`

* fix: remove unecessary aria label function

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2022-07-18 14:25:37 +02:00
Chad Scharf e32c4083f3
EC-265 - SCIM configuration page in org admin (#3065)
* EC-265 - Initial stubs for SCIM config UI

* EC-265 - Scim config screen and plumbing

* EC-265 - Scim config component works! Needs cleanup

* EC-265 - Finalize scim config screen

* EC-265 - Remove  scim url from storage and env urls

* EC-265 - Refactor to use new component library

* EC-265 - Angular warnings on disabled attr resolved

* EC-265 - Continued transition to new components

* EC-265 - Page loading spinner pattern

* EC-265 - final SCIM configuration form changes

* scim cleanup

* use scim urls

* suggested changes

* feedback fixes

* remove return

* Move scimUrl logic to EnvironmentService

* Refactor scim url handling

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
2022-07-15 09:35:30 -04:00
Addison Beck d23e043141
[fix] Always use the Window directly in ThemingService (#3116) 2022-07-15 11:27:13 +02:00
Andreas Coroiu 797fc3a390
[Cl-10] Make badge inline (#3089)
* feat: make badge inline

* feat: lower y-padding
2022-07-15 10:59:19 +02:00
Addison Beck 4be301f125
[fix] System theming in the Safari extension (#3107) 2022-07-14 14:47:45 -04:00
Danielle Flinn 6a8fb0a053
Storybook icon documentation (#3023)
* created common/icons page

* updated icon documentation

* updated icon organization

* update organization and some descriptions

* updated icon stories
2022-07-14 08:17:24 -07:00
Gbubemi Smith 6a26223f93
Fixed self host defect (#3094) 2022-07-13 15:14:03 +01:00
Thomas Rittson 5e84c630a8
[EC-135] Delay decryption of provider-encrypted org keys (#2902) 2022-07-13 07:08:07 +10:00
Oscar Hinton 23253b3882
[PS-1078] Refactor FolderService to use Observables (#3022) 2022-07-12 20:25:18 +02:00
Colton Hurst 59eac668a7
[PS-713] Fix locale search bug (#3014)
* [PS-713] Fix locale search bug

* [PS-713] Add new locales to start at 1 char search

* [PS-713] Switch to ReplaySubject and other edits from PR comments

* PS-713: Add destroy to other sub and make locale inline a const

* PS-713: Use firstValueFrom instead of takeUntil

* PS-713: get this.locale asynchronously

Co-authored-by: Colton Hurst <churst@bitwarden.com>
2022-07-12 09:02:19 -04:00
Gbubemi Smith 9bf27a2050
[SG-420] Fixed password match defect (#3075)
* fixed password match defect

* change custom validator to static methods
2022-07-11 19:58:56 +01:00
Robyn MacCallum 5ed6b9fb74
Implement create account step (#3073) 2022-07-11 11:06:32 -04:00