fix: adjust height automatically, close #294, close #272

This commit is contained in:
Xylight committed 2024-09-06 17:12:37 -07:00
1 parent 190b28a331
commit b78145a4f5
2 files changed
+13 -2

No files matched your search

@@ -368,7 +368,17 @@
{/if}
<div class="flex flex-row gap-2 flex-wrap">
{#if data.url === undefined}
<Button on:click={() => (data.url = '')} size="lg">
<Button
on:click={async () => {
data.url = ''
try {
const url = new URL(await navigator.clipboard.readText())
data.url = url.toString()
} catch (e) {}
}}
size="lg"
>
<Icon src={Link} size="16" micro />
{$t('form.post.addUrl')}
</Button>