forked from coracle/flotilla
Add new claymorphic component library
This commit is contained in:
@@ -4,21 +4,22 @@
|
||||
import {decrypt} from "nostr-tools/nip49"
|
||||
import {preventDefault} from "@lib/html"
|
||||
import {nsecDecode} from "@lib/util"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import Link from "@lib/components/Link.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import FieldInline from "@lib/components/FieldInline.svelte"
|
||||
import Spinner from "@lib/components2/Spinner.svelte"
|
||||
import Link from "@lib/components2/Link.svelte"
|
||||
import Button from "@lib/components2/Button.svelte"
|
||||
import FieldInline from "@lib/components2/FieldInline.svelte"
|
||||
import Alert from "@lib/components2/Alert.svelte"
|
||||
import Key from "@assets/icons/key.svg?dataurl"
|
||||
import Danger from "@assets/icons/danger-triangle.svg?dataurl"
|
||||
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
||||
import AltArrowRight from "@assets/icons/alt-arrow-right.svg?dataurl"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Modal from "@lib/components/Modal.svelte"
|
||||
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
||||
import Icon from "@lib/components2/Icon.svelte"
|
||||
import Modal from "@lib/components2/Modal.svelte"
|
||||
import ModalBody from "@lib/components2/ModalBody.svelte"
|
||||
import ModalHeader from "@lib/components2/ModalHeader.svelte"
|
||||
import ModalTitle from "@lib/components2/ModalTitle.svelte"
|
||||
import ModalSubtitle from "@lib/components2/ModalSubtitle.svelte"
|
||||
import ModalFooter from "@lib/components2/ModalFooter.svelte"
|
||||
import {clearModals} from "@app/modal"
|
||||
import {setChecked} from "@app/notifications"
|
||||
import {pushToast} from "@app/toast"
|
||||
@@ -85,7 +86,7 @@
|
||||
<p>Your Key*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<label class="input-cl input-cl-group w-full">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={keyInput} placeholder="nsec1..." />
|
||||
</label>
|
||||
@@ -97,31 +98,31 @@
|
||||
<p>Password*</p>
|
||||
{/snippet}
|
||||
{#snippet input()}
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<label class="input-cl input-cl-group w-full">
|
||||
<Icon icon={Key} />
|
||||
<input type="password" bind:value={password} placeholder="Your password" />
|
||||
</label>
|
||||
{/snippet}
|
||||
</FieldInline>
|
||||
{/if}
|
||||
<div class="card2 card2-sm bg-alt flex flex-col gap-2 text-sm">
|
||||
<Alert variant="warning" class="flex-col text-sm">
|
||||
<strong class="flex items-center gap-2">
|
||||
<Icon icon={Danger} />
|
||||
Please note!
|
||||
</strong>
|
||||
<p>
|
||||
Logging in this way is not a best practice. For better security, please consider using a
|
||||
<Link external href="https://nostrapps.com#signers" class="link">signer app</Link>
|
||||
<Link external styled href="https://nostrapps.com#signers">signer app</Link>
|
||||
to keep your keys safe.
|
||||
</p>
|
||||
</div>
|
||||
</Alert>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button class="btn btn-link" onclick={back} disabled={loading}>
|
||||
<Button variant="ghost" onclick={back} disabled={loading}>
|
||||
<Icon icon={AltArrowLeft} />
|
||||
Go back
|
||||
</Button>
|
||||
<Button type="submit" class="btn btn-primary" disabled={!canSubmit}>
|
||||
<Button type="submit" variant="primary" disabled={!canSubmit}>
|
||||
<Spinner {loading}>Log in</Spinner>
|
||||
<Icon icon={AltArrowRight} />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user