Skip to content

Commit 6b18dc8

Browse files
clean up top colored status messages
1 parent 9b1ada9 commit 6b18dc8

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

src/components/FGModInstallerSection.tsx

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -175,23 +175,37 @@ export default function FGModInstallerSection() {
175175

176176
return (
177177
<PanelSection>
178-
{pathExists !== null ? (
179-
<PanelSectionRow>
180-
<div style={{ color: pathExists ? "green" : "red" }}>
181-
{pathExists ? "Mod Is Installed" : "Mod Not Installed"}
182-
</div>
183-
</PanelSectionRow>
184-
) : null}
185-
186-
{/* Add OptiScaler status indicator */}
187-
{optiScalerExists !== null ? (
188-
<PanelSectionRow>
189-
<div style={{ color: optiScalerExists ? "green" : "red" }}>
190-
{optiScalerExists
191-
? `Current OptiScaler Version: ${optiScalerVersion}`
192-
: "OptiScaler Not Installed"}
193-
</div>
194-
</PanelSectionRow>
178+
{/* Show status based on installation state */}
179+
{pathExists !== null && optiScalerExists !== null ? (
180+
<>
181+
{/* When not installed, show single consolidated message */}
182+
{!pathExists && !optiScalerExists ? (
183+
<PanelSectionRow>
184+
<div style={{ color: "red" }}>
185+
OptiScaler Mod Not Installed
186+
</div>
187+
</PanelSectionRow>
188+
) : (
189+
/* When installed, show both status messages */
190+
<>
191+
{pathExists ? (
192+
<PanelSectionRow>
193+
<div style={{ color: "green" }}>
194+
Mod Is Installed
195+
</div>
196+
</PanelSectionRow>
197+
) : null}
198+
199+
{optiScalerExists ? (
200+
<PanelSectionRow>
201+
<div style={{ color: "green" }}>
202+
Current OptiScaler Version: {optiScalerVersion}
203+
</div>
204+
</PanelSectionRow>
205+
) : null}
206+
</>
207+
)}
208+
</>
195209
) : null}
196210

197211
{pathExists === false ? (

0 commit comments

Comments
 (0)