Special-OPS, Scroll-Bug in Aircraft Marker

This commit is contained in:
PxlLoewe
2025-07-24 13:30:54 -07:00
parent 41e38f0f72
commit ca299f52e5
7 changed files with 15 additions and 10 deletions

View File

@@ -13,7 +13,7 @@ export const useSounds = () => {
useEffect(() => {
if (typeof window !== "undefined") {
newMissionSound.current = new Audio("/sounds/Melder3.wav");
newMissionSound.current = new Audio("/sounds/DME-new-mission.wav");
}
}, []);

View File

@@ -37,7 +37,7 @@ const AircraftPopupContent = ({
);
const { data: missions } = useQuery({
queryKey: ["missions", "missions-map"],
queryKey: ["missions", "missions-aircraft-marker", aircraft.id],
queryFn: () =>
getMissionsAPI({
state: "running",
@@ -159,7 +159,7 @@ const AircraftPopupContent = ({
{aircraft.fmsStatus}
</div>
<div
className="min-w-[130px] cursor-pointer px-2"
className="cursor-pointer px-2"
style={{
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
borderBottom:
@@ -179,10 +179,11 @@ const AircraftPopupContent = ({
{aircraft.Station.bosUse === "DUAL_USE" && "(dual use)"}
{aircraft.Station.bosUse === "PRIMARY" && "(primär)"}
{aircraft.Station.bosUse === "SECONDARY" && "(sekundär)"}
{aircraft.Station.bosUse === "SPECIAL_OPS" && "(Special OPS)"}
</span>
</div>
<div
className="w-150 cursor-pointer px-2"
className="flex-1 cursor-pointer overflow-x-hidden px-2"
style={{
backgroundColor: `${FMS_STATUS_COLORS[aircraft.fmsStatus]}`,
borderBottom:
@@ -195,9 +196,10 @@ const AircraftPopupContent = ({
>
<span className="text-base font-medium text-white">Einsatz</span>
<br />
<span className="text-sm font-medium text-white">
{mission?.publicId || "kein Einsatz"}
</span>
{!mission?.publicId && <span className="text-sm text-gray-400">Kein Einsatz</span>}
{mission?.publicId && (
<span className="text-sm font-medium text-white">{mission.publicId}</span>
)}
</div>
<div
className="flex cursor-pointer items-center justify-center px-4"
@@ -372,7 +374,7 @@ const AircraftMarker = ({ aircraft }: { aircraft: ConnectedAircraft & { Station:
closeOnClick={false}
autoPan={false}
wrapperClassName="relative"
className="w-[502px]"
className="w-[512px]"
>
<div style={{ height: "auto", maxHeight: "90vh", overflowY: "auto" }}>
<AircraftPopupContent aircraft={aircraft} />

View File

@@ -26,7 +26,7 @@ export const SettingsBtn = () => {
useEffect(() => {
if (typeof window !== "undefined") {
testSoundRef.current = new Audio("/sounds/Melder3.wav");
testSoundRef.current = new Audio("/sounds/DME-new-mission.wav");
}
}, []);

View File

@@ -203,7 +203,7 @@ export const useAudioStore = create<TalkState>((set, get) => ({
set({ state: "connected", room, message: null });
})
.on(RoomEvent.Disconnected, () => {
set({ state: "disconnected" });
set({ state: "disconnected", speakingParticipants: [], transmitBlocked: false });
handleDisconnect();
})