add appApiAction to username generation (#2549)

This commit is contained in:
Kyle Spearrin 2022-05-06 09:07:30 -04:00 committed by GitHub
parent c7cd864524
commit 5e731fb328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,7 @@
</div>
<div class="generated-block" *ngIf="type === 'username'">
<div class="generated-wrapper" [innerHTML]="username | colorPassword" appSelectCopy></div>
<div class="action-buttons">
<div class="action-buttons" #form [appApiAction]="usernameGeneratingPromise">
<button
type="button"
class="row-btn"
@ -59,8 +59,13 @@
appBlurClick
appA11yTitle="{{ 'regenerateUsername' | i18n }}"
(click)="regenerate()"
[disabled]="form.loading"
>
<i class="bwi bwi-lg bwi-generate" aria-hidden="true"></i>
<i
class="bwi bwi-lg bwi-generate"
[ngClass]="form.loading ? 'bwi-spin' : ''"
aria-hidden="true"
></i>
</button>
</div>
</div>