Commit Graph

40 Commits

Author SHA1 Message Date
Thomas Rittson b68b8b3aab Add typing 2022-06-29 14:00:05 +10:00
Thomas Rittson da7e692f3e Misc test tidy up 2022-06-29 13:42:15 +10:00
Thomas Rittson a9d7d4712e Refactor tests 2022-06-29 13:23:53 +10:00
Thomas Rittson 2115c5c76a Remove helper methods 2022-06-29 10:23:01 +10:00
Thomas Rittson d9f2dc2b90 Fix test 2022-06-28 12:18:06 +10:00
Thomas Rittson 83e0db5163 Resolve merge conflicts and fix cryptoKey handling 2022-06-28 11:59:37 +10:00
Thomas Rittson 2df751f607 Merge remote-tracking branch 'origin/master' into EC-281-web-workers-add-de-serialization-methods-to-view-objects 2022-06-28 11:48:00 +10:00
Thomas Rittson ee62be63f1 Fix mocks 2022-06-28 11:46:29 +10:00
Thomas Rittson 880d4ec15f CipherView tests 2022-06-28 11:36:45 +10:00
Thomas Rittson a85b6c2bb4 Add secureNoteView test and WIP cipherView 2022-06-28 11:04:23 +10:00
Thomas Rittson 3bdefcd0e8 Update test folder structure 2022-06-28 10:28:26 +10:00
Thomas Rittson 580ef99e47 Tests for all nested objects 2022-06-28 10:25:29 +10:00
Thomas Rittson 888a60edc2 First tests 2022-06-28 09:42:35 +10:00
Thomas Rittson 540bd5d5ca Remove unneeded toJSON methods, tidy up 2022-06-28 08:17:42 +10:00
Thomas Rittson be7ce7b04b Avoid nested toJSON calls 2022-06-28 07:50:26 +10:00
Matt Gibson 399b8c2b34
PS-813 Add memory storage to state service (#2892)
* Use abstract methods and generics in StorageService

* Prepend `Abstract` to abstract classes

* Create session browser storage service

* Use memory storage service for state memory

* Inject memory storage service

* Maintain filename extensions to help ide formatting

* Preserve state if it's still in memory

* Use jslib's memory storage service

* linter

* Create prototypes on stored objects

* standardize package scripts

* Add type safety to `withPrototype` decorators

* webpack notify manifest version

* Fix desktop

* linter

* Fix script

* Improve prototye application

* do not change prototype if it already matches desired
* fix error with object values prototype application

* Handle null state

* Apply prototypes to browser-specific state

* Add angular language server to recommended extensions

* Improve browser state service tests

* Start testing state Service

* Fix abstract returns

* Move test setup files to not be picked up by default glob matchers

* Add key generation service

* Add low-dependency encrypt service

* Back crypto service with encrypt service.

We'll want to work items that don't require state over to encrypt service

* Add new storage service and tests

* Properly init more stored values

* Fix reload issues when state service is recovering state from session storage

Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Justin Baur <admin@justinbaur.com>

* Simplify encrypt service

* Do not log mac failures for local-backed session storage

* `content` changed to `main` in #2245

* Fix CLI

* Remove loggin

* PR feedback

* Merge remote-tracking branch 'origin/master' into add-memory-storage-to-state-service

* Fix desktop

* Fix decrypt method signature

* Minify if not development

* Key is required

Co-authored-by: Thomas Avery <Thomas-Avery@users.noreply.github.com>
Co-authored-by: Justin Baur <admin@justinbaur.com>
2022-06-27 12:38:12 -05:00
Thomas Rittson 483673b03f Finish de/serialization methods initial implementation 2022-06-24 12:36:43 +10:00
Thomas Rittson 8ab017ed55 WIP making View objects serializable 2022-06-24 10:38:55 +10:00
Thomas Rittson 3d240c05ce Separate Utils helper methods 2022-06-24 10:11:59 +10:00
Thomas Rittson 4ecc522102 Rename method and fix types 2022-06-24 09:54:23 +10:00
Thomas Rittson 661edc85a9 Create and return target obj if none provided 2022-06-24 09:18:02 +10:00
Thomas Rittson 6de06aedd4 Add Utils.copyProperties and tests 2022-06-24 09:11:02 +10:00
Oscar Hinton 6e9b6f25a1
[PS-960] Fix form input group suffix not working (#2947)
* Fix form suffix not working without prefix

* Use tailwind first/last to avoid hacky components
2022-06-23 20:24:26 +02:00
Thomas Avery fcdf36a01c
[PS-766] Fix for CLI check full array of URIs in search (#2953)
* Check full array of URIs in search

* simplify search

* Swap to helper .hasUris
2022-06-23 09:31:24 -05:00
Addison Beck 57b8144013
[refactor] Introduce ThemingService (#2943)
* [refactor] Introduce ThemingService

* [refactor] Implement ThemingService for web

* [refactor] Implement ThemingService on browser

* [refactor] Implement ThemingService for desktop

* [refactor] Remove deprecated platformUtils.service theme methods

* [fix] Move ThemingService from libs/common to libs/angular

* [fix] Simplify ThemeBuilder's constructor

* [fix] Dont notify subscribers of null values from theme$

* [fix] Always notify PaymentComponent of theme changes
2022-06-23 07:36:05 -04:00
Andreas Coroiu fd69e163ff
[PS-683] Update negative copy (#2912)
* feat(browser): Update auto biometrics copy

* refactor(common): remove TotpService.isAutoCopyEnabled and use state directly

The TotpService was just taking the value from StateService and forwarding it, making it depend on state service.
All services that depended on the TotpService.isAutoCopyEnable flag also depended on StateService.
This therefore simplifies things by using StateService directly.

* feat(browser): update auto totp copy

* feat(browser): update add login notification copy

* feat(browser): update change password notification copy

* feat(browser): update context menu copy

* feat(browser): update show cards current tab copy

* feat(browser): update show identities current tab copy

* feat(browser): update enable favicon copy

* feat(browser): update badge counter copy

* feat(browser): update auto-fill copy

* feat(desktop): update auto biometrics prompt copy

* feat(desktop): update favicon copy

* feat(desktop): adjust copy

* feat(web): update favicons copy

* feat(web): adjust copy

* feat(web): update preference settings to sentence case

* feat(browser): update settings and options page to sentence case

* feat(desktop): update settings to sentence case

* feat(web): update copy

* feat(desktop): update copy
2022-06-23 09:53:42 +02:00
Chad Scharf b28c07790d
EC-263 - Deactivate/activate in user management (#2893)
* SM-48 - Disable/enable in user management

* SM-48 - Disabled badge added to edit user

* SM-48 - Fix linter issues

* SM-48 - Color adjustments to badging

* SM-48 - Fix prettier formatting

* EC-263 - Rename disable to deactivate

* EC-263 - lint errors and cleanup

* EC-263 - Fix build and importer errors

* EC-263 - import grouping order fix

* EC-263 - PR review feedback and cleanup

* EC-263 - Fix build error in loose components

* EC-263 - Fix build error on formPromise in user edit

* EC-263 - Fix a11y bindings and modal handling
2022-06-20 10:21:50 -04:00
Oscar Hinton 98152fee54
Add storybook to web (#2926) 2022-06-17 16:23:04 +02:00
Oscar Hinton 19caa7bfe0
Simplify our gitignore files (#2925) 2022-06-17 15:33:51 +02:00
Oscar Hinton 4106eead02
Migrate Chromatic (#2906) 2022-06-16 20:41:22 +02:00
Oscar Hinton bc639688e8
Use NPM workspace (#2874) 2022-06-14 17:10:53 +02:00
Matt Gibson c4ff8f99dc
Multi root workspace tweaks (#2858)
* Ignore jest for workspaces without tests (for now)

* Add jest as recommended extension

* Set eslint and prettier file paths

We can't do this on a multi-folder workspace level because the
path depths are not identical between folders

* fix tsconfig extends for

* Simplify bitwarden-licensed web tsconfig

This tsconfig isn't needed to build, since we do that through webpack
and the web client. It's only needed as hints to IDEs

* Remove unintended change

* linter
2022-06-13 21:39:36 -05:00
Thomas Rittson b92685dcd9
[EC-243] Grant premium status when member accepts org invite (#2870)
* Rename setCanAccessPremium to setHasPremiumPersonally

* Add hasPremiumFromOrganization

* Refactor stateService methods

* Add getHasPremiumPersonally, deprecate tokenService.getPremium
2022-06-14 12:13:41 +10:00
Federico Maccaroni c93c6a775d
[PS-589] Added Device Verification section setting for 2FA Email for new device (#2868)
* PS-589 Added Device Verification section for enable/disable the feature of 2FA email on new device login and the api calls for the new endpoint

* PS-589 prettier fix

* PS-589 Fix import typo because of caps

* PS-589 Improved button to use bitButton directive and loading to have the ngIf on the 2fa setup component
2022-06-13 14:13:22 -04:00
Andreas Coroiu 7922458fde
Sort organizations before returning all (#2877) 2022-06-09 16:43:35 +01:00
Matt Gibson d5112cc8cb
[PS-616] [PS-795] Fix/withdraw master password reset without user verification (#2845)
* Limit enroll MPR modal to enrolling

* Withdraw from MPR directly from org options

* [PS-795] Fix Automatic mpr enrollment.

Add reset password key to the accept request

* Linter

* Specify params type in accept components
2022-06-08 14:56:26 -05:00
Oscar Hinton 7dc3094b1a
Move storybook dependencies to root package (#2859) 2022-06-08 19:03:03 +02:00
Hinton 98cc4612fc Fix linting 2022-06-03 18:05:33 +02:00
Oscar Hinton 5780bf85e7
Add support for migrated jslib (#2826) 2022-06-03 18:01:07 +02:00
Hinton d7492e3cf3 Move to libs 2022-06-03 16:24:40 +02:00