Fix Logout time unable
This commit is contained in:
@@ -48,7 +48,7 @@ export const handleConnectDispatch =
|
|||||||
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
|
const connectedDispatcherEntry = await prisma.connectedDispatcher.create({
|
||||||
data: {
|
data: {
|
||||||
publicUser: getPublicUser(user) as any,
|
publicUser: getPublicUser(user) as any,
|
||||||
esimatedLogoutTime: logoffTime,
|
esimatedLogoutTime: logoffTime.length > 0 ? logoffTime : null,
|
||||||
lastHeartbeat: new Date().toISOString(),
|
lastHeartbeat: new Date().toISOString(),
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
zone: selectedZone,
|
zone: selectedZone,
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export const handleConnectPilot =
|
|||||||
const connectedAircraftEntry = await prisma.connectedAircraft.create({
|
const connectedAircraftEntry = await prisma.connectedAircraft.create({
|
||||||
data: {
|
data: {
|
||||||
publicUser: getPublicUser(user) as any,
|
publicUser: getPublicUser(user) as any,
|
||||||
esimatedLogoutTime: logoffTime,
|
esimatedLogoutTime: logoffTime.length > 0 ? logoffTime : null,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
stationId: parseInt(stationId),
|
stationId: parseInt(stationId),
|
||||||
lastHeartbeat: debug ? nowPlus2h.toISOString() : undefined,
|
lastHeartbeat: debug ? nowPlus2h.toISOString() : undefined,
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ const AircraftPopupContent = ({
|
|||||||
return mission ? (
|
return mission ? (
|
||||||
<MissionTab mission={mission} />
|
<MissionTab mission={mission} />
|
||||||
) : (
|
) : (
|
||||||
<div className="flex flex-col items-center justify-center min-h-full">
|
<div className="flex min-h-full flex-col items-center justify-center">
|
||||||
<span className="text-gray-500 my-10 font-semibold">Kein aktiver Einsatz</span>
|
<span className="my-10 font-semibold text-gray-500">Kein aktiver Einsatz</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
case "chat":
|
case "chat":
|
||||||
@@ -77,7 +77,7 @@ const AircraftPopupContent = ({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className="absolute p-1 z-99 top-0 right-0 transform -translate-y-full bg-base-100 cursor-pointer"
|
className="z-99 bg-base-100 absolute right-0 top-0 -translate-y-full transform cursor-pointer p-1"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setOpenAircraftMarker({
|
setOpenAircraftMarker({
|
||||||
open: [],
|
open: [],
|
||||||
@@ -90,7 +90,7 @@ const AircraftPopupContent = ({
|
|||||||
|
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"absolute w-[calc(100%+2px)] h-4 z-99", // As offset is 2px, we need to add 2px to the width
|
"z-99 absolute h-4 w-[calc(100%+2px)]", // As offset is 2px, we need to add 2px to the width
|
||||||
anchor.includes("left") ? "-left-[2px]" : "-right-[2px]",
|
anchor.includes("left") ? "-left-[2px]" : "-right-[2px]",
|
||||||
anchor.includes("top") ? "-top-[2px]" : "-bottom-[2px]",
|
anchor.includes("top") ? "-top-[2px]" : "-bottom-[2px]",
|
||||||
)}
|
)}
|
||||||
@@ -111,13 +111,13 @@ const AircraftPopupContent = ({
|
|||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
className="flex gap-[2px] text-white pb-0.5 overflow-auto"
|
className="flex gap-[2px] overflow-auto pb-0.5 text-white"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_TEXT_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_TEXT_COLORS[aircraft.fmsStatus]}`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="px-3 flex justify-center items-center cursor-pointer"
|
className="flex cursor-pointer items-center justify-center px-3"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
||||||
borderBottom:
|
borderBottom:
|
||||||
@@ -130,7 +130,7 @@ const AircraftPopupContent = ({
|
|||||||
<House className="text-sm" />
|
<House className="text-sm" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="px-4 flex justify-center items-center cursor-pointer"
|
className="flex cursor-pointer items-center justify-center px-4"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
||||||
}}
|
}}
|
||||||
@@ -145,7 +145,7 @@ const AircraftPopupContent = ({
|
|||||||
<ChevronsRightLeft className="text-sm" />
|
<ChevronsRightLeft className="text-sm" />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="flex justify-center items-center text-5xl font-bold px-6 cursor-pointer"
|
className="flex cursor-pointer items-center justify-center px-6 text-5xl font-bold"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
||||||
borderBottom:
|
borderBottom:
|
||||||
@@ -159,7 +159,7 @@ const AircraftPopupContent = ({
|
|||||||
{aircraft.fmsStatus}
|
{aircraft.fmsStatus}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="cursor-pointer px-2 min-w-[130px]"
|
className="min-w-[130px] cursor-pointer px-2"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
||||||
borderBottom:
|
borderBottom:
|
||||||
@@ -169,8 +169,8 @@ const AircraftPopupContent = ({
|
|||||||
}}
|
}}
|
||||||
onClick={() => handleTabChange("aircraft")}
|
onClick={() => handleTabChange("aircraft")}
|
||||||
>
|
>
|
||||||
<span className="text-white text-base font-medium truncate">
|
<span className="truncate text-base font-medium text-white">
|
||||||
{aircraft.Station.bosCallsign.length > 16
|
{aircraft.Station.bosCallsign.length > 15
|
||||||
? aircraft.Station.bosCallsignShort
|
? aircraft.Station.bosCallsignShort
|
||||||
: aircraft.Station.bosCallsign}
|
: aircraft.Station.bosCallsign}
|
||||||
</span>
|
</span>
|
||||||
@@ -193,14 +193,14 @@ const AircraftPopupContent = ({
|
|||||||
}}
|
}}
|
||||||
onClick={() => handleTabChange("mission")}
|
onClick={() => handleTabChange("mission")}
|
||||||
>
|
>
|
||||||
<span className="text-white text-base font-medium">Einsatz</span>
|
<span className="text-base font-medium text-white">Einsatz</span>
|
||||||
<br />
|
<br />
|
||||||
<span className="text-white text-sm font-medium">
|
<span className="text-sm font-medium text-white">
|
||||||
{mission?.publicId || "kein Einsatz"}
|
{mission?.publicId || "kein Einsatz"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="px-4 flex justify-center items-center cursor-pointer"
|
className="flex cursor-pointer items-center justify-center px-4"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
|
||||||
borderBottom:
|
borderBottom:
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
|||||||
const inputStream = await navigator.mediaDevices.getUserMedia({
|
const inputStream = await navigator.mediaDevices.getUserMedia({
|
||||||
audio: {
|
audio: {
|
||||||
deviceId: get().settings.micDeviceId ?? undefined,
|
deviceId: get().settings.micDeviceId ?? undefined,
|
||||||
noiseSuppression: true,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -184,9 +183,8 @@ export const useAudioStore = create<TalkState>((set, get) => ({
|
|||||||
name: "radio-audio",
|
name: "radio-audio",
|
||||||
source: Track.Source.Microphone,
|
source: Track.Source.Microphone,
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
await publishedTrack.mute();
|
||||||
publishedTrack.mute();
|
|
||||||
}, 400);
|
|
||||||
set({ localRadioTrack: publishedTrack });
|
set({ localRadioTrack: publishedTrack });
|
||||||
|
|
||||||
set({ state: "connected", room, message: null });
|
set({ state: "connected", room, message: null });
|
||||||
|
|||||||
Reference in New Issue
Block a user