feat(web): list the room's people and let the owner remove them
ci / checks (push) Successful in 54s
ci / test (push) Successful in 58s
ci / chart (push) Successful in 5s
ci / web (push) Successful in 21s
ci / docker (push) Successful in 11s
ci / publish-edge-image (push) Successful in 10s
ci / publish-edge-chart (push) Successful in 3s

The invite dialog was reachable only from the invite button, and who was
in the room showed only as avatars in the top bar. Selecting an avatar,
the member count, or the People button now opens one dialog: a
scrollable member list with the invite link below it.

The owner removes a member from the row after a confirmation, and the
top bar drops them without reloading the room. The server already
refuses to remove the owner. Invite link creation is unchanged.
This commit is contained in:
vhaudiquet committed 2026-12-01 10:34:46 +01:00
1 parent 7d98b04d63
commit 880f4e2d87
5 files changed
+295 -100

No files matched your search

+15 -5
View File
@@ -58,7 +58,7 @@ const onlineIds = ref<string[]>([])
const typingActive = ref(false)
const paneOpen = ref(typeof window === 'undefined' ? true : !window.matchMedia('(max-width: 1099px)').matches)
const inviteOpen = ref(false)
const peopleOpen = ref(false)
const settingsOpen = ref(false)
const PANE_WIDTH_KEY = 'together.pane-width'
@@ -726,6 +726,15 @@ async function onSettingsUpdated(room: Room) {
await rooms.refresh()
}
function onMemberRemoved(memberId: string) {
if (!detail.value) return
detail.value = {
...detail.value,
members: detail.value.members.filter((member) => member.id !== memberId),
}
onlineIds.value = onlineIds.value.filter((id) => id !== memberId)
}
async function onArchived() {
await rooms.refresh()
await navigateTo('/rooms', { replace: true })
@@ -797,7 +806,7 @@ onBeforeUnmount(() => {
:online-ids="onlineIds"
:is-owner="isOwner"
:pane-open="paneOpen"
@invite="inviteOpen = true"
@people="peopleOpen = true"
@settings="settingsOpen = true"
@toggle-pane="paneOpen = !paneOpen"
/>
@@ -899,11 +908,12 @@ onBeforeUnmount(() => {
/>
</div>
<InviteDialog
v-if="inviteOpen"
<PeopleDialog
v-if="peopleOpen"
:room-id="detail.room.id"
:room-name="detail.room.name"
@close="inviteOpen = false"
@close="peopleOpen = false"
@removed="onMemberRemoved"
/>
<RoomSettingsDialog