feat: switch from card to material

This commit is contained in:
Xyphyn committed 2023-09-04 11:27:19 -07:00
1 parent 43b0e87ebf
commit c53ec52d86
16 files changed
+61 -126

No files matched your search

+13 -12
View File
@@ -5,12 +5,11 @@
import Markdown from '$lib/components/markdown/Markdown.svelte'
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
import Avatar from '$lib/components/ui/Avatar.svelte'
import Card from '$lib/components/ui/Card.svelte'
import Placeholder from '$lib/components/ui/Placeholder.svelte'
import { Spinner, toast } from 'mono-svelte'
import { Material, Spinner, toast } from 'mono-svelte'
import { getClient } from '$lib/lemmy.js'
import type { GetCaptchaResponse } from 'lemmy-js-client'
import { Button, TextArea, TextInput } from 'mono-svelte'
import { Button, TextInput } from 'mono-svelte'
import {
ArrowPath,
ExclamationCircle,
@@ -131,14 +130,11 @@
type="password"
/>
{#if data.site_view.local_site.registration_mode == 'RequireApplication'}
<Card
class="p-4 dark:text-yellow-200 text-yellow-800"
cardColor="warning"
>
<Material class="dark:text-yellow-200 text-yellow-800 bg-yellow-500/20">
<Icon src={ExclamationTriangle} mini size="20" />
To join this instance, you need to fill out this application, and wait to
be accepted.
</Card>
</Material>
{#if data.site_view.local_site.application_question}
<Markdown source={data.site_view.local_site.application_question} />
{/if}
@@ -164,16 +160,21 @@
/>
<audio controls src={captchaAudio} />
{:else}
<Card cardColor="warning" class="p-3 flex gap-2">
<Material
class="flex gap-2 dark:text-yellow-200 text-yellow-800 bg-yellow-500/20"
>
<Icon src={QuestionMarkCircle} mini size="24" />
No captcha was returned
</Card>
</Material>
{/if}
{:catch err}
<Card cardColor="error" class="p-3 flex gap-2">
<Material
padding="sm"
class="flex gap-2 dark:text-yellow-200 text-yellow-800 bg-yellow-500/20"
>
<Icon src={ExclamationCircle} mini size="24" />
{err}
</Card>
</Material>
{/await}
<Button on:click={() => getCaptcha()} size="square-md">
<Icon src={ArrowPath} size="16" mini />