misc: tweak UI everywhere
This commit is contained in:
10 files changed
+51
-47
No files matched your search
@@ -10,7 +10,7 @@
|
||||
import { Button } from 'mono-svelte'
|
||||
import { t } from '$lib/translations'
|
||||
import { errorMessage } from '$lib/lemmy/error'
|
||||
import { Icon, Language, XMark } from 'svelte-hero-icons'
|
||||
import { ArrowUp, Icon, Language, XMark } from 'svelte-hero-icons'
|
||||
|
||||
interface Props {
|
||||
postId: number
|
||||
@@ -104,7 +104,8 @@
|
||||
<Menu>
|
||||
{#snippet target()}
|
||||
<Button
|
||||
size="square-md"
|
||||
size="custom"
|
||||
class="w-9 h-9"
|
||||
rounding="pill"
|
||||
color={language != undefined ? 'primary' : 'ghost'}
|
||||
title={$t('form.profile.languages.title')}
|
||||
@@ -154,12 +155,15 @@
|
||||
onclick={submit}
|
||||
color="primary"
|
||||
rounding="pill"
|
||||
size="sm"
|
||||
class="py-2 px-4"
|
||||
size="custom"
|
||||
class="w-9 h-9"
|
||||
title={$t('form.submit')}
|
||||
{loading}
|
||||
disabled={locked || loading || banned}
|
||||
>
|
||||
{$t('form.submit')}
|
||||
{#snippet prefix()}
|
||||
<Icon src={ArrowUp} size="18" micro />
|
||||
{/snippet}
|
||||
</Button>
|
||||
{/if}
|
||||
</MarkdownEditor>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
let progress = $state(1)
|
||||
|
||||
let previewURLs = $derived(
|
||||
preview && image ? Array.from(image).map(URL.createObjectURL) : undefined,
|
||||
preview && image ? Array.from(image).map(URL.createObjectURL) : undefined
|
||||
)
|
||||
|
||||
async function upload() {
|
||||
@@ -48,8 +48,8 @@
|
||||
.catch((err) => {
|
||||
toast({ content: errorMessage(err), type: 'error' })
|
||||
return 'Failed to upload'
|
||||
}),
|
||||
),
|
||||
})
|
||||
)
|
||||
)
|
||||
).filter((i) => i != undefined)
|
||||
|
||||
@@ -108,9 +108,12 @@
|
||||
{/each}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex flex-col justify-center w-full items-center gap-2">
|
||||
<div
|
||||
class="flex flex-col justify-center w-full items-center gap-2
|
||||
text-slate-600 dark:text-zinc-400"
|
||||
>
|
||||
<Icon src={DocumentPlus} size="32" />
|
||||
<span>{$t('form.post.selectFile')}</span>
|
||||
<span class="font-medium text-sm">{$t('form.post.selectFile')}</span>
|
||||
</div>
|
||||
{/if}
|
||||
<input
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
color="distinct"
|
||||
class="flex flex-col-reverse sm:flex-row
|
||||
overflow-hidden gap-4 embed-card z-0 relative
|
||||
dark:border-t-zinc-800 border-opacity-80 max-w-full"
|
||||
rounding="xl"
|
||||
dark:border-t-zinc-800 border-opacity-80 max-w-full shadow-sm shadow-black/5
|
||||
dark:bg-zinc-950"
|
||||
rounding="2xl"
|
||||
element="article"
|
||||
>
|
||||
{#if thumbnail_url}
|
||||
@@ -54,14 +55,19 @@
|
||||
-inset-px"
|
||||
/>
|
||||
{/if}
|
||||
<div class="flex flex-col gap-2 mb-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
{#if richURL}
|
||||
<Link
|
||||
href={url}
|
||||
target="_blank"
|
||||
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs"
|
||||
class="text-slate-600 dark:text-zinc-400 inline-flex items-center gap-1 text-xs font-medium"
|
||||
>
|
||||
<Icon src={LinkIcon} size="14" micro />
|
||||
<Icon
|
||||
src={LinkIcon}
|
||||
size="16"
|
||||
micro
|
||||
class="text-slate-400 dark:text-zinc-600"
|
||||
/>
|
||||
{richURL.hostname}
|
||||
</Link>
|
||||
{/if}
|
||||
@@ -73,7 +79,7 @@
|
||||
{embed_title}
|
||||
</a>
|
||||
{#if embed_description}
|
||||
<p class="text-sm">
|
||||
<p class="text-sm max-w-2xl">
|
||||
{embed_description.slice(0, 300)}{embed_description.length > 300
|
||||
? '...'
|
||||
: ''}
|
||||
|
||||
Reference in new issue
Block a user