mirror of
https://github.com/bitwarden/desktop.git
synced 2024-06-26 10:36:19 +02:00
* Change links to buttons, expose `aria-pressed` for toggles - also make existing `<a routerLink...>` type controls keyboard focusable with the addition of `tabindex="0"` * Correctly set aria-pressed now that I have a working build environment, could verify correct way to set this with my limited Angular knowledge * Change more links to buttons, initial style changes * Fix layout of <button> elements with .box-content-row * Update jslib submodule * Add `aria-expanded` to the send view's "Show options" expand/collapse control * Fix position of "Edit" pencil when hovering over folders * Update jslib * Change sends list links to buttons * Add `aria-pressed` to vault and send list buttons Programmatically denote which of the buttons is currently active/shown in the right-most panel * Fix incorrect "Options" expand/collapse button in add-edit view Currently, that buttons lacks an accName because the "Options" text is outside of it. * Add `aria-pressed` to the send left-hand column filters * Simplify base, list, and vault styles Since links are now buttons, no need to double up selectors for both types of elements. No need to double-up theming in base, as this also causes incorrect "x" in toasts. * Remove unnecessary `position:relative` Fixes issue with cut-off focus outlines, has no other adverse effect * Fix styling for last child of action buttons Old approach of making right padding smaller results in unsightly, off-center icon (noticeable when focus outline is visible). This visually remains the same, but reduces right-hand margin instead.
67 lines
2.2 KiB
HTML
67 lines
2.2 KiB
HTML
<div class="content">
|
|
<cdk-virtual-scroll-viewport
|
|
itemSize="42"
|
|
minBufferPx="400"
|
|
maxBufferPx="600"
|
|
*ngIf="ciphers.length"
|
|
>
|
|
<div class="list">
|
|
<button
|
|
type="button"
|
|
*cdkVirtualFor="let c of ciphers; trackBy: trackByFn"
|
|
appStopClick
|
|
(click)="selectCipher(c)"
|
|
(contextmenu)="rightClickCipher(c)"
|
|
title="{{ 'viewItem' | i18n }}"
|
|
[ngClass]="{ active: c.id === activeCipherId }"
|
|
[attr.aria-pressed]="c.id === activeCipherId"
|
|
class="flex-list-item virtual-scroll-item"
|
|
>
|
|
<app-vault-icon [cipher]="c"></app-vault-icon>
|
|
<div class="flex-cipher-list-item">
|
|
<span class="text">
|
|
{{ c.name }}
|
|
<ng-container *ngIf="c.organizationId">
|
|
<i
|
|
class="bwi bwi-collection text-muted"
|
|
title="{{ 'shared' | i18n }}"
|
|
aria-hidden="true"
|
|
></i>
|
|
<span class="sr-only">{{ "shared" | i18n }}</span>
|
|
</ng-container>
|
|
<ng-container *ngIf="c.hasAttachments">
|
|
<i
|
|
class="bwi bwi-paperclip text-muted"
|
|
title="{{ 'attachments' | i18n }}"
|
|
aria-hidden="true"
|
|
></i>
|
|
<span class="sr-only">{{ "attachments" | i18n }}</span>
|
|
</ng-container>
|
|
</span>
|
|
<span *ngIf="c.subTitle" class="detail">{{ c.subTitle }}</span>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
</cdk-virtual-scroll-viewport>
|
|
<div class="no-items" *ngIf="!ciphers.length">
|
|
<i class="bwi bwi-spinner bwi-spin bwi-3x" *ngIf="!loaded" aria-hidden="true"></i>
|
|
<ng-container *ngIf="loaded">
|
|
<img class="no-items-image" aria-hidden="true" />
|
|
<p>{{ "noItemsInList" | i18n }}</p>
|
|
<button (click)="addCipher()" class="btn block primary link">{{ "addItem" | i18n }}</button>
|
|
</ng-container>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<button
|
|
appBlurClick
|
|
(click)="addCipher()"
|
|
(contextmenu)="addCipherOptions()"
|
|
class="block primary"
|
|
appA11yTitle="{{ 'addItem' | i18n }}"
|
|
[disabled]="deleted"
|
|
>
|
|
<i class="bwi bwi-plus bwi-lg" aria-hidden="true"></i>
|
|
</button>
|
|
</div>
|