summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-23 12:50:33 -0500
committerxXJSONDeruloXx <danielhimebauch@gmail.com>2025-01-23 12:50:33 -0500
commit68d89c0bbcc10c7f692526f91c43c31b7d01c6fd (patch)
tree4111ca23e54dfcb75884b633578b29ad6946e5b9
parentb05d873eb5fa2d4f947e34f5d9eda508162d2c5a (diff)
downloadDecky-Framegen-68d89c0bbcc10c7f692526f91c43c31b7d01c6fd.tar.gz
Decky-Framegen-68d89c0bbcc10c7f692526f91c43c31b7d01c6fd.zip
made install/uninstall status on timer, rewording patch status
-rwxr-xr-xsrc/index.tsx22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 3a54070..390454b 100755
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -50,6 +50,26 @@ function FGModInstallerSection() {
return () => clearInterval(intervalId); // Cleanup interval on component unmount
}, []);
+ useEffect(() => {
+ if (installResult) {
+ const timer = setTimeout(() => {
+ setInstallResult(null);
+ }, 5000);
+ return () => clearTimeout(timer);
+ }
+ return () => {}; // Ensure a cleanup function is always returned
+ }, [installResult]);
+
+ useEffect(() => {
+ if (uninstallResult) {
+ const timer = setTimeout(() => {
+ setUninstallResult(null);
+ }, 5000);
+ return () => clearTimeout(timer);
+ }
+ return () => {}; // Ensure a cleanup function is always returned
+ }, [uninstallResult]);
+
const handleInstallClick = async () => {
setInstalling(true);
const result = await runInstallFGMod();
@@ -119,7 +139,7 @@ function FGModInstallerSection() {
{pathExists !== null && (
<PanelSectionRow>
<div style={{ color: pathExists ? "green" : "red" }}>
- {pathExists ? "Ready to Patch" : "Mod Not Installed"}
+ {pathExists ? "Patch Is Installed" : "Patch Not Installed"}
</div>
</PanelSectionRow>
)}