Initial GSX Sync for fuel

This commit is contained in:
2026-02-13 02:50:43 +01:00
parent 122a93461d
commit 69680ced03
20 changed files with 153 additions and 62 deletions
@@ -1,6 +1,6 @@
import { FC, useEffect, useState } from 'react';
import { LoadingState } from '../../types/general';
import { GSXLoadingState, WASMDataPax } from '../../types/WASMData';
import { GSXFuelingState, GSXLoadingState, WASMDataPax } from '../../types/WASMData';
import OptionsPax from '../options/OptionsPax';
import Profile from '../profile/Profile';
import SBEntryPax from '../SBEntry/SBEntryPax';
@@ -65,6 +65,9 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
WASMData.GSX.loadingState !== GSXLoadingState.DEBOARDED
);
};
const GSXFuelActive = () => {
return WASMData.GSX.couatlStarted && WASMData.GSX.fuelingState !== GSXFuelingState.IDLE;
};
const CGs = (): [string, boolean, string, boolean] => {
if (loadingState !== 'loaded' && !GSXActive()) {
@@ -134,6 +137,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
loadingState={loadingState}
setLoadingState={setLoadingState}
gsxActive={GSXActive()}
gsxFuelActive={GSXFuelActive()}
/>
)}
{((username && selectedTab === 1) || (!username && selectedTab === 0)) && (
@@ -142,6 +146,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
loadingState={loadingState}
setLoadingState={setLoadingState}
gsxActive={GSXActive()}
gsxFuelActive={GSXFuelActive()}
/>
)}
{((username && selectedTab === 2) || (!username && selectedTab === 1)) && (
@@ -150,6 +155,7 @@ const Pax: FC<PaxProps> = ({ WASMData, username }) => {
loadingState={loadingState}
setLoadingState={setLoadingState}
gsxActive={GSXActive()}
gsxFuelActive={GSXFuelActive()}
/>
)}
{((username && selectedTab === 3) || (!username && selectedTab === 2)) && (