hotfix: re-add comment submit button
This commit is contained in:
1 parent
493349d0a0
commit
b8ec58e778
1 file changed
+42
-8
@@ -59,12 +59,46 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex flex-col gap-2 relative">
|
<div class="flex flex-col gap-2 relative">
|
||||||
<MarkdownEditor
|
{#if preview}
|
||||||
rows={7}
|
<div
|
||||||
placeholder={locked ? 'This post is locked.' : placeholders.get('comment')}
|
class="bg-slate-100 dark:bg-zinc-900 px-3 py-2.5 h-64 border
|
||||||
bind:value
|
border-slate-300 dark:border-zinc-700 rounded-md overflow-auto text-sm resize-y"
|
||||||
disabled={locked || loading}
|
>
|
||||||
on:confirm={submit}
|
<Markdown source={value} />
|
||||||
previewButton
|
</div>
|
||||||
/>
|
{:else}
|
||||||
|
<MarkdownEditor
|
||||||
|
rows={7}
|
||||||
|
placeholder={locked
|
||||||
|
? 'This post is locked.'
|
||||||
|
: placeholders.get('comment')}
|
||||||
|
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}
|
||||||
|
{#if actions}
|
||||||
|
<Button
|
||||||
|
large
|
||||||
|
on:click={submit}
|
||||||
|
color="primary"
|
||||||
|
size="lg"
|
||||||
|
class="sm:ml-auto w-28"
|
||||||
|
{loading}
|
||||||
|
disabled={locked || loading}
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</Button>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
Reference in new issue
Block a user