mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-27 11:06:50 +03:00
Firefox login (#2013)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
e47d03d87a
commit
6137f0df2e
@ -41,9 +41,11 @@
|
|||||||
export let status: Status
|
export let status: Status
|
||||||
export let fields: Field[]
|
export let fields: Field[]
|
||||||
export let action: Action
|
export let action: Action
|
||||||
export let bottomCaption: IntlString
|
export let secondaryButtonLabel: IntlString | undefined = undefined
|
||||||
export let bottomActionLabel: IntlString
|
export let secondaryButtonAction: (() => void) | undefined = undefined
|
||||||
export let bottomActionFunc: () => void
|
export let bottomCaption: IntlString | undefined = undefined
|
||||||
|
export let bottomActionLabel: IntlString | undefined = undefined
|
||||||
|
export let bottomActionFunc: (() => void) | undefined = undefined
|
||||||
export let object: any
|
export let object: any
|
||||||
|
|
||||||
async function validate () {
|
async function validate () {
|
||||||
@ -125,17 +127,36 @@
|
|||||||
width="100%"
|
width="100%"
|
||||||
loading={inAction}
|
loading={inAction}
|
||||||
disabled={status.severity !== Severity.OK && status.severity !== Severity.ERROR}
|
disabled={status.severity !== Severity.OK && status.severity !== Severity.ERROR}
|
||||||
on:click={() => {
|
on:click={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
performAction(action)
|
performAction(action)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{#if secondaryButtonLabel && secondaryButtonAction}
|
||||||
|
<div class="form-row">
|
||||||
|
<Button
|
||||||
|
label={secondaryButtonLabel}
|
||||||
|
width="100%"
|
||||||
|
on:click={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
secondaryButtonAction?.()
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="grow-separator" />
|
{#if bottomCaption || (bottomActionLabel && bottomActionFunc)}
|
||||||
<div class="footer">
|
<div class="grow-separator" />
|
||||||
<span><Label label={bottomCaption} /></span>
|
<div class="footer">
|
||||||
<a href="." on:click|preventDefault={bottomActionFunc}><Label label={bottomActionLabel} /></a>
|
{#if bottomCaption}
|
||||||
</div>
|
<span><Label label={bottomCaption} /></span>
|
||||||
|
{/if}
|
||||||
|
{#if bottomActionLabel && bottomActionFunc}
|
||||||
|
<a href="." on:click|preventDefault={bottomActionFunc}><Label label={bottomActionLabel} /></a>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
import workbench from '@anticrm/workbench'
|
import workbench from '@anticrm/workbench'
|
||||||
|
|
||||||
const location = getCurrentLocation()
|
const location = getCurrentLocation()
|
||||||
|
|
||||||
let page = 'login'
|
let page = 'login'
|
||||||
|
|
||||||
$: fields =
|
$: fields =
|
||||||
@ -83,8 +82,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: bottomCaption = page === 'login' ? login.string.DoNotHaveAnAccount : login.string.DoNotHaveAnAccount
|
$: bottomCaption = page === 'login' ? login.string.DoNotHaveAnAccount : login.string.HaveAccount
|
||||||
$: bottomActionLabel = page === 'login' ? login.string.SignUp : login.string.LogIn
|
$: bottomActionLabel = page === 'login' ? login.string.SignUp : login.string.LogIn
|
||||||
|
$: secondaryButtonLabel = page === 'login' ? login.string.SignUp : undefined
|
||||||
|
$: secondaryButtonAction = () => {
|
||||||
|
page = 'signUp'
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Form
|
<Form
|
||||||
@ -93,6 +96,8 @@
|
|||||||
{fields}
|
{fields}
|
||||||
{object}
|
{object}
|
||||||
{action}
|
{action}
|
||||||
|
{secondaryButtonLabel}
|
||||||
|
{secondaryButtonAction}
|
||||||
{bottomCaption}
|
{bottomCaption}
|
||||||
{bottomActionLabel}
|
{bottomActionLabel}
|
||||||
bottomActionFunc={() => {
|
bottomActionFunc={() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user