misc: make account page more compact
This commit is contained in:
3 files changed
+24
-8
No files matched your search
@@ -86,3 +86,10 @@
|
||||
}).toString()}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
img,
|
||||
div {
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="30" y1="30" x2="70" y2="70" stroke="#aa0000" stroke-width="4" stroke-linecap="round"/><line x1="70" y1="30" x2="30" y2="70" stroke="#aa0000" stroke-width="4" stroke-linecap="round"/></svg>');
|
||||
}
|
||||
</style>
|
||||
@@ -2,6 +2,7 @@
|
||||
const wrapClass = {
|
||||
wrap: '',
|
||||
'no-wrap': 'overflow-hidden text-ellipsis whitespace-nowrap',
|
||||
force: 'break-words',
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
setUserID,
|
||||
} from '$lib/auth.svelte.js'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import TextProps from '$lib/components/ui/text/TextProps.svelte'
|
||||
import DebugObject from '$lib/components/util/debug/DebugObject.svelte'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte.js'
|
||||
@@ -24,6 +25,7 @@
|
||||
EllipsisHorizontal,
|
||||
Icon,
|
||||
Plus,
|
||||
QuestionMarkCircle,
|
||||
} from 'svelte-hero-icons'
|
||||
|
||||
let debugging = $state(false)
|
||||
@@ -53,7 +55,7 @@
|
||||
|
||||
{#if debugging}
|
||||
<DebugObject
|
||||
object={debugProfile?.id == profile.data?.id ? profile : debugProfile}
|
||||
object={debugProfile?.id == profile.data?.id ? profile.data : debugProfile}
|
||||
bind:open={debugging}
|
||||
>
|
||||
{#snippet title()}
|
||||
@@ -144,8 +146,9 @@
|
||||
<Material
|
||||
rounding="2xl"
|
||||
color="uniform"
|
||||
padding="none"
|
||||
class={[
|
||||
'flex flex-col gap-2 py-3 transition-all duration-75 cursor-pointer',
|
||||
'flex flex-row items-center px-3 py-3 gap-2 transition-all duration-75 cursor-pointer relative',
|
||||
'peer-checked:ring-2',
|
||||
switching == profile.id && 'ring-slate-400 dark:ring-zinc-600',
|
||||
]}
|
||||
@@ -156,12 +159,13 @@
|
||||
selected={currentProfile?.data.id == profile.id}
|
||||
size={40}
|
||||
/>
|
||||
<div class="flex flex-row justify-between">
|
||||
<div class="flex flex-col">
|
||||
<span class="font-medium text-base">
|
||||
<div class="flex flex-col overflow-hidden">
|
||||
<span class="break-words font-medium text-base">
|
||||
{profile.username}
|
||||
{#if !profile.jwt}
|
||||
<Badge class="inline">{$t('account.guest')}</Badge>
|
||||
<Badge class="inline-grid w-6 h-6 p-0! place-items-center">
|
||||
<Icon src={QuestionMarkCircle} size="16" micro />
|
||||
</Badge>
|
||||
{/if}
|
||||
</span>
|
||||
<span class="text-sm text-slate-600 dark:text-zinc-400">
|
||||
@@ -170,7 +174,12 @@
|
||||
</div>
|
||||
<Menu placement="bottom-end">
|
||||
{#snippet target()}
|
||||
<Button rounding="pill" size="custom" class="self-end h-8 w-8">
|
||||
<Button
|
||||
size="custom"
|
||||
class="absolute top-0 right-0 w-6 h-6 m-1"
|
||||
color="tertiary"
|
||||
aria-label={$t('post.actions.more')}
|
||||
>
|
||||
{#snippet prefix()}
|
||||
<Icon src={EllipsisHorizontal} mini size="16" />
|
||||
{/snippet}
|
||||
@@ -231,7 +240,6 @@
|
||||
</MenuButton>
|
||||
{/if}
|
||||
</Menu>
|
||||
</div>
|
||||
</Material>
|
||||
</label>
|
||||
{/each}
|
||||
|
||||
Reference in new issue
Block a user