feat: use new textarea
This commit is contained in:
1 parent
721fa81fd6
commit
1f9bb5418d
11 files changed
+49
-99
No files matched your search
@@ -1,9 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { Color } from '$lib/ui/colors.js'
|
||||
import type { CommentResponse } from 'lemmy-js-client'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||
import { profile } from '$lib/auth.js'
|
||||
@@ -75,30 +73,23 @@
|
||||
bind:value
|
||||
disabled={locked || loading}
|
||||
on:confirm={submit}
|
||||
/>
|
||||
{/if}
|
||||
{#if actions || previewAction}
|
||||
<div class="flex flex-row items-center justify-between">
|
||||
{#if previewAction}
|
||||
<MultiSelect
|
||||
options={[false, true]}
|
||||
optionNames={['Edit', 'Preview']}
|
||||
bind:selected={preview}
|
||||
/>
|
||||
{/if}
|
||||
previewButton={previewAction}
|
||||
>
|
||||
{#if actions}
|
||||
<Button
|
||||
large
|
||||
on:click={submit}
|
||||
color="primary"
|
||||
size="lg"
|
||||
class="sm:ml-auto w-28"
|
||||
{loading}
|
||||
disabled={locked || loading}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
<div class="ml-auto">
|
||||
<Button
|
||||
large
|
||||
on:click={submit}
|
||||
color="primary"
|
||||
size="lg"
|
||||
class="sm:ml-auto w-28"
|
||||
{loading}
|
||||
disabled={locked || loading}
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</MarkdownEditor>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import type { Community, Person, PersonView } from 'lemmy-js-client'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { Button, Checkbox, Modal, TextInput } from 'mono-svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
|
||||
export let open = false
|
||||
let item: Person | undefined
|
||||
@@ -114,7 +114,7 @@
|
||||
{banned ? 'Unbanning' : 'Banning'} from
|
||||
<span class="font-bold">{community ? community.name : 'site'}</span>
|
||||
</p>
|
||||
<TextArea
|
||||
<MarkdownEditor
|
||||
required
|
||||
bind:value={reason}
|
||||
label="Reason"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
@@ -193,7 +192,7 @@
|
||||
<Post actions={false} post={item} />
|
||||
{/if}
|
||||
|
||||
<TextArea
|
||||
<MarkdownEditor
|
||||
rows={3}
|
||||
label="Reason"
|
||||
placeholder="Optional"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import Post from '$lib/components/lemmy/post/Post.svelte'
|
||||
import { toast } from '$lib/components/ui/toasts/toasts.js'
|
||||
@@ -7,6 +6,7 @@
|
||||
import type { CommentView, PostView } from 'lemmy-js-client'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { Button, Modal } from 'mono-svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
|
||||
export let open: boolean
|
||||
export let item: PostView | CommentView | undefined = undefined
|
||||
@@ -81,9 +81,9 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<TextArea
|
||||
<MarkdownEditor
|
||||
required
|
||||
rows={3}
|
||||
rows={4}
|
||||
label="Reason"
|
||||
placeholder="he's being a meanie :("
|
||||
bind:value={reason}
|
||||
|
||||
Reference in new issue
Block a user