diff options
| author | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-23 12:50:33 -0500 |
|---|---|---|
| committer | xXJSONDeruloXx <danielhimebauch@gmail.com> | 2025-01-23 12:50:33 -0500 |
| commit | 68d89c0bbcc10c7f692526f91c43c31b7d01c6fd (patch) | |
| tree | 4111ca23e54dfcb75884b633578b29ad6946e5b9 /src | |
| parent | b05d873eb5fa2d4f947e34f5d9eda508162d2c5a (diff) | |
| download | Decky-Framegen-68d89c0bbcc10c7f692526f91c43c31b7d01c6fd.tar.gz Decky-Framegen-68d89c0bbcc10c7f692526f91c43c31b7d01c6fd.zip | |
made install/uninstall status on timer, rewording patch status
Diffstat (limited to 'src')
| -rwxr-xr-x | src/index.tsx | 22 |
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> )} |
