misc: tweak UI everywhere
This commit is contained in:
10 files changed
+51
-47
No files matched your search
@@ -1,11 +1,11 @@
|
||||
<div class="skeleton animate-pulse flex flex-col gap-2 w-full">
|
||||
<div
|
||||
class="w-2/3 h-6 bg-slate-300 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
class="w-2/3 h-6 bg-slate-200 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
></div>
|
||||
<div
|
||||
class="w-full h-20 bg-slate-300 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
class="w-full h-20 bg-slate-200 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
></div>
|
||||
<div
|
||||
class="w-32 h-6 bg-slate-300 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
class="w-32 h-6 bg-slate-200 dark:bg-zinc-800 animate-pulse rounded-md"
|
||||
></div>
|
||||
</div>
|
||||
@@ -70,9 +70,9 @@
|
||||
<Menu {...rest}>
|
||||
{#snippet target()}
|
||||
<button
|
||||
class="w-10 h-10 rounded-full border-2 border-slate-200 dark:border-zinc-700
|
||||
class="w-10 h-10 rounded-full border-slate-200 dark:border-zinc-700
|
||||
transition-all bg-slate-50 dark:bg-zinc-900 relative
|
||||
hover:border-primary-900 hover:dark:border-primary-100 active:scale-95 {buttonClass}"
|
||||
hover:bg-slate-200 hover:dark:bg-zinc-700 {buttonClass}"
|
||||
title={$t('profile.profile')}
|
||||
>
|
||||
{#if profile.data?.user}
|
||||
@@ -81,7 +81,7 @@
|
||||
>
|
||||
<Avatar
|
||||
url={profile.data.user.local_user_view.person.avatar}
|
||||
width={36}
|
||||
width={32}
|
||||
alt={profile.data.user.local_user_view.person.name}
|
||||
/>
|
||||
</div>
|
||||
@@ -97,18 +97,7 @@
|
||||
{/if}
|
||||
</button>
|
||||
{/snippet}
|
||||
{#if profile.data?.user}
|
||||
<UserLink
|
||||
user={profile.data?.user.local_user_view.person}
|
||||
showInstance={false}
|
||||
avatar
|
||||
avatarSize={24}
|
||||
displayName={false}
|
||||
class="font-medium px-2 py-1 pointer-events-none"
|
||||
/>
|
||||
{:else}
|
||||
<MenuDivider>{$t('nav.menu.label')}</MenuDivider>
|
||||
{/if}
|
||||
<MenuDivider>{$t('nav.menu.label')}</MenuDivider>
|
||||
{#if profile.data?.jwt}
|
||||
<MenuButton link href="/profile">
|
||||
{#snippet prefix()}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
profile.data,
|
||||
profileData.profiles,
|
||||
theme.data,
|
||||
page.data.contextual?.actions,
|
||||
page.data.contextual?.actions
|
||||
)
|
||||
})
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
score: Math.max(
|
||||
fuzzySearch(action.name, term),
|
||||
fuzzySearch(group.name, term),
|
||||
action.detail ? fuzzySearch(action.detail, term) : -1,
|
||||
action.detail ? fuzzySearch(action.detail, term) : -1
|
||||
),
|
||||
}))
|
||||
.filter((action) => action.score > 0)
|
||||
@@ -106,7 +106,7 @@
|
||||
actions: scoredActions,
|
||||
score: Math.max(
|
||||
fuzzySearch(group.name, term),
|
||||
...scoredActions.map((a) => a.score),
|
||||
...scoredActions.map((a) => a.score)
|
||||
),
|
||||
}
|
||||
})
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
function flattenActions(
|
||||
actions: Action[],
|
||||
subaction: boolean = true,
|
||||
subaction: boolean = true
|
||||
): Action[] {
|
||||
return actions.flatMap((action) => [
|
||||
action,
|
||||
@@ -238,7 +238,7 @@
|
||||
})
|
||||
|
||||
let flattenedActions = $derived(
|
||||
filteredGroups.flatMap((group) => group.actions),
|
||||
filteredGroups.flatMap((group) => group.actions)
|
||||
)
|
||||
|
||||
$effect(() => {
|
||||
@@ -250,7 +250,6 @@
|
||||
|
||||
<TextInput
|
||||
bind:value={search}
|
||||
autofocus
|
||||
class="sticky rounded-none border-t-0 border-x-0 focus-within:dark:border-zinc-800"
|
||||
size="lg"
|
||||
placeholder={$t('nav.commands.prompt')}
|
||||
|
||||
Reference in new issue
Block a user