feature/23-voice-room/poc #93
@@ -49,6 +49,7 @@
|
||||
deriveOtherRooms,
|
||||
deriveRoomsWithLivekit,
|
||||
deriveRoomsNoText,
|
||||
deriveOtherVoiceRooms,
|
||||
userSpaceUrls,
|
||||
hasNip29,
|
||||
deriveUserCanCreateRoom,
|
||||
@@ -74,6 +75,7 @@
|
||||
const otherRooms = deriveOtherRooms(url)
|
||||
const roomsWithLivekit = deriveRoomsWithLivekit(url)
|
||||
const roomsNoText = deriveRoomsNoText(url)
|
||||
const otherVoiceRooms = deriveOtherVoiceRooms(url)
|
||||
const members = deriveSpaceMembers(url)
|
||||
const userIsAdmin = deriveUserIsSpaceAdmin(url)
|
||||
const reports = deriveEventsForUrl(url, [{kinds: [REPORT]}])
|
||||
@@ -289,9 +291,13 @@
|
||||
{#if !$roomsNoText.has(h)}
|
||||
<SpaceMenuRoomItem {replaceState} {url} {h} />
|
||||
{/if}
|
||||
{#if $roomsWithLivekit.has(h)}
|
||||
<VoiceRoomItem {url} {h} />
|
||||
{/if}
|
||||
{/each}
|
||||
|
hodlbod marked this conversation as resolved
Outdated
|
||||
{#if $otherVoiceRooms.length > 0}
|
||||
<div class="h-2"></div>
|
||||
<SecondaryNavHeader>Voice Rooms</SecondaryNavHeader>
|
||||
{/if}
|
||||
{#each $otherVoiceRooms as h (h)}
|
||||
<VoiceRoomItem {url} {h} />
|
||||
{/each}
|
||||
{#if $canCreateRoom}
|
||||
<SecondaryNavItem {replaceState} onclick={addRoom}>
|
||||
|
||||
@@ -686,6 +686,22 @@ export const deriveRoomsNoText = (url: string) =>
|
||||
return set
|
||||
})
|
||||
|
||||
export const deriveOtherVoiceRooms = (url: string) =>
|
||||
derived(
|
||||
[deriveRoomsWithLivekit(url), deriveUserRooms(url)],
|
||||
([$roomsWithLivekit, $userRooms]) => {
|
||||
const rooms: string[] = []
|
||||
|
||||
for (const h of $roomsWithLivekit) {
|
||||
if (!$userRooms.includes(h)) {
|
||||
rooms.push(h)
|
||||
}
|
||||
}
|
||||
|
||||
return sortBy(roomComparator(url), uniq(rooms))
|
||||
},
|
||||
)
|
||||
|
||||
// User space/room lists
|
||||
|
||||
export const groupListsByPubkey = deriveItemsByKey({
|
||||
|
||||
Reference in New Issue
Block a user
I think we talked about putting voice rooms below, separate from text rooms, is that right? I can't remember, but I think it would make sense for any room with livekit support to go there instead of in the text room area regardless of whether the room has text support.
I don't love the labels I landed on but see what you think of the current take:
"Your Rooms"
{ favorited voice and text}
"Other Rooms"
{ text rooms}
Voice Rooms
{ voice rooms}
Or when the user has no favorited rooms it looks like:
"Rooms"
{ text rooms}
Voice Rooms
{ voice rooms}
Idk if you want to say "Text Rooms" or "Chat Rooms" or something. Those feel quite wordy for menu headings to me though.
This surfaces another weird consequence of rooms that are "livekit" but not "no-text": currently favoriting either the text or vioce channel pulls both into the "Your Rooms" section.
That's probably ok, I like how the labels look.