misc: use mono-svelte text input

This commit is contained in:
Xyphyn committed 2023-09-03 18:18:33 -07:00
1 parent e9168d055e
commit 5ed5395712
15 files changed
+22 -92

No files matched your search

+5 -9
View File
@@ -2,11 +2,10 @@
import { goto } from '$app/navigation'
import { setUser } from '$lib/auth.js'
import Link from '$lib/components/input/Link.svelte'
import TextInput from '$lib/components/input/TextInput.svelte'
import { toast } from '$lib/components/ui/toasts/toasts.js'
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js'
import { getClient, validateInstance } from '$lib/lemmy.js'
import { Button } from 'mono-svelte'
import { Button, TextInput } from 'mono-svelte'
import { AtSymbol, Icon } from 'svelte-hero-icons'
let data = {
@@ -65,7 +64,10 @@
placeholder="Example"
class="flex-1"
required
/>
inlineAffixes
>
<span slot="prefix">@</span>
</TextInput>
{#if !LINKED_INSTANCE_URL}
<span class="flex items-center font-bold mt-6">
<Icon src={AtSymbol} mini size="20" class="mt-auto" />
@@ -100,12 +102,6 @@
minlength={6}
maxlength={6}
class="w-24"
on:input={(e) => {
if (!Number.isInteger(Number(e.detail.data))) {
e.preventDefault()
data.totp = data.totp.replace(e.detail.data, '')
}
}}
/>
</div>
<Button