@@ -199,7 +198,7 @@ export const FlightWidget = () => {
-
+
{departingAirport}
/
{departingRunway}
@@ -207,7 +206,7 @@ export const FlightWidget = () => {
{' '}
{route}
{' '}
-
+
{arrivingAirport}
/
{arrivingRunway}
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N/A21NLEAPOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N/A21NLEAPOverview.tsx
index 1db13c9d..8f7ec46e 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N/A21NLEAPOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N/A21NLEAPOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NLEAPOverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251NX/A21NLEAPFLEXOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251NX/A21NLEAPFLEXOverview.tsx
index 1db13c9d..8f7ec46e 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251NX/A21NLEAPFLEXOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251NX/A21NLEAPFLEXOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NLEAPOverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N_LR/A21NLEAPLROverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N_LR/A21NLEAPLROverview.tsx
index 0320705b..4c18a8cf 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N_LR/A21NLEAPLROverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_251N_LR/A21NLEAPLROverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NLEAPLROverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N/A21NPWOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N/A21NPWOverview.tsx
index 5d00e401..c7ff9cb1 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N/A21NPWOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N/A21NPWOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NPWOverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271NX/A21NPWFLEXOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271NX/A21NPWFLEXOverview.tsx
index 5d00e401..c7ff9cb1 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271NX/A21NPWFLEXOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271NX/A21NPWFLEXOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NPWOverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N_LR/A21NPWLROverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N_LR/A21NPWLROverview.tsx
index 6b66ad2f..41d20e71 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N_LR/A21NPWLROverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A21N_271N_LR/A21NPWLROverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A21NPWLROverviewPage = () => {
};
return (
-
+
Airbus A321neo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318CJ_115/A318ACJOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318CJ_115/A318ACJOverview.tsx
index 554bbbab..f101c0f4 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318CJ_115/A318ACJOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318CJ_115/A318ACJOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A318ACJOverviewPage = () => {
};
return (
-
+
Airbus ACJ318ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318_115/A318Overview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318_115/A318Overview.tsx
index 9be4f3ac..1a91b9cf 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318_115/A318Overview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A318_115/A318Overview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A318OverviewPage = () => {
};
return (
-
+
Airbus A318ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_115/A319CFMACJOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_115/A319CFMACJOverview.tsx
index 86e07662..8fdd9617 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_115/A319CFMACJOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_115/A319CFMACJOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A319CFMACJOverviewPage = () => {
};
return (
-
+
Airbus ACJ319ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_133/A319IAEACJOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_133/A319IAEACJOverview.tsx
index 5759a769..44f44b00 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_133/A319IAEACJOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319CJ_133/A319IAEACJOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A319IAEACJOverviewPage = () => {
};
return (
-
+
Airbus ACJ319ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_115/A319CFMOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_115/A319CFMOverview.tsx
index 8eb3795a..286a7ddb 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_115/A319CFMOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_115/A319CFMOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A319CFMOverviewPage = () => {
};
return (
-
+
Airbus A319ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_133/A319IAEOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_133/A319IAEOverview.tsx
index 2491e75e..8d560044 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_133/A319IAEOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A319_133/A319IAEOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A319IAEOverviewPage = () => {
};
return (
-
+
Airbus A319ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_214/A320CFMOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_214/A320CFMOverview.tsx
index 471a59f1..a79caa78 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_214/A320CFMOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_214/A320CFMOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -27,7 +25,7 @@ const InformationEntry: FC = ({ children, title, info })
export const A320CFMOverviewPage = () => {
let [airline] = useSimVar('ATC AIRLINE', 'String', 1_000);
- airline ||= 'Horizon Simulations';
+ airline ||= 'Horizon Simulations'; //DO NOT TOUCH
const [actualGrossWeight] = useSimVar('TOTAL WEIGHT', 'kilograms', 5_000);
const getConvertedInfo = (metricValue: number, unitType: 'weight' |'volume' |'distance') => {
@@ -45,15 +43,15 @@ export const A320CFMOverviewPage = () => {
};
return (
-
+
Airbus A320ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_232/A320IAEOverview.tsx b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_232/A320IAEOverview.tsx
index 858e4a8f..97bfa79c 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_232/A320IAEOverview.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Dispatch/Pages/Overview/A320_232/A320IAEOverview.tsx
@@ -1,13 +1,11 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
import React, { FC } from 'react';
import { IconPlane } from '@tabler/icons';
import { Box, LightningFill, PeopleFill, Rulers, Speedometer2 } from 'react-bootstrap-icons';
import { useSimVar, Units } from '@flybywiresim/fbw-sdk';
-import { t } from '../../../../translation';
-import { NoseOutline } from '../../../../Assets/NoseOutline';
+import { t, A320NoseOutline } from '@flybywiresim/flypad';
interface InformationEntryProps {
title: string;
@@ -45,15 +43,15 @@ export const A320IAEOverviewPage = () => {
};
return (
-
+
Airbus A320ceo
{airline}
-
-
+
-
+
diff --git a/hsim-common/src/systems/instruments/src/EFB/Efb.tsx b/hsim-common/src/systems/instruments/src/EFB/Efb.tsx
index 1860495b..174d9ca7 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Efb.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Efb.tsx
@@ -1,33 +1,52 @@
-// Copyright (c) 2022 FlyByWire Simulations
+// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0
+import {
+ FailureDefinition,
+ NavigraphClient,
+ SENTRY_CONSENT_KEY,
+ SentryConsentState,
+ useInteractionEvent,
+ useInterval,
+ usePersistentNumberProperty, usePersistentProperty,
+ useSimVar,
+} from '@flybywiresim/fbw-sdk';
+import { distanceTo } from 'msfs-geo';
import React, { useEffect, useState } from 'react';
-import { useSimVar, useInterval, useInteractionEvent, usePersistentNumberProperty, usePersistentProperty, NavigraphClient } from '@flybywiresim/fbw-sdk';
-import { Redirect, Route, Switch, useHistory } from 'react-router-dom';
import { Battery } from 'react-bootstrap-icons';
-import { ToastContainer } from 'react-toastify';
-import { distanceTo } from 'msfs-geo';
-import { Tooltip } from './UtilComponents/TooltipWrapper';
-import { HSLogo } from './UtilComponents/HSLogo';
-import { AlertModal, ModalContainer, useModals } from './UtilComponents/Modals/Modals';
+import { ErrorBoundary } from 'react-error-boundary';
+import { Provider } from 'react-redux';
+import { MemoryRouter as Router } from 'react-router';
+import { Redirect, Route, Switch, useHistory } from 'react-router-dom';
+import { ToastContainer, toast } from 'react-toastify';
+import { ATC } from './ATC/ATC';
import { NavigraphContext } from './Apis/Navigraph/Navigraph';
-import { StatusBar } from './StatusBar/StatusBar';
-import { ToolBar } from './ToolBar/ToolBar';
+import { Error as ErrorIcon } from './Assets/Error';
+import { Checklists, setAutomaticItemStates } from './Checklists/Checklists';
+import { CHECKLISTS } from './Checklists/Lists';
import { Dashboard } from './Dashboard/Dashboard';
import { Dispatch } from './Dispatch/Dispatch';
+import { Failures } from './Failures/Failures';
import { Ground } from './Ground/Ground';
-import { Performance } from './Performance/Performance';
import { Navigation } from './Navigation/Navigation';
-import { ATC } from './ATC/ATC';
-import { Settings } from './Settings/Settings';
-import { Failures } from './Failures/Failures';
+import { Performance } from './Performance/Performance';
import { Presets } from './Presets/Presets';
-import { clearEfbState, useAppDispatch, useAppSelector } from './Store/store';
-import { setFlightPlanProgress } from './Store/features/flightProgress';
-import { Checklists, setAutomaticItemStates } from './Checklists/Checklists';
-import { CHECKLISTS } from './Checklists/Lists';
-import { setChecklistItems } from './Store/features/checklists';
import { FlyPadPage } from './Settings/Pages/FlyPadPage';
+import { Settings } from './Settings/Settings';
+import { StatusBar } from './StatusBar/StatusBar';
+import { setChecklistItems } from './Store/features/checklists';
+import { setFlightPlanProgress } from './Store/features/flightProgress';
+import { fetchSimbriefDataAction, isSimbriefDataLoaded } from './Store/features/simBrief';
+import { clearEfbState, store, useAppDispatch, useAppSelector } from './Store/store';
+import { ToolBar } from './ToolBar/ToolBar';
+import { HSLogo } from './UtilComponents/HSLogo';
+import { AlertModal, ModalContainer, ModalProvider, useModals } from './UtilComponents/Modals/Modals';
+import { Tooltip } from './UtilComponents/TooltipWrapper';
+import { FailuresOrchestratorProvider } from './failures-orchestrator-provider';
+
+import './Assets/Efb.scss';
+import './Assets/Slider.scss';
+import './Assets/Theme.css';
import 'react-toastify/dist/ReactToastify.css';
import './toast.css';
@@ -36,13 +55,13 @@ const BATTERY_DURATION_CHARGE_MIN = 180;
const BATTERY_DURATION_DISCHARGE_MIN = 540;
const LoadingScreen = () => (
-
+
);
const EmptyBatteryScreen = () => (
-
+
);
@@ -71,9 +90,12 @@ interface BatteryStatus {
export const usePower = () => React.useContext(PowerContext);
-export const getAirframeType = () => new URL(document.querySelectorAll('vcockpit-panel > *')[0].getAttribute('url')).searchParams.get('Airframe');
+// this returns either `A380_842` or `A320_251N` depending on the aircraft
+export const getAirframeType = () => new URL(
+ document.querySelectorAll('vcockpit-panel > *')[0].getAttribute('url'),
+).searchParams.get('Airframe');
-const Efb = () => {
+export const Efb = () => {
const [powerState, setPowerState] = useState
(PowerStates.SHUTOFF);
const [absoluteTime] = useSimVar('E:ABSOLUTE TIME', 'seconds', 5000);
const [, setBrightness] = useSimVar('L:A32NX_EFB_BRIGHTNESS', 'number');
@@ -84,6 +106,10 @@ const Efb = () => {
const [navigraph] = useState(() => new NavigraphClient());
const dispatch = useAppDispatch();
+ const simbriefData = useAppSelector((state) => state.simbrief.data);
+ const [navigraphUsername] = usePersistentProperty('NAVIGRAPH_USERNAME');
+ const [overrideSimBriefUserID] = usePersistentProperty('CONFIG_OVERRIDE_SIMBRIEF_USERID');
+ const [autoSimbriefImport] = usePersistentProperty('CONFIG_AUTO_SIMBRIEF_IMPORT');
const [dc2BusIsPowered] = useSimVar('L:A32NX_ELEC_DC_2_BUS_IS_POWERED', 'bool');
const [batteryLevel, setBatteryLevel] = useState({
@@ -193,6 +219,14 @@ const Efb = () => {
}));
});
}
+
+ if ((!simbriefData || !isSimbriefDataLoaded()) && autoSimbriefImport === 'ENABLED') {
+ fetchSimbriefDataAction(navigraphUsername ?? '', overrideSimBriefUserID ?? '').then((action) => {
+ dispatch(action);
+ }).catch((e) => {
+ toast.error(e.message);
+ });
+ }
}
}, [powerState]);
@@ -343,4 +377,70 @@ const Efb = () => {
}
};
-export default Efb;
+interface ErrorFallbackProps {
+ resetErrorBoundary: (...args: Array) => void;
+}
+
+export const ErrorFallback = ({ resetErrorBoundary }: ErrorFallbackProps) => {
+ const [sessionId] = usePersistentProperty('A32NX_SENTRY_SESSION_ID');
+ const [sentryEnabled] = usePersistentProperty(SENTRY_CONSENT_KEY, SentryConsentState.Refused);
+
+ return (
+
+
+
+
+
A critical error has been encountered.
+
+
You are able to reset this tablet to recover from this error.
+
+ {sentryEnabled === SentryConsentState.Given && (
+ <>
+
+ You have opted into anonymous error reporting and this issue has been relayed to us. If you want immediate support,
+ please share the following code to a member of staff in the #support channel on the FlyByWire Discord server:
+
+
+
{sessionId}
+ >
+ )}
+
+
+
Reset Display
+
+
+
+
+ );
+};
+
+export interface EfbInstrumentProps {
+ failures: FailureDefinition[],
+}
+
+export const EfbInstrument: React.FC = ({ failures }) => {
+ const [, setSessionId] = usePersistentProperty('A32NX_SENTRY_SESSION_ID');
+
+ useEffect(
+ () => () => setSessionId(''), [],
+ );
+
+ const [err, setErr] = useState(false);
+
+ return (
+
+ setErr(false)} resetKeys={[err]}>
+
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Ground.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Ground.tsx
index 1b3ec288..eb17a7fd 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Ground/Ground.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Ground.tsx
@@ -1,24 +1,18 @@
-import React from 'react';
-import { t } from '../translation';
-import { PageLink, PageRedirect, TabRoutes } from '../Utils/routing';
-import { Navbar } from '../UtilComponents/Navbar';
-import { ServicesPage } from './Pages/ServicesPage';
-import { PushbackPage } from './Pages/PushbackPage';
-import { FuelPage } from './Pages/FuelPage';
-import { Payload } from './Pages/Payload/Payload';
+// Copyright (c) 2023-2024 FlyByWire Simulations
+// SPDX-License-Identifier: GPL-3.0
-export interface StatefulButton {
- id: string,
- state: string,
- callBack,
- value: number,
-}
+import { Navbar, PageLink, PageRedirect, TabRoutes, t } from '@flybywiresim/flypad';
+import React from 'react';
+import { Fuel } from './Pages/Fuel/Fuel';
+import { PayloadPage } from './Pages/Payload/PayloadPage';
+import { PushbackPage } from './Pages/Pushback/PushbackPage';
+import { ServicesPage } from './Pages/Services/ServicesPage';
export const Ground = () => {
const tabs: PageLink[] = [
{ name: 'Services', alias: t('Ground.Services.Title'), component: },
- { name: 'Fuel', alias: t('Ground.Fuel.Title'), component: },
- { name: 'Payload', alias: t('Ground.Payload.Title'), component: },
+ { name: 'Fuel', alias: t('Ground.Fuel.Title'), component: },
+ { name: 'Payload', alias: t('Ground.Payload.Title'), component: },
{ name: 'Pushback', alias: t('Ground.Pushback.Title'), component: },
];
@@ -27,7 +21,7 @@ export const Ground = () => {
{t('Ground.Title')}
diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/FuelPage.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx
similarity index 96%
rename from hsim-common/src/systems/instruments/src/EFB/Ground/Pages/FuelPage.tsx
rename to hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx
index 020bac8c..e5d703dd 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/FuelPage.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx
@@ -1,23 +1,19 @@
-// Copyright (c) 2021-2023 FlyByWire Simulations
-//
-// SPDX-License-Identifier: GPL-3.0
-
/* eslint-disable max-len */
import React, { useState } from 'react';
-import { getAirframeType } from '../../Efb'; //DO NOT REMOVE UNDER ANY CIRCUMSTANCES
-import { Fuel } from './Fuel/Constants' //DO NOT REMOVE UNDER ANY CIRCUMSTANCES
+import { getAirframeType } from '../../../Efb'; //DO NOT REMOVE UNDER ANY CIRCUMSTANCES
+import { Fuel } from './Constants' //DO NOT REMOVE UNDER ANY CIRCUMSTANCES
import { round } from 'lodash';
import { CloudArrowDown, PlayFill, StopCircleFill } from 'react-bootstrap-icons';
import { useSimVar, Units, usePersistentNumberProperty, usePersistentProperty } from '@flybywiresim/fbw-sdk';
import Slider from 'rc-slider';
-import { t } from '../../translation';
-import { TooltipWrapper } from '../../UtilComponents/TooltipWrapper';
-import { isSimbriefDataLoaded } from '../../Store/features/simBrief';
-import { useAppSelector } from '../../Store/store';
-import { SelectGroup, SelectItem } from '../../UtilComponents/Form/Select';
-import { ProgressBar } from '../../UtilComponents/Progress/Progress';
-import { SimpleInput } from '../../UtilComponents/Form/SimpleInput/SimpleInput';
-import { OverWingOutline } from '../../Assets/OverWingOutline';
+import { t } from '../../../translation';
+import { TooltipWrapper } from '../../../UtilComponents/TooltipWrapper';
+import { isSimbriefDataLoaded } from '../../../Store/features/simBrief';
+import { useAppSelector } from '../../../Store/store';
+import { SelectGroup, SelectItem } from '../../../UtilComponents/Form/Select';
+import { ProgressBar } from '../../../UtilComponents/Progress/Progress';
+import { SimpleInput } from '../../../UtilComponents/Form/SimpleInput/SimpleInput';
+import { OverWingOutline } from '../../../Assets/OverWingOutline';
interface TankReadoutProps {
title: string;
diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/A21N_251N/A21NPayload.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/A21N_251N/A21NPayload.tsx
index bdbb1840..7d590f24 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/A21N_251N/A21NPayload.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/A21N_251N/A21NPayload.tsx
@@ -1,19 +1,20 @@
+// Copyright (c) 2023-2024 FlyByWire Simulations
+// SPDX-License-Identifier: GPL-3.0
+
/* eslint-disable max-len */
+import { SeatFlags, Units, usePersistentNumberProperty, usePersistentProperty, useSeatFlags, useSimVar } from '@flybywiresim/fbw-sdk';
+import { Card, PromptModal, SelectGroup, SelectItem, TooltipWrapper, t, useModals } from '@flybywiresim/flypad';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { CloudArrowDown } from 'react-bootstrap-icons';
-import { SeatFlags, Units, usePersistentNumberProperty, usePersistentProperty, useSeatFlags, useSimVar } from '@flybywiresim/fbw-sdk';
-import { SeatOutlineBg } from 'instruments/src/EFB/Assets/SeatOutlineBg';
-import { BoardingInput, MiscParamsInput, PayloadInputTable } from '../PayloadElements';
-import { CargoWidget } from './CargoWidget';
+import { SeatOutlineBg } from '../../../../Assets/SeatOutlineBg';
import { ChartWidget } from '../Chart/ChartWidget';
+import { BoardingInput, MiscParamsInput, PayloadInputTable } from '../PayloadElements';
import { CargoStationInfo, PaxStationInfo } from '../Seating/Constants';
-import { t } from '../../../../translation';
-import { TooltipWrapper } from '../../../../UtilComponents/TooltipWrapper';
+import { CargoWidget } from './CargoWidget';
+
import Loadsheet from './a21nwv071.json';
-import Card from '../../../../UtilComponents/Card/Card';
-import { SelectGroup, SelectItem } from '../../../../UtilComponents/Form/Select';
+
import { SeatMapWidget } from './SeatMapWidget';
-import { PromptModal, useModals } from '../../../../UtilComponents/Modals/Modals';
interface A320Props {
simbriefUnits: string,
@@ -493,17 +494,17 @@ export const A21NLEAPPayload: React.FC
= ({
-
-
-
-
-
+
+
+
+
= ({
setDisplayZfw={setDisplayZfw}
/>
-
+
= ({
&& (
@@ -567,12 +568,12 @@ export const A21NLEAPPayload: React.FC
= ({
)}
{(gsxPayloadSyncEnabled !== 1) && (
-
-
-
+
+
+
{t('Ground.Payload.BoardingTime')}
-
+
(
{remainingTimeString()}
)
@@ -616,12 +617,12 @@ export const A21NLEAPPayload: React.FC = ({
)}
{gsxPayloadSyncEnabled === 1 && (
-
+
{t('Ground.Payload.GSXPayloadSyncEnabled')}
)}
-
+
= ({
-
-
-
-
-
+
+
+
+
= ({
setDisplayZfw={setDisplayZfw}
/>
-
+
= ({
&& (
@@ -567,12 +568,12 @@ export const A21NLEAPFLEXPayload: React.FC
= ({
)}
{(gsxPayloadSyncEnabled !== 1) && (
-
-
-
+
+
+
{t('Ground.Payload.BoardingTime')}
-
+
(
{remainingTimeString()}
)
@@ -616,12 +617,12 @@ export const A21NLEAPFLEXPayload: React.FC = ({
)}
{gsxPayloadSyncEnabled === 1 && (
-
+
{t('Ground.Payload.GSXPayloadSyncEnabled')}
)}
-
+
= ({
-
-
-
-
-
+
+
+
+
= ({
setDisplayZfw={setDisplayZfw}
/>
-
+
= ({
&& (
@@ -567,12 +568,12 @@ export const A21NLEAPLRPayload: React.FC
= ({
)}
{(gsxPayloadSyncEnabled !== 1) && (
-
-
-
+
+
+
{t('Ground.Payload.BoardingTime')}
-
+
(
{remainingTimeString()}
)
@@ -616,12 +617,12 @@ export const A21NLEAPLRPayload: React.FC = ({
)}
{gsxPayloadSyncEnabled === 1 && (
-
+
{t('Ground.Payload.GSXPayloadSyncEnabled')}
)}
-
+
= ({
-
-
-
-
-
+
+
+
+
= ({
setDisplayZfw={setDisplayZfw}
/>
-
+
= ({
&& (
@@ -567,12 +568,12 @@ export const A21NPWPayload: React.FC
= ({
)}
{(gsxPayloadSyncEnabled !== 1) && (
-
-
-
+
+
+
{t('Ground.Payload.BoardingTime')}
-
+
(
{remainingTimeString()}
)
@@ -616,12 +617,12 @@ export const A21NPWPayload: React.FC = ({
)}
{gsxPayloadSyncEnabled === 1 && (
-
+
{t('Ground.Payload.GSXPayloadSyncEnabled')}
)}
-
+
= ({
-
-
-
-
-
+
+
+
+
= ({
setDisplayZfw={setDisplayZfw}
/>
-
+
= ({
&& (
@@ -567,12 +568,12 @@ export const A21NPWFLEXPayload: React.FC
= ({
)}
{(gsxPayloadSyncEnabled !== 1) && (
-
-
-
+
+
+
{t('Ground.Payload.BoardingTime')}
-
+
(
{remainingTimeString()}
)
@@ -616,12 +617,12 @@ export const A21NPWFLEXPayload: React.FC = ({
)}
{gsxPayloadSyncEnabled === 1 && (
-
+
{t('Ground.Payload.GSXPayloadSyncEnabled')}
)}
-