mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
[SM-1090] Fix org switcher alphabetization (#7831)
* Remove sorting of disabled orgs to the bottom * Fix color contrast of disabled label and add a11y attributes
This commit is contained in:
parent
cc37ccbea5
commit
660017a25f
@ -10,7 +10,9 @@
|
|||||||
<i
|
<i
|
||||||
slot="end"
|
slot="end"
|
||||||
*ngIf="!activeOrganization.enabled"
|
*ngIf="!activeOrganization.enabled"
|
||||||
class="bwi bwi-exclamation-triangle tw-my-auto !tw-text-danger"
|
class="bwi bwi-exclamation-triangle tw-my-auto !text-alt-2"
|
||||||
|
[attr.aria-label]="'organizationIsDisabled' | i18n"
|
||||||
|
appA11yTitle="{{ 'organizationIsDisabled' | i18n }}"
|
||||||
></i>
|
></i>
|
||||||
<ng-container *ngIf="organizations$ | async as organizations">
|
<ng-container *ngIf="organizations$ | async as organizations">
|
||||||
<bit-nav-item
|
<bit-nav-item
|
||||||
@ -24,7 +26,9 @@
|
|||||||
<i
|
<i
|
||||||
slot="end"
|
slot="end"
|
||||||
*ngIf="org.enabled == false"
|
*ngIf="org.enabled == false"
|
||||||
class="bwi bwi-exclamation-triangle !tw-text-danger"
|
class="bwi bwi-exclamation-triangle !text-alt-2"
|
||||||
|
[attr.aria-label]="'organizationIsDisabled' | i18n"
|
||||||
|
appA11yTitle="{{ 'organizationIsDisabled' | i18n }}"
|
||||||
></i>
|
></i>
|
||||||
</bit-nav-item>
|
</bit-nav-item>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -13,10 +13,7 @@ export class OrgSwitcherComponent {
|
|||||||
protected organizations$: Observable<Organization[]> =
|
protected organizations$: Observable<Organization[]> =
|
||||||
this.organizationService.organizations$.pipe(
|
this.organizationService.organizations$.pipe(
|
||||||
map((orgs) =>
|
map((orgs) =>
|
||||||
orgs
|
orgs.filter((org) => this.filter(org)).sort((a, b) => a.name.localeCompare(b.name)),
|
||||||
.filter((org) => this.filter(org))
|
|
||||||
.sort((a, b) => a.name.localeCompare(b.name))
|
|
||||||
.sort((a, b) => (a.enabled ? -1 : 1)),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user