GSX Synced boarding/deboarding

This commit is contained in:
2025-06-14 03:34:22 +02:00
parent f7304c5c7b
commit c394cd4d7b
13 changed files with 260 additions and 69 deletions
@@ -4,16 +4,17 @@ import { LoadingState } from '../../types/general';
interface ActionBarProps {
loadingState: LoadingState;
loadDisabled: boolean;
GSXSync: boolean;
GSXActive: boolean;
importSB?: () => void;
load: () => void;
unload: () => void;
}
const ActionBar: FC<ActionBarProps> = ({ loadingState, loadDisabled, importSB, load, unload }) => {
const ActionBar: FC<ActionBarProps> = ({ loadingState, loadDisabled, GSXSync, GSXActive, importSB, load, unload }) => {
return (
<div className="relative flex w-full items-center justify-start gap-x-6">
{/*TODO: HIDE FOR GSX SYNCED */}
{loadingState === 'preview' && (
{loadingState === 'preview' && !GSXSync && (
<button
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
@@ -23,8 +24,7 @@ const ActionBar: FC<ActionBarProps> = ({ loadingState, loadDisabled, importSB, l
Load
</button>
)}
{/*TODO: HIDE FOR GSX SYNCED */}
{loadingState === 'loaded' && (
{loadingState === 'loaded' && !GSXSync && (
<button
className="middle none center rounded-lg bg-red-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-red-500/20 transition-all hover:shadow-lg hover:shadow-red-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
@@ -41,6 +41,7 @@ const ActionBar: FC<ActionBarProps> = ({ loadingState, loadDisabled, importSB, l
className="middle none center rounded-lg bg-green-600 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none"
data-ripple-light="true"
onClick={importSB}
disabled={GSXActive}
>
Import from SimBrief
</button>