1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[EC-694] Verify Email - Replace Bootstrap with Tailwind (#4211)

* [EC-694] Replace Boostrap with Tailwind

* [EC-694] Simplify tailwind classes

* [EC-694] Update bitAction handler method to remove Promise wrapper

* [EC-694] Coerce bitButton block boolean

* [EC-694] Remove unnecessary try/catch and logging

* [EC-694] Coersce block boolean

* [EC-694] Update boolean coercion

* [EC-694] Apply default value for block boolean and simplify attr class conditional

* [EC-694] Fix block class application / test
This commit is contained in:
Vincent Salucci
2023-01-10 08:59:13 -06:00
committed by GitHub
parent f4219bada9
commit 4eab97272f
3 changed files with 21 additions and 32 deletions

View File

@@ -1,21 +1,11 @@
<div class="card border-warning">
<div class="card-header bg-warning text-white">
<div class="tw-rounded tw-border tw-border-solid tw-border-warning-500 tw-bg-background">
<div class="tw-bg-warning-500 tw-px-5 tw-py-2.5 tw-font-bold tw-uppercase tw-text-contrast">
<i class="bwi bwi-envelope bwi-fw" aria-hidden="true"></i> {{ "verifyEmail" | i18n }}
</div>
<div class="card-body">
<div class="tw-p-5">
<p>{{ "verifyEmailDesc" | i18n }}</p>
<button
type="button"
class="btn btn-block btn-outline-secondary btn-submit"
#sendBtn
[appApiAction]="actionPromise"
[disabled]="$any(sendBtn).loading"
(click)="send()"
>
<i class="bwi bwi-spin bwi-spinner" title="{{ 'loading' | i18n }}" aria-hidden="true"></i>
<span>
{{ "sendEmail" | i18n }}
</span>
<button id="sendBtn" bitButton type="button" block [bitAction]="send">
{{ "sendEmail" | i18n }}
</button>
</div>
</div>

View File

@@ -39,17 +39,7 @@ export class VerifyEmailComponent {
);
}
async send() {
if (this.actionPromise != null) {
return;
}
try {
this.actionPromise = this.verifyEmail();
await this.actionPromise;
} catch (e) {
this.logService.error(e);
}
this.actionPromise = null;
}
send = async () => {
await this.verifyEmail();
};
}