Skip to content
This repository was archived by the owner on Jul 23, 2022. It is now read-only.

Conversation

@eliykat
Copy link
Member

@eliykat eliykat commented Mar 29, 2022

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Consequential changes from bitwarden/jslib#721. Depends on that being merged.

Code changes

  • use new authService.authStatus() method
  • add i18n on the account status
  • remove account.profile.active property which was unused
  • support for AuthenticationStatus enum being number instead of string values

Screenshots

Testing requirements

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

class="bwi bwi-lock bwi-2x text-muted"
class="bwi bwi-2x text-muted"
[ngClass]="
a.value.profile.authenticationStatus == authStatus.Unlocked ? 'bwi-unlock' : 'bwi-lock'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No real change here, I just find ngClass to be more succinct when swapping between icons.

<button
*ngFor="let a of accounts | keyvalue"
class="account"
[ngClass]="{ active: a.value.profile.authenticationStatus == 'active' }"
Copy link
Member Author

@eliykat eliykat Mar 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class will never be applied because the active account is excluded from the switcherAccount list. Also doesn't appear to have any scss styling associated with it.

Once we remove this, we don't need the authenticationStatus.active value at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, this was a design change and this never got removed.

@eliykat eliykat requested a review from a team March 29, 2022 04:05
@eliykat eliykat changed the title Fix user authentication state checks [PS-74] Fix user authentication state checks Mar 29, 2022
@eliykat eliykat marked this pull request as draft April 9, 2022 22:58
@eliykat eliykat marked this pull request as ready for review April 29, 2022 11:38
@eliykat eliykat merged commit ef60112 into master Apr 29, 2022
@eliykat eliykat deleted the fix/is-locked branch April 29, 2022 23:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants