From b58ddcc1c46c91e8d24c1308aef0a52ec06c4738 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Tue, 8 Jul 2025 14:49:32 -0700 Subject: [PATCH] misc: make account page more compact --- src/lib/components/ui/Avatar.svelte | 7 + src/lib/components/ui/text/TextProps.svelte | 1 + src/routes/accounts/+page.svelte | 160 ++++++++++---------- 3 files changed, 92 insertions(+), 76 deletions(-) diff --git a/src/lib/components/ui/Avatar.svelte b/src/lib/components/ui/Avatar.svelte index b88aeea4..a83e2b41 100644 --- a/src/lib/components/ui/Avatar.svelte +++ b/src/lib/components/ui/Avatar.svelte @@ -86,3 +86,10 @@ }).toString()} {/if} + + diff --git a/src/lib/components/ui/text/TextProps.svelte b/src/lib/components/ui/text/TextProps.svelte index 41ee1021..032cf9a9 100644 --- a/src/lib/components/ui/text/TextProps.svelte +++ b/src/lib/components/ui/text/TextProps.svelte @@ -2,6 +2,7 @@ const wrapClass = { wrap: '', 'no-wrap': 'overflow-hidden text-ellipsis whitespace-nowrap', + force: 'break-words', } diff --git a/src/routes/accounts/+page.svelte b/src/routes/accounts/+page.svelte index 2ff572cb..69cc9bdf 100644 --- a/src/routes/accounts/+page.svelte +++ b/src/routes/accounts/+page.svelte @@ -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} {#snippet title()} @@ -144,8 +146,9 @@ -
-
- - {profile.username} - {#if !profile.jwt} - {$t('account.guest')} - {/if} - - - {profile.instance} - -
- - {#snippet target()} - - {/snippet} - - -
e.stopPropagation()} - > - - -
- {#if settings.debugInfo} - { - debugProfile = profile - debugging = !debugging - }} - > - {#snippet prefix()} - - {/snippet} - {$t('common.debug')} - +
+ + {profile.username} + {#if !profile.jwt} + + + {/if} - {#if !LINKED_INSTANCE_URL || profile.user} - { - removing.account = profile - removing.shown = !removing.shown - }} - color="danger-subtle" - > - {#snippet prefix()} - - {/snippet} - {$t('account.logout')} - - {/if} -
+ + + {profile.instance} +
+ + {#snippet target()} + + {/snippet} + + +
e.stopPropagation()} + > + + +
+ {#if settings.debugInfo} + { + debugProfile = profile + debugging = !debugging + }} + > + {#snippet prefix()} + + {/snippet} + {$t('common.debug')} + + {/if} + {#if !LINKED_INSTANCE_URL || profile.user} + { + removing.account = profile + removing.shown = !removing.shown + }} + color="danger-subtle" + > + {#snippet prefix()} + + {/snippet} + {$t('account.logout')} + + {/if} +
{/each}