diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/index.tsx | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/index.tsx b/src/index.tsx index 4162cf7..18fb0a5 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -87,16 +87,27 @@ function FGModInstallerSection() { return ( <PanelSection title="FG Mod Installer"> - <PanelSectionRow> - <ButtonItem layout="below" onClick={handleInstallClick} disabled={installing}> - {installing ? "Installing..." : "Install FG Mod"} - </ButtonItem> - </PanelSectionRow> - <PanelSectionRow> - <ButtonItem layout="below" onClick={handleUninstallClick} disabled={uninstalling}> - {uninstalling ? "Uninstalling..." : "Uninstall FG Mod"} - </ButtonItem> - </PanelSectionRow> + {pathExists !== null && ( + <PanelSectionRow> + <div style={{ color: pathExists ? "green" : "red" }}> + {pathExists ? "Mod Is Installed" : "Mod Not Installed"} + </div> + </PanelSectionRow> + )} + {pathExists === false && ( + <PanelSectionRow> + <ButtonItem layout="below" onClick={handleInstallClick} disabled={installing}> + {installing ? "Installing..." : "Install FG Mod"} + </ButtonItem> + </PanelSectionRow> + )} + {pathExists === true && ( + <PanelSectionRow> + <ButtonItem layout="below" onClick={handleUninstallClick} disabled={uninstalling}> + {uninstalling ? "Uninstalling..." : "Uninstall FG Mod"} + </ButtonItem> + </PanelSectionRow> + )} {installResult && ( <PanelSectionRow> <div> @@ -137,13 +148,6 @@ function FGModInstallerSection() { </div> </PanelSectionRow> )} - {pathExists !== null && ( - <PanelSectionRow> - <div style={{ color: pathExists ? "green" : "red" }}> - {pathExists ? "Mod Is Installed" : "Mod Not Installed"} - </div> - </PanelSectionRow> - )} <PanelSectionRow> <div> Once the patch is installed, launch your game, press "Set Launch Options" below, then restart the game! |
