Fix small browser filter bugs (#2684)

This commit is contained in:
Robyn MacCallum 2022-05-13 13:55:11 -04:00 committed by GitHub
parent d8dbb15d24
commit b11e13007c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 13 deletions

View File

@ -52,6 +52,9 @@
"tab": { "tab": {
"message": "Tab" "message": "Tab"
}, },
"vault": {
"message": "Vault"
},
"myVault": { "myVault": {
"message": "My Vault" "message": "My Vault"
}, },

View File

@ -438,6 +438,10 @@ main {
.no-items, .no-items,
.full-loading-spinner { .full-loading-spinner {
text-align: center; text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.no-items-image { .no-items-image {
@include themify($themes) { @include themify($themes) {

View File

@ -17,7 +17,7 @@
appA11yTitle="{{ 'myVault' | i18n }}" appA11yTitle="{{ 'myVault' | i18n }}"
[attr.aria-pressed]="rlaMyVault.isActive" [attr.aria-pressed]="rlaMyVault.isActive"
> >
<i class="bwi bwi-lock-f bwi-2x" aria-hidden="true"></i>{{ "myVault" | i18n }} <i class="bwi bwi-lock-f bwi-2x" aria-hidden="true"></i>{{ "vault" | i18n }}
</button> </button>
</li> </li>
<li routerLinkActive="active" #rlaSend="routerLinkActive"> <li routerLinkActive="active" #rlaSend="routerLinkActive">

View File

@ -78,7 +78,12 @@
</div> </div>
</ng-container> </ng-container>
<ng-container *ngIf="ciphers"> <ng-container *ngIf="ciphers">
<div class="no-items" *ngIf="!ciphers.length"> <div *ngIf="!ciphers.length">
<app-vault-select
*ngIf="showVaultFilter && !showGroupings()"
(onVaultSelectionChanged)="changeVaultSelection()"
></app-vault-select>
<div class="no-items">
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded" aria-hidden="true"></i> <i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded" aria-hidden="true"></i>
<ng-container *ngIf="loaded"> <ng-container *ngIf="loaded">
<p>{{ "noItemsInList" | i18n }}</p> <p>{{ "noItemsInList" | i18n }}</p>
@ -87,6 +92,7 @@
</button> </button>
</ng-container> </ng-container>
</div> </div>
</div>
<cdk-virtual-scroll-viewport <cdk-virtual-scroll-viewport
itemSize="46" itemSize="46"
minBufferPx="400" minBufferPx="400"

View File

@ -23,6 +23,7 @@
</div> </div>
</header> </header>
<main tabindex="-1"> <main tabindex="-1">
<app-vault-select (onVaultSelectionChanged)="vaultFilterChanged()"></app-vault-select>
<div class="no-items" *ngIf="(!ciphers || !ciphers.length) && !showSearching()"> <div class="no-items" *ngIf="(!ciphers || !ciphers.length) && !showSearching()">
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded"></i> <i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded"></i>
<ng-container *ngIf="loaded"> <ng-container *ngIf="loaded">
@ -33,7 +34,6 @@
</button> </button>
</ng-container> </ng-container>
</div> </div>
<app-vault-select (onVaultSelectionChanged)="vaultFilterChanged()"></app-vault-select>
<ng-container *ngIf="ciphers && ciphers.length && !showSearching()"> <ng-container *ngIf="ciphers && ciphers.length && !showSearching()">
<div class="box list" *ngIf="favoriteCiphers"> <div class="box list" *ngIf="favoriteCiphers">
<h2 class="box-header"> <h2 class="box-header">

View File

@ -7,8 +7,9 @@
aria-haspopup="menu" aria-haspopup="menu"
aria-controls="cdk-overlay-container" aria-controls="cdk-overlay-container"
[attr.aria-expanded]="isOpen" [attr.aria-expanded]="isOpen"
[attr.aria-label]="vaultFilterDisplay"
> >
<span>{{ vaultFilterDisplay }}&nbsp;</span> {{ vaultFilterDisplay | ellipsis: 45 }}&nbsp;
<i <i
class="bwi bwi-sm" class="bwi bwi-sm"
aria-hidden="true" aria-hidden="true"
@ -67,7 +68,7 @@
class="bwi bwi-fw bwi-family" class="bwi bwi-fw bwi-family"
aria-hidden="true" aria-hidden="true"
></i> ></i>
<span>&nbsp;{{ organization.name | ellipsis: 23:true }}</span> <span>&nbsp;{{ organization.name | ellipsis: 21:true }}</span>
</button> </button>
</div> </div>
</ng-template> </ng-template>

View File

@ -82,7 +82,9 @@ export class VaultSelectComponent implements OnInit {
async load() { async load() {
this.vaultFilter = this.vaultFilterService.getVaultFilter(); this.vaultFilter = this.vaultFilterService.getVaultFilter();
this.organizations = await this.vaultFilterService.buildOrganizations(); this.organizations = (await this.vaultFilterService.buildOrganizations()).sort((a, b) =>
a.name.localeCompare(b.name)
);
this.enforcePersonalOwnwership = this.enforcePersonalOwnwership =
await this.vaultFilterService.checkForPersonalOwnershipPolicy(); await this.vaultFilterService.checkForPersonalOwnershipPolicy();