diff --git a/apps/web/src/app/settings/verify-email.component.html b/apps/web/src/app/settings/verify-email.component.html index d1ec7aed2f1..6fd2128651b 100644 --- a/apps/web/src/app/settings/verify-email.component.html +++ b/apps/web/src/app/settings/verify-email.component.html @@ -1,21 +1,11 @@ -
-
+
+
{{ "verifyEmail" | i18n }}
-
+

{{ "verifyEmailDesc" | i18n }}

-
diff --git a/apps/web/src/app/settings/verify-email.component.ts b/apps/web/src/app/settings/verify-email.component.ts index c49b377968b..9580a71e22a 100644 --- a/apps/web/src/app/settings/verify-email.component.ts +++ b/apps/web/src/app/settings/verify-email.component.ts @@ -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(); + }; } diff --git a/libs/components/src/button/button.component.ts b/libs/components/src/button/button.component.ts index 0f3589ebf74..aa26143dc07 100644 --- a/libs/components/src/button/button.component.ts +++ b/libs/components/src/button/button.component.ts @@ -1,3 +1,4 @@ +import { coerceBooleanProperty } from "@angular/cdk/coercion"; import { Input, HostBinding, Component } from "@angular/core"; import { ButtonLikeAbstraction, ButtonType } from "../shared/button-like.abstraction"; @@ -68,9 +69,7 @@ export class ButtonComponent implements ButtonLikeAbstraction { "hover:tw-no-underline", "focus:tw-outline-none", ] - .concat( - this.block == null || this.block === false ? ["tw-inline-block"] : ["tw-w-full", "tw-block"] - ) + .concat(this.block ? ["tw-w-full", "tw-block"] : ["tw-inline-block"]) .concat(buttonStyles[this.buttonType ?? "secondary"]); } @@ -81,7 +80,17 @@ export class ButtonComponent implements ButtonLikeAbstraction { } @Input() buttonType: ButtonType; - @Input() block?: boolean; + + private _block = false; + + @Input() + get block(): boolean { + return this._block; + } + + set block(value: boolean | "") { + this._block = coerceBooleanProperty(value); + } @Input() loading = false;