(feat): add ability to hide users in focused call view
All checks were successful
/ deploy (push) Successful in 15m0s

(feat): add small avatars with tooltips instead of usernames in the top bar in calls
(fix): a lot of layout issues
(qol): update todo
This commit is contained in:
Alois 2026-05-09 20:50:28 +02:00
commit 6840e04118
9 changed files with 382 additions and 71 deletions

View file

@ -86,6 +86,7 @@ type CallStore = {
screenShareEnabled: boolean;
screenShareSession: ScreenShareSession | null;
focusedParticipantId: number | null;
usersInFocusedViewHidden: boolean;
watchedStreamParticipantIds: number[];
pendingWatchedParticipantIds: number[];
activeScreenShareParticipantIds: number[];
@ -508,6 +509,18 @@ export function setCallView(view: CallView) {
useCall.setState({ view });
}
export function setUsersInFocusedViewHidden(
usersInFocusedViewHidden: boolean,
) {
useCall.setState((state) => ({
usersInFocusedViewHidden,
layoutVersion:
state.usersInFocusedViewHidden === usersInFocusedViewHidden
? state.layoutVersion
: state.layoutVersion + 1,
}));
}
export function setCallIsFullscreen(callIsFullscreen: boolean) {
useCall.setState({ callIsFullscreen });
}
@ -771,6 +784,7 @@ export async function disconnect() {
view: "preview",
screenShareSession: null,
focusedParticipantId: null,
usersInFocusedViewHidden: false,
watchedStreamParticipantIds: [],
pendingWatchedParticipantIds: [],
activeScreenShareParticipantIds: [],
@ -928,6 +942,7 @@ export function resetCallState() {
deaf: false,
screenShareSession: null,
focusedParticipantId: null,
usersInFocusedViewHidden: false,
watchedStreamParticipantIds: [],
pendingWatchedParticipantIds: [],
activeScreenShareParticipantIds: [],
@ -969,6 +984,7 @@ export const useCall = create<CallStore>(() => ({
screenShareEnabled: room.localParticipant.isScreenShareEnabled,
screenShareSession: null,
focusedParticipantId: null,
usersInFocusedViewHidden: false,
watchedStreamParticipantIds: [],
pendingWatchedParticipantIds: [],
activeScreenShareParticipantIds: [],