MRT: Rufgruppenauswahl, Herunterfahren, Hilfe

This commit is contained in:
PxlLoewe
2026-01-15 21:12:15 +01:00
parent a65af7f011
commit 48d36af382
12 changed files with 321 additions and 104 deletions

View File

@@ -24,6 +24,7 @@ import { useSounds } from "_components/Audio/useSounds";
export const Audio = () => {
const {
selectedRoom,
speakingParticipants,
resetSpeakingParticipants,
isTalking,
@@ -37,8 +38,8 @@ export const Audio = () => {
room,
message,
removeMessage,
setSelectedRoom,
} = useAudioStore();
const [selectedRoom, setSelectedRoom] = useState<string>("VAR_LST_RD_01");
useSounds({
isReceiving: speakingParticipants.length > 0,
@@ -48,7 +49,7 @@ export const Audio = () => {
});
const { selectedStation, status: pilotState } = usePilotConnectionStore((state) => state);
const { selectedZone, status: dispatcherState } = useDispatchConnectionStore((state) => state);
const { status: dispatcherState } = useDispatchConnectionStore((state) => state);
const session = useSession();
const [isReceivingBlick, setIsReceivingBlick] = useState(false);
const [recentSpeakers, setRecentSpeakers] = useState<typeof speakingParticipants>([]);
@@ -93,7 +94,7 @@ export const Audio = () => {
const canStopOtherSpeakers = dispatcherState === "connected";
const role =
(dispatcherState === "connected" && selectedZone) ||
(dispatcherState === "connected" && "VAR LST") ||
(pilotState == "connected" && selectedStation?.bosCallsignShort) ||
session.data?.user?.publicId;
@@ -190,9 +191,9 @@ export const Audio = () => {
className="btn btn-sm btn-ghost relative flex items-center justify-start gap-2 text-left"
onClick={() => {
if (!role) return;
if (selectedRoom === r.name) return;
setSelectedRoom(r.name);
connect(r.name, role);
if (selectedRoom?.name === r.name) return;
setSelectedRoom(r);
connect(r, role);
}}
>
{room?.name === r.name && (