From 28de5d077c1ca98325cca76b756f2afd486403a6 Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 23 Jan 2025 18:40:59 -0500 Subject: swap install and uninstall buttons depending on state --- src/index.tsx | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'src/index.tsx') 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 ( - - - {installing ? "Installing..." : "Install FG Mod"} - - - - - {uninstalling ? "Uninstalling..." : "Uninstall FG Mod"} - - + {pathExists !== null && ( + +
+ {pathExists ? "Mod Is Installed" : "Mod Not Installed"} +
+
+ )} + {pathExists === false && ( + + + {installing ? "Installing..." : "Install FG Mod"} + + + )} + {pathExists === true && ( + + + {uninstalling ? "Uninstalling..." : "Uninstall FG Mod"} + + + )} {installResult && (
@@ -137,13 +148,6 @@ function FGModInstallerSection() {
)} - {pathExists !== null && ( - -
- {pathExists ? "Mod Is Installed" : "Mod Not Installed"} -
-
- )}
Once the patch is installed, launch your game, press "Set Launch Options" below, then restart the game! -- cgit v1.2.3