refactor: Clean lint errors and organise files

This commit is contained in:
2026-04-17 01:06:01 +02:00
parent 2927a86fbb
commit 35b616fb77
60 changed files with 1161 additions and 728 deletions

View File

@@ -103,7 +103,7 @@ export class RoomsSidePanelComponent {
private voiceWorkspace = inject(VoiceWorkspaceService);
private voicePlayback = inject(VoicePlaybackService);
private profileCard = inject(ProfileCardService);
voiceActivity = inject(VoiceActivityService);
private readonly voiceActivity = inject(VoiceActivityService);
readonly panelMode = input<PanelMode>('channels');
readonly showVoiceControls = input(true);
@@ -186,14 +186,14 @@ export class RoomsSidePanelComponent {
draggedVoiceUserId = signal<string | null>(null);
dragTargetVoiceChannelId = signal<string | null>(null);
openProfileCard(event: MouseEvent, user: User, editable: boolean): void {
openProfileCard(event: Event, user: User, editable: boolean): void {
event.stopPropagation();
const el = event.currentTarget as HTMLElement;
this.profileCard.open(el, user, { placement: 'left', editable });
}
openProfileCardForMember(event: MouseEvent, member: RoomMember): void {
openProfileCardForMember(event: Event, member: RoomMember): void {
const user: User = {
id: member.id,
oderId: member.oderId || member.id,
@@ -886,6 +886,22 @@ export class RoomsSidePanelComponent {
return this.isUserSharing(userId) || this.isUserOnCamera(userId);
}
getVoiceUserRingClass(user: User): string {
if (user.voiceState?.isDeafened) {
return 'ring-2 ring-red-500';
}
if (user.voiceState?.isMuted) {
return 'ring-2 ring-yellow-500';
}
if (this.isVoiceUserSpeaking(user)) {
return 'ring-2 ring-green-400 shadow-[0_0_8px_2px_rgba(74,222,128,0.6)]';
}
return 'ring-2 ring-green-500/40';
}
getUserLiveIconName(userId: string): string {
return this.isUserSharing(userId) ? 'lucideMonitor' : 'lucideVideo';
}
@@ -981,6 +997,12 @@ export class RoomsSidePanelComponent {
return 'bg-red-500';
}
private isVoiceUserSpeaking(user: User): boolean {
const userKey = user.oderId || user.id;
return !!userKey && this.voiceActivity.speakingMap().get(userKey) === true;
}
private findKnownUser(userId: string): User | null {
const current = this.currentUser();