forked from coracle/flotilla
Show notification badges regardless of favorite status
This commit is contained in:
@@ -258,7 +258,7 @@
|
||||
<SecondaryNavHeader>Your Rooms</SecondaryNavHeader>
|
||||
{/if}
|
||||
{#each $userRooms as h (h)}
|
||||
<SpaceMenuRoomItem notify {replaceState} {url} {h} />
|
||||
<SpaceMenuRoomItem {replaceState} {url} {h} />
|
||||
{/each}
|
||||
{#if $otherRooms.length > 0}
|
||||
<div class="h-2 flex-shrink-0"></div>
|
||||
|
||||
@@ -12,11 +12,10 @@
|
||||
interface Props {
|
||||
url: any
|
||||
h: any
|
||||
notify?: boolean
|
||||
replaceState?: boolean
|
||||
}
|
||||
|
||||
const {url, h, notify = false, replaceState = false}: Props = $props()
|
||||
const {url, h, replaceState = false}: Props = $props()
|
||||
|
||||
const room = deriveRoom(url, h)
|
||||
const roomType = $derived(getRoomType($room))
|
||||
@@ -32,7 +31,7 @@
|
||||
<SecondaryNavItem
|
||||
href={path}
|
||||
{replaceState}
|
||||
notification={notify ? $notifications.has(path) : false}>
|
||||
notification={$shouldNotifyForRoom ? $notifications.has(path) : false}>
|
||||
<RoomNameWithImage {url} {h} />
|
||||
{#if showDifferenceIcon}
|
||||
<Icon icon={$shouldNotifyForRoom ? Bell : BellOff} size={4} class="opacity-50" />
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
class:bg-base-100={active}>
|
||||
{@render children?.()}
|
||||
{#if notification}
|
||||
<div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade></div>
|
||||
<div class="absolute right-[1.15rem] top-5 h-2 w-2 rounded-full bg-primary" transition:fade>
|
||||
</div>
|
||||
{/if}
|
||||
</a>
|
||||
{:else}
|
||||
@@ -49,7 +50,8 @@
|
||||
class:text-base-content={active}
|
||||
class:bg-base-100={active}>
|
||||
{#if notification}
|
||||
<div class="absolute right-2 top-5 h-2 w-2 rounded-full bg-primary" transition:fade></div>
|
||||
<div class="absolute right-[1.15rem] top-5 h-2 w-2 rounded-full bg-primary" transition:fade>
|
||||
</div>
|
||||
{/if}
|
||||
{@render children?.()}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user