1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

[SM-478] Resolve introduced eslint errors for button type (#4612)

This commit is contained in:
Oscar Hinton
2023-02-14 18:13:53 +01:00
committed by GitHub
parent bc60a34e50
commit 5dc1775cfc
16 changed files with 74 additions and 42 deletions

View File

@@ -1,8 +1,6 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<ng-container *ngIf="secrets$ | async as secrets; else spinner">
<div *ngIf="secrets.length > 0" class="float-right tw-mt-3 tw-items-center">
<button bitButton buttonType="secondary" (click)="openNewSecretDialog()">
<button type="button" bitButton buttonType="secondary" (click)="openNewSecretDialog()">
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "newSecret" | i18n }}
</button>

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div *ngIf="!projects" class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
</div>
@@ -7,7 +5,13 @@
<sm-no-items *ngIf="projects?.length == 0">
<ng-container slot="title">{{ "projectsNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "projectsNoItemsMessage" | i18n }}</ng-container>
<button slot="button" bitButton buttonType="secondary" (click)="newProjectEvent.emit()">
<button
type="button"
slot="button"
bitButton
buttonType="secondary"
(click)="newProjectEvent.emit()"
>
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "newProject" | i18n }}
</button>
@@ -31,6 +35,7 @@
<th bitCell bitSortable="revisionDate">{{ "lastEdited" | i18n }}</th>
<th bitCell class="tw-w-0">
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[bitMenuTriggerFor]="tableMenu"
@@ -58,6 +63,7 @@
<td bitCell>{{ project.revisionDate | date: "medium" }}</td>
<td bitCell>
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[bitMenuTriggerFor]="projectMenu"

View File

@@ -1,5 +1,4 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<!-- eslint-disable tailwindcss/no-custom-classname -->
<form [formGroup]="formGroup" [bitSubmit]="submit">
<bit-dialog dialogSize="default" disablePadding>
@@ -55,6 +54,7 @@
</td>
<td bitCell class="tw-w-0">
<button
type="button"
(click)="removeProjectAssociation(e.id)"
bitIconButton="bwi-close"
buttonType="main"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div *ngIf="!tokens" class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
</div>
@@ -7,7 +5,13 @@
<sm-no-items *ngIf="tokens?.length == 0">
<ng-container slot="title">{{ "accessTokensNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "accessTokensNoItemsDesc" | i18n }}</ng-container>
<button slot="button" bitButton buttonType="secondary" (click)="newAccessTokenEvent.emit()">
<button
type="button"
slot="button"
bitButton
buttonType="secondary"
(click)="newAccessTokenEvent.emit()"
>
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "createAccessToken" | i18n }}
</button>
@@ -33,6 +37,7 @@
<th bitCell>{{ "lastEdited" | i18n }}</th>
<th bitCell class="tw-w-0">
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"
@@ -58,6 +63,7 @@
<td bitCell>{{ token.revisionDate | date: "medium" }}</td>
<td bitCell>
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<bit-dialog dialogSize="default">
<ng-container bitDialogTitle>
<span>{{ "createAccessToken" | i18n }}</span>
@@ -24,7 +22,7 @@
</div>
<div bitDialogFooter class="tw-flex tw-gap-2">
<button bitButton buttonType="primary" (click)="copyAccessToken()">
<button type="button" bitButton buttonType="primary" (click)="copyAccessToken()">
<i class="bwi bwi-clone" aria-hidden="true"></i>
{{ "copyToken" | i18n }}
</button>

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<sm-header
*ngIf="serviceAccount$ | async as serviceAccount"
[title]="serviceAccount.name"
@@ -16,7 +14,13 @@
<bit-tab-link [route]="['people']">{{ "people" | i18n }}</bit-tab-link>
<bit-tab-link [route]="['access']">{{ "accessTokens" | i18n }}</bit-tab-link>
</bit-tab-nav-bar>
<button slot="secondary" bitButton buttonType="secondary" (click)="openNewAccessTokenDialog()">
<button
type="button"
slot="secondary"
bitButton
buttonType="secondary"
(click)="openNewAccessTokenDialog()"
>
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "createAccessToken" | i18n }}
</button>

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div *ngIf="!serviceAccounts" class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
</div>
@@ -7,7 +5,13 @@
<sm-no-items *ngIf="serviceAccounts?.length == 0">
<ng-container slot="title">{{ "serviceAccountsNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "serviceAccountsNoItemsMessage" | i18n }}</ng-container>
<button slot="button" bitButton buttonType="secondary" (click)="newServiceAccountEvent.emit()">
<button
slot="button"
type="button"
bitButton
buttonType="secondary"
(click)="newServiceAccountEvent.emit()"
>
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "newServiceAccount" | i18n }}
</button>
@@ -32,6 +36,7 @@
<th bitCell>{{ "lastEdited" | i18n }}</th>
<th bitCell class="tw-w-0">
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"
@@ -65,6 +70,7 @@
<td bitCell>{{ serviceAccount.revisionDate | date: "medium" }}</td>
<td bitCell>
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<header
*ngIf="routeData$ | async as routeData"
class="-tw-m-6 tw-mb-3 tw-flex tw-flex-col tw-p-6"
@@ -28,7 +26,11 @@
<ng-content></ng-content>
<product-switcher></product-switcher>
<ng-container *ngIf="account$ | async as account">
<button [bitMenuTriggerFor]="accountMenu" class="tw-border-0 tw-bg-transparent tw-p-0">
<button
type="button"
[bitMenuTriggerFor]="accountMenu"
class="tw-border-0 tw-bg-transparent tw-p-0"
>
<bit-avatar [id]="account.userId" [text]="account.name || account.email"></bit-avatar>
</button>

View File

@@ -1,6 +1,10 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<button bitButton class="tw-min-w-max" buttonType="primary" [bitMenuTriggerFor]="newMenu">
<button
type="button"
bitButton
class="tw-min-w-max"
buttonType="primary"
[bitMenuTriggerFor]="newMenu"
>
{{ "new" | i18n }} <i class="bwi bwi-angle-down" aria-hidden="true"></i>
</button>

View File

@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable @angular-eslint/template/button-has-type -->
<div *ngIf="!secrets" class="tw-items-center tw-justify-center tw-pt-64 tw-text-center">
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
</div>
@@ -7,7 +5,13 @@
<sm-no-items *ngIf="secrets?.length == 0">
<ng-container slot="title">{{ "secretsNoItemsTitle" | i18n }}</ng-container>
<ng-container slot="description">{{ "secretsNoItemsMessage" | i18n }}</ng-container>
<button slot="button" bitButton buttonType="secondary" (click)="newSecretEvent.emit()">
<button
type="button"
slot="button"
bitButton
buttonType="secondary"
(click)="newSecretEvent.emit()"
>
<i class="bwi bwi-plus" aria-hidden="true"></i>
{{ "newSecret" | i18n }}
</button>
@@ -32,6 +36,7 @@
<th bitCell>{{ "lastEdited" | i18n }}</th>
<th bitCell class="tw-w-0">
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"
@@ -67,6 +72,7 @@
<td bitCell>{{ secret.revisionDate | date: "medium" }}</td>
<td bitCell>
<button
type="button"
bitIconButton="bwi-ellipsis-v"
buttonType="main"
[title]="'options' | i18n"