From 880f4e2d870d2916d8590d69cb2d1862cef3936f Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Tue, 1 Dec 2026 10:34:46 +0100 Subject: [PATCH] feat(web): list the room's people and let the owner remove them 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. --- web/app/assets/css/main.css | 75 +++++++++++- web/app/components/InviteDialog.vue | 80 ------------- web/app/components/PeopleDialog.vue | 175 ++++++++++++++++++++++++++++ web/app/components/RoomTopBar.vue | 45 ++++--- web/app/pages/room/[id].vue | 20 +++- 5 files changed, 295 insertions(+), 100 deletions(-) delete mode 100644 web/app/components/InviteDialog.vue create mode 100644 web/app/components/PeopleDialog.vue diff --git a/web/app/assets/css/main.css b/web/app/assets/css/main.css index 5922ad9..52e68c0 100644 --- a/web/app/assets/css/main.css +++ b/web/app/assets/css/main.css @@ -1077,10 +1077,37 @@ button { gap: var(--sp-1); } -.presence-avatars .avatar + .avatar { +.presence-avatars .avatar-btn + .avatar-btn { margin-left: calc(var(--sp-1) * -1); } +.avatar-btn { + display: inline-flex; + padding: 0; + border: 0; + border-radius: var(--r-avatar); + background: transparent; + line-height: 0; + cursor: pointer; +} + +.avatar-btn:hover .avatar { + box-shadow: 0 0 0 2px var(--accent-soft); +} + +.more-people { + padding: 0 var(--sp-1); + border: 0; + background: transparent; + color: var(--muted); + font-size: var(--fs-small); + line-height: var(--lh-body); +} + +.more-people:hover { + color: var(--text); +} + .room-body { flex: 1; min-height: 0; @@ -2306,6 +2333,52 @@ body.files-resizing-y * { border-top: 1px solid var(--border); } +.people-section { + margin-bottom: var(--sp-6); +} + +.people-list { + display: flex; + flex-direction: column; + max-height: 300px; + overflow-y: auto; + scrollbar-width: thin; + margin: 0; + /* Keep the scrollbar off the buttons at the right edge. */ + padding: 0 var(--sp-3) 0 0; + list-style: none; +} + +.person-row { + display: flex; + align-items: center; + gap: var(--sp-2); + min-height: 38px; + padding: var(--sp-1) 0; +} + +.person-row + .person-row { + border-top: 1px solid var(--border); +} + +.person-name { + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: var(--fs-ui); +} + +.person-role { + color: var(--faint); + font-size: var(--fs-small); +} + +.person-confirm { + flex: 1; +} + .composer-error { max-width: 760px; margin: var(--sp-1) auto 0; diff --git a/web/app/components/InviteDialog.vue b/web/app/components/InviteDialog.vue deleted file mode 100644 index 41b5c0a..0000000 --- a/web/app/components/InviteDialog.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - diff --git a/web/app/components/PeopleDialog.vue b/web/app/components/PeopleDialog.vue new file mode 100644 index 0000000..e58e307 --- /dev/null +++ b/web/app/components/PeopleDialog.vue @@ -0,0 +1,175 @@ + + + diff --git a/web/app/components/RoomTopBar.vue b/web/app/components/RoomTopBar.vue index 0d026ba..e26ca25 100644 --- a/web/app/components/RoomTopBar.vue +++ b/web/app/components/RoomTopBar.vue @@ -1,6 +1,6 @@