1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

[PM-1399] Resolve eslint errors for button type - vault (#5274)

* Added button type to each button element related to the vault team

* Removed disable statement comment

* [PM-1399] Resolve eslint errors for button type - admin-console  (#5275)

* Added button type to each button element related to the admin console team

* Added button type to each button element related to the billing team

* Removed disable statement comment

* [PM-1399] Resolve eslint errors for button type - tools (#5284)

* Added button type to each button element related to the tools team

* Added button type to each button element related to the tools team

* Added button type to each button element related to the auth team (#5295)
This commit is contained in:
SmithThe4th
2023-05-03 10:55:22 -04:00
committed by GitHub
parent 2c51af192c
commit f655460fa7
36 changed files with 145 additions and 107 deletions

View File

@@ -1,9 +1,8 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngIf="show">
<div class="filter-heading">
<h2>
<button
type="button"
class="no-btn"
[attr.aria-expanded]="!isCollapsed(collectionsGrouping)"
aria-controls="collection-filters"
@@ -30,6 +29,7 @@
>
<span class="filter-buttons">
<button
type="button"
*ngIf="c.children.length"
class="toggle-button"
[attr.aria-expanded]="!isCollapsed(c.node)"
@@ -47,6 +47,7 @@
></i>
</button>
<button
type="button"
class="filter-button"
(click)="applyFilter(c.node)"
[attr.aria-pressed]="c.node.id === activeFilter.selectedCollectionId"

View File

@@ -1,10 +1,9 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngIf="show">
<ng-container [ngSwitch]="displayMode">
<ng-container *ngSwitchCase="'personalOwnershipPolicy'">
<div class="filter-heading" [ngClass]="{ active: !hasActiveFilter }">
<button
type="button"
class="toggle-button"
appA11yTitle="{{ 'toggleCollapse' | i18n }} {{ organizationGrouping.name | i18n }}"
(click)="toggleCollapse()"
@@ -23,6 +22,7 @@
&nbsp;
<h2>
<button
type="button"
class="filter-button"
(click)="clearFilter()"
[attr.aria-pressed]="!hasActiveFilter"
@@ -40,6 +40,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyOrganizationFilter(organization)"
[attr.aria-pressed]="activeFilter.myVaultOnly"
@@ -62,6 +63,7 @@
<ng-container *ngSwitchDefault>
<div class="filter-heading" [ngClass]="{ active: !hasActiveFilter }">
<button
type="button"
appA11yTitle="{{ 'toggleCollapse' | i18n }} {{ organizationGrouping.name | i18n }}"
(click)="toggleCollapse()"
[attr.aria-expanded]="!isCollapsed"
@@ -79,6 +81,7 @@
&nbsp;
<h2>
<button
type="button"
class="filter-button"
(click)="clearFilter()"
[attr.aria-pressed]="!hasActiveFilter"
@@ -92,6 +95,7 @@
<li class="filter-option" [ngClass]="{ active: activeFilter.myVaultOnly }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyMyVaultFilter()"
[attr.aria-pressed]="activeFilter.myVaultOnly"
@@ -109,6 +113,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyOrganizationFilter(organization)"
appA11yTitle="{{ 'vault' | i18n }}: {{ organization.name }} {{

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div id="sends" class="vault">
<div class="left-nav">
<div class="vault-filters">
@@ -9,6 +7,7 @@
<li class="filter-option" [ngClass]="{ active: selectedAll }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="selectAll()"
[attr.aria-pressed]="selectedAll === true"
@@ -29,6 +28,7 @@
<li class="filter-option" [ngClass]="{ active: selectedType === sendType.Text }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="selectType(sendType.Text)"
[attr.aria-pressed]="selectedType === sendType.Text"
@@ -42,6 +42,7 @@
<li class="filter-option" [ngClass]="{ active: selectedType === sendType.File }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="selectType(sendType.File)"
[attr.aria-pressed]="selectedType === sendType.File"
@@ -61,6 +62,7 @@
<div class="content">
<div class="list full-height" *ngIf="filteredSends.length">
<button
type="button"
*ngFor="let s of filteredSends"
appStopClick
(click)="selectSend(s.id)"

View File

@@ -1,9 +1,8 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngIf="!hide">
<div class="filter-heading">
<h2>
<button
type="button"
class="toggle-button"
[attr.aria-expanded]="!isCollapsed(foldersGrouping)"
aria-controls="folder-filters"
@@ -20,7 +19,12 @@
&nbsp;{{ foldersGrouping.name | i18n }}
</button>
</h2>
<button class="add-button" (click)="addFolder()" appA11yTitle="{{ 'addFolder' | i18n }}">
<button
type="button"
class="add-button"
(click)="addFolder()"
appA11yTitle="{{ 'addFolder' | i18n }}"
>
<i class="bwi bwi-plus bwi-fw" aria-hidden="true"></i>
</button>
</div>
@@ -35,6 +39,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="toggle-button"
*ngIf="f.children.length"
(click)="toggleCollapse(f.node)"
@@ -52,6 +57,7 @@
></i>
</button>
<button
type="button"
class="filter-button"
(click)="applyFilter(f.node)"
[attr.aria-pressed]="
@@ -62,6 +68,7 @@
&nbsp;{{ f.node.name }}
</button>
<button
type="button"
class="edit-button"
*ngIf="f.node.id"
(click)="editFolder(f.node)"

View File

@@ -1,11 +1,10 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngIf="show">
<h2 class="sr-only">{{ "filters" | i18n }}</h2>
<ul class="filter-options">
<li class="filter-option" [ngClass]="{ active: activeFilter.status === 'all' }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter('all')"
[attr.aria-pressed]="activeFilter.status === 'all'"
@@ -21,6 +20,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter('favorites')"
[attr.aria-pressed]="activeFilter.status === 'favorites'"
@@ -36,6 +36,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter('trash')"
[attr.aria-pressed]="activeFilter.status === 'trash'"

View File

@@ -1,8 +1,7 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div class="filter-heading">
<h2>
<button
type="button"
class="no-btn"
(click)="toggleCollapse()"
[attr.aria-expanded]="!isCollapsed"
@@ -27,6 +26,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter(cipherTypeEnum.Login)"
[attr.aria-pressed]="activeFilter.cipherType === cipherTypeEnum.Login"
@@ -38,6 +38,7 @@
<li class="filter-option" [ngClass]="{ active: activeFilter.cipherType === cipherTypeEnum.Card }">
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter(cipherTypeEnum.Card)"
[attr.aria-pressed]="activeFilter.cipherType === cipherTypeEnum.Card"
@@ -52,6 +53,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter(cipherTypeEnum.Identity)"
[attr.aria-pressed]="activeFilter.cipherType === cipherTypeEnum.Identity"
@@ -66,6 +68,7 @@
>
<span class="filter-buttons">
<button
type="button"
class="filter-button"
(click)="applyFilter(cipherTypeEnum.SecureNote)"
[attr.aria-pressed]="activeFilter.cipherType === cipherTypeEnum.SecureNote"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div class="container loading-spinner" *ngIf="!loaded">
<i class="bwi bwi-spinner bwi-spin bwi-3x" aria-hidden="true"></i>
</div>
@@ -54,10 +52,13 @@
<div class="no-items" *ngIf="!ciphers.length">
<img class="no-items-image" aria-hidden="true" />
<p>{{ "noItemsInList" | i18n }}</p>
<button (click)="addCipher()" class="btn block primary link">{{ "addItem" | i18n }}</button>
<button type="button" (click)="addCipher()" class="btn block primary link">
{{ "addItem" | i18n }}
</button>
</div>
<div class="footer">
<button
type="button"
(click)="addCipher()"
(contextmenu)="addCipherOptions()"
class="block primary"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div class="content">
<div class="inner-content" *ngIf="cipher">
<div class="box">
@@ -532,6 +530,7 @@
</div>
<div class="footer" *ngIf="cipher">
<button
type="button"
class="primary"
(click)="edit()"
appA11yTitle="{{ 'edit' | i18n }}"
@@ -540,6 +539,7 @@
<i class="bwi bwi-pencil bwi-fw bwi-lg" aria-hidden="true"></i>
</button>
<button
type="button"
class="primary"
(click)="restore()"
appA11yTitle="{{ 'restore' | i18n }}"
@@ -548,6 +548,7 @@
<i class="bwi bwi-undo bwi-fw bwi-lg" aria-hidden="true"></i>
</button>
<button
type="button"
class="primary"
*ngIf="!cipher?.organizationId && !cipher.isDeleted"
(click)="clone()"