Startup behaviour

This commit is contained in:
Kilian Hofmann 2025-09-15 00:56:35 +02:00
parent acf4b9ee47
commit ee43ae9363
5 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "tfdidesign-md11-load-manager", "name": "tfdidesign-md11-load-manager",
"version": "0.1.141", "version": "0.1.142",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"type": "module", "type": "module",

View File

@ -8,12 +8,10 @@ import { CommBusCall, CommBusEvent } from './types/general';
const App: FC = () => { const App: FC = () => {
const [SBUsername, setSBUsername] = useState<string>(); const [SBUsername, setSBUsername] = useState<string>();
const [WASMData, setWASMData] = useState<WASMDataPax | WASMDataF>(); const [WASMData, setWASMData] = useState<WASMDataPax | WASMDataF>();
const [isReady, setIsReady] = useState(false);
// CommBus // CommBus
const usernameCallback = useCallback((username: string) => { const usernameCallback = useCallback((username: string) => {
setSBUsername(username); setSBUsername(username);
setIsReady(true);
}, []); }, []);
const wasmCallback = useCallback((data: string) => { const wasmCallback = useCallback((data: string) => {
setWASMData(JSON.parse(data)); setWASMData(JSON.parse(data));
@ -45,7 +43,7 @@ const App: FC = () => {
return ( return (
<div className="flex w-full justify-center py-5 bg-zinc-900"> <div className="flex w-full justify-center py-5 bg-zinc-900">
<div className="flex w-3/4 flex-col items-center"> <div className="flex w-3/4 flex-col items-center">
{isReady && WASMData ? ( {WASMData ? (
WASMData.userData.isCargo ? ( WASMData.userData.isCargo ? (
<Freighter WASMData={WASMData as WASMDataF} username={SBUsername} /> <Freighter WASMData={WASMData as WASMDataF} username={SBUsername} />
) : ( ) : (

View File

@ -10,8 +10,8 @@
| kessler | stuff | @rollup/plugin-replace | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 6.0.2 | 6.0.2 | ^6.0.2 | Rich Harris <richard.a.harris@gmail.com> | | kessler | stuff | @rollup/plugin-replace | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 6.0.2 | 6.0.2 | ^6.0.2 | Rich Harris <richard.a.harris@gmail.com> |
| kessler | stuff | @rollup/plugin-terser | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 0.4.4 | 0.4.4 | ^0.4.4 | Peter Placzek <peter.placzek1996@gmail.com> | | kessler | stuff | @rollup/plugin-terser | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 0.4.4 | 0.4.4 | ^0.4.4 | Peter Placzek <peter.placzek1996@gmail.com> |
| kessler | stuff | @rollup/plugin-typescript | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 12.1.4 | 12.1.2 | ^12.1.2 | Oskar Segersvärd | | kessler | stuff | @rollup/plugin-typescript | perpetual | material | MIT | git+https://github.com/rollup/plugins.git | 12.1.4 | 12.1.2 | ^12.1.2 | Oskar Segersvärd |
| kessler | stuff | @types/node | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 24.3.1 | 24.3.1 | ^24.3.1 | n/a | | kessler | stuff | @types/node | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 24.4.0 | 24.3.1 | ^24.3.1 | n/a |
| kessler | stuff | @types/react | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.12 | 19.1.6 | ^19.1.6 | n/a | | kessler | stuff | @types/react | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.13 | 19.1.6 | ^19.1.6 | n/a |
| kessler | stuff | @types/react-dom | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.9 | 19.1.6 | ^19.1.6 | n/a | | kessler | stuff | @types/react-dom | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 19.1.9 | 19.1.6 | ^19.1.6 | n/a |
| kessler | stuff | @types/uuid | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 10.0.0 | 10.0.0 | ^10.0.0 | n/a | | kessler | stuff | @types/uuid | perpetual | material | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped.git | 10.0.0 | 10.0.0 | ^10.0.0 | n/a |
| kessler | stuff | @typescript-eslint/eslint-plugin | perpetual | material | MIT | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.21.0 | n/a | | kessler | stuff | @typescript-eslint/eslint-plugin | perpetual | material | MIT | git+https://github.com/typescript-eslint/typescript-eslint.git | 6.21.0 | 6.21.0 | ^6.21.0 | n/a |

View File

@ -119,7 +119,7 @@ const Freighter: FC<FreighterProps> = ({ WASMData, username }) => {
/> />
<Tabbar <Tabbar
tabs={ tabs={
username ? ['Simbrief', 'ZFW', 'Passengers & Cargo', 'Options'] : ['ZFW', 'Passengers & Cargo', 'Options'] username ? ['Simbrief', 'ZFW', 'Cargo', 'Options'] : ['ZFW', 'Cargo', 'Options']
} }
selectedTab={selectedTab} selectedTab={selectedTab}
setSelectedTab={setSelectedTab} setSelectedTab={setSelectedTab}

View File

@ -32,7 +32,7 @@
/******************************** Constants ********************************/ /******************************** Constants ********************************/
// Module identification // Module identification
#define MODULE_NAME "[KHOFMANN TFDi MD-11 Load Manager] " #define MODULE_NAME "[KHOFMANN TFDi MD-11 Load Manager] "
#define VERSION_STRING "1.5" #define VERSION_STRING "1.6"
// COMM BUS // COMM BUS
#define COMM_BUS_LIVE_DATA_EVENT "khofmann_tfdi_md-11_load_manager_live_data" #define COMM_BUS_LIVE_DATA_EVENT "khofmann_tfdi_md-11_load_manager_live_data"
#define COMM_BUS_UPDATE_TARGET_EVENT "khofmann_tfdi_md-11_load_manager_update_target" #define COMM_BUS_UPDATE_TARGET_EVENT "khofmann_tfdi_md-11_load_manager_update_target"