HPG Warnung in Dispatch Settings, Status Notification
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { GearIcon } from "@radix-ui/react-icons";
|
||||
import { SettingsIcon, Volume2 } from "lucide-react";
|
||||
import { Info, SettingsIcon, Volume2 } from "lucide-react";
|
||||
import MicVolumeBar from "_components/MicVolumeIndication";
|
||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { editUserAPI, getUserAPI } from "_querys/user";
|
||||
@@ -27,7 +27,6 @@ export const SettingsBtn = () => {
|
||||
onSuccess: async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ["user", session.data?.user.id] });
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -82,10 +81,14 @@ export const SettingsBtn = () => {
|
||||
useEffect(() => {
|
||||
const setDevices = async () => {
|
||||
if (typeof navigator !== "undefined" && navigator.mediaDevices?.enumerateDevices) {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ video: false, audio: true });
|
||||
const devices = await navigator.mediaDevices.enumerateDevices();
|
||||
setInputDevices(devices.filter((d) => d.kind === "audioinput"));
|
||||
stream.getTracks().forEach((track) => track.stop());
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ video: false, audio: true });
|
||||
const devices = await navigator.mediaDevices.enumerateDevices();
|
||||
setInputDevices(devices.filter((d) => d.kind === "audioinput"));
|
||||
stream.getTracks().forEach((track) => track.stop());
|
||||
} catch (error) {
|
||||
console.error("Error accessing media devices.", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -214,7 +217,18 @@ export const SettingsBtn = () => {
|
||||
setSettingsPartial({ useHPGAsDispatcher: e.target.checked });
|
||||
}}
|
||||
/>
|
||||
HPG als Disponent verwenden
|
||||
HPG Validierung verwenden{" "}
|
||||
<div
|
||||
className="tooltip tooltip-warning"
|
||||
data-tip="Achtung! Mit der Client Version v2.0.1.0 werden Einsätze auch ohne Validierung an die
|
||||
HPG gesendet. Die Validierung über die HPG kann zu Verzögerungen bei der
|
||||
Einsatzübermittlung führen, insbesondere wenn das HPG script den Einsatz nicht sofort
|
||||
validieren kann. Es wird empfohlen, diese Option nur zu aktivieren, wenn es Probleme
|
||||
mit der Einsatzübermittlung gibt oder wenn die HPG Validierung ausdrücklich gewünscht
|
||||
wird."
|
||||
>
|
||||
<Info className="text-error" size={16} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="modal-action flex justify-between">
|
||||
|
||||
Reference in New Issue
Block a user