feat(voice): журнал обработанных вебхуков LiveKit

This commit is contained in:
2026-09-20 18:45:14 +03:00
parent ecd7b3be10
commit 0db4c63023
19 changed files with 1578 additions and 59 deletions
+13 -14
View File
@@ -5,7 +5,7 @@ import type { Channel } from '@/api/types';
import { Avatar } from '@/components/ui/Avatar';
import { Card, Button } from '@/components/ui/primitives';
import { RemoteAudio, RemoteVideo } from '@/components/voice/RemoteAudio';
import { VoiceFlags, VoiceQualityDot, speakingRingClass } from '@/components/voice/VoiceIndicators';
import { VoiceFlags, VoiceQualityDot } from '@/components/voice/VoiceIndicators';
import { VoiceOccupantMenu } from '@/components/voice/VoiceOccupantMenu';
import { useVoiceEnabled } from '@/components/voice/useVoiceEnabled';
import { useGuildVoiceStates } from '@/components/voice/useGuildVoiceStates';
@@ -16,6 +16,7 @@ import {
type VoiceOccupant,
} from '@/components/voice/useVoiceOccupants';
import { VOICE_DRAG_MIME } from '@/components/voice/voiceDrag';
import { speakingRingClass } from '@/components/voice/voiceStyles';
import type { VoiceModerationPermissions } from '@/lib/identity';
import { useApiErrorMessage } from '@/lib/useApiErrorMessage';
import { useVoiceStore } from '@/stores/voice';
@@ -195,12 +196,7 @@ function VoiceControlsRow({
active={screenEnabled}
onClick={onScreen}
/>
<VoiceControlButton
glyph="⏻"
label={t('voice.disconnect')}
active
onClick={onLeave}
/>
<VoiceControlButton glyph="⏻" label={t('voice.disconnect')} active onClick={onLeave} />
</div>
);
}
@@ -231,7 +227,9 @@ function VoiceControlButton({
disabled={disabled}
onClick={onClick}
className={`rounded-[var(--radius-md)] border px-3 py-1.5 text-base leading-none transition-[color,background-color,transform] duration-[var(--duration-fast)] active:scale-95 disabled:cursor-not-allowed disabled:opacity-50 ${
active ? 'border-border/60 bg-surface-2 text-fg' : 'border-danger/60 bg-danger/10 text-danger'
active
? 'border-border/60 bg-surface-2 text-fg'
: 'border-danger/60 bg-danger/10 text-danger'
}`}
>
<span aria-hidden="true">{glyph}</span>
@@ -278,16 +276,17 @@ export function VoiceRoomPanel({ guildId, channel }: { guildId: string; channel:
const failed = here && status === 'error';
const onMute = useCallback(
(userId: string, muted: boolean) => void setParticipantMuted(userId, muted),
[setParticipantMuted],
(userId: string, muted: boolean) => void setParticipantMuted(guildId, userId, muted),
[guildId, setParticipantMuted],
);
const onDeafen = useCallback(
(userId: string, deafenedNext: boolean) => void setParticipantDeafened(userId, deafenedNext),
[setParticipantDeafened],
(userId: string, deafenedNext: boolean) =>
void setParticipantDeafened(guildId, userId, deafenedNext),
[guildId, setParticipantDeafened],
);
const onMove = useCallback(
(userId: string, targetId: string) => void moveParticipant(userId, targetId),
[moveParticipant],
(userId: string, targetId: string) => void moveParticipant(guildId, userId, targetId),
[guildId, moveParticipant],
);
if (!voiceEnabled) {