import React from "react"; import { observer } from "mobx-react"; import { compareVersions } from "eez-studio-shared/util"; import { InstrumentAppStore } from "instrument/window/app-store"; import { BB3Instrument } from "instrument/bb3/objects/BB3Instrument"; import { FirmwareVersionSection } from "instrument/bb3/components/FirmwareVersionSection"; import { ShortcutsSection } from "instrument/bb3/components/ShortcutsSection"; import { ModulesSection } from "instrument/bb3/components/modules-section/ModulesSection"; import { ScriptsSection } from "instrument/bb3/components/scripts-section/ScriptsSection"; import { ListsSection } from "instrument/bb3/components/lists-section/ListsSection"; import { LatestHistoryItemSection } from "instrument/bb3/components/LatestHistoryItemSection"; export const StartPage = observer( ({ appStore, bb3Instrument }: { appStore: InstrumentAppStore; bb3Instrument: BB3Instrument; }) => { const isConnected = bb3Instrument.instrument.isConnected; if (!bb3Instrument.timeOfLastRefresh) { return null; } return (
{isConnected && } {bb3Instrument.mcu.firmwareVersion && ( )} {bb3Instrument.mcu.firmwareVersion && compareVersions( bb3Instrument.mcu.firmwareVersion, "1.0" ) > 0 && ( )}
{isConnected && ( )} {isConnected && ( )}
); } );