feat: add community header back on press
This commit is contained in:
6 files changed
+46
-20
No files matched your search
@@ -72,16 +72,16 @@
|
||||
<button
|
||||
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:bg-slate-200 hover:dark:bg-zinc-700 {buttonClass}"
|
||||
hover:bg-slate-200 hover:dark:bg-zinc-700 group {buttonClass}"
|
||||
title={$t('profile.profile')}
|
||||
>
|
||||
{#if profile.data?.user}
|
||||
<div
|
||||
class="w-full h-full aspect-square object-cover rounded-full grid place-items-center"
|
||||
class="w-full h-full aspect-square object-cover rounded-full grid place-items-center group-hover:scale-90 transition-transform group-active:scale-[85%]"
|
||||
>
|
||||
<Avatar
|
||||
url={profile.data.user.local_user_view.person.avatar}
|
||||
width={32}
|
||||
width={36}
|
||||
alt={profile.data.user.local_user_view.person.name}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
color="tertiary"
|
||||
alignment="left"
|
||||
loading={switching}
|
||||
loaderWidth={20}
|
||||
loaderWidth={22}
|
||||
selected={profile.data?.id == prof.id}
|
||||
onclick={async () => {
|
||||
switching = true
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { run } from 'svelte/legacy'
|
||||
|
||||
import { page } from '$app/state'
|
||||
import { settings } from '$lib/settings.svelte.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { Icon, type IconSource } from 'svelte-hero-icons'
|
||||
import type { HTMLButtonAttributes } from 'svelte/elements'
|
||||
|
||||
interface Props {
|
||||
href?: string | undefined
|
||||
@@ -29,7 +25,7 @@
|
||||
...rest
|
||||
}: Props = $props()
|
||||
|
||||
run(() => {
|
||||
$effect(() => {
|
||||
if (href != undefined) {
|
||||
selected = page.url.pathname == href
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user