From 6137f0df2ec9fcbda8847622b1a14e65da029f13 Mon Sep 17 00:00:00 2001 From: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> Date: Mon, 6 Jun 2022 19:45:21 +0600 Subject: [PATCH] Firefox login (#2013) Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com> --- .../src/components/Form.svelte | 39 ++++++++++++++----- .../src/components/Join.svelte | 9 ++++- 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/plugins/login-resources/src/components/Form.svelte b/plugins/login-resources/src/components/Form.svelte index bbb45953f6..73fc1d81b4 100644 --- a/plugins/login-resources/src/components/Form.svelte +++ b/plugins/login-resources/src/components/Form.svelte @@ -41,9 +41,11 @@ export let status: Status export let fields: Field[] export let action: Action - export let bottomCaption: IntlString - export let bottomActionLabel: IntlString - export let bottomActionFunc: () => void + export let secondaryButtonLabel: IntlString | undefined = undefined + export let secondaryButtonAction: (() => void) | undefined = undefined + export let bottomCaption: IntlString | undefined = undefined + export let bottomActionLabel: IntlString | undefined = undefined + export let bottomActionFunc: (() => void) | undefined = undefined export let object: any async function validate () { @@ -125,17 +127,36 @@ width="100%" loading={inAction} disabled={status.severity !== Severity.OK && status.severity !== Severity.ERROR} - on:click={() => { + on:click={(e) => { + e.preventDefault() performAction(action) }} /> + {#if secondaryButtonLabel && secondaryButtonAction} +