diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2025-07-21 10:05:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 10:05:39 -0400 |
| commit | 9573344450de451b8f9c7295c11318010d67f1d5 (patch) | |
| tree | 1df1f75d3add63a65b9554a08c54165f41bf415f /src/components/ResultDisplay.tsx | |
| parent | a5796c1bd7957731215e858d169f2831a328cb55 (diff) | |
| download | Decky-Framegen-9573344450de451b8f9c7295c11318010d67f1d5.tar.gz Decky-Framegen-9573344450de451b8f9c7295c11318010d67f1d5.zip | |
Refresh UI (#117)v0.11.2
* initial visual refinement
* rm dupe status pops
* hide other menus if uninstalled opti
* bump ver
* fix ver bump
Diffstat (limited to 'src/components/ResultDisplay.tsx')
| -rw-r--r-- | src/components/ResultDisplay.tsx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/components/ResultDisplay.tsx b/src/components/ResultDisplay.tsx index 0f58f0e..bcd66c0 100644 --- a/src/components/ResultDisplay.tsx +++ b/src/components/ResultDisplay.tsx @@ -12,25 +12,30 @@ interface ResultDisplayProps { export const ResultDisplay: FC<ResultDisplayProps> = ({ result }) => { if (!result) return null; + const isSuccess = result.status === "success"; + return ( <PanelSectionRow> - <div> - <strong>Status:</strong>{" "} - <span style={result.status === "success" ? STYLES.statusSuccess : STYLES.statusError}> - {result.status === "success" ? "Success" : "Error"} - </span> - <br /> - {result.output ? ( + <div style={isSuccess ? STYLES.statusInstalled : STYLES.statusNotInstalled}> + {isSuccess ? ( <> - <strong>Output:</strong> - <pre style={STYLES.preWrap}>{result.output}</pre> + ✅ {result.output?.includes("uninstall") || result.output?.includes("remov") + ? "OptiScaler mod removed successfully" + : "OptiScaler mod installed successfully"} </> - ) : null} - {result.message ? ( + ) : ( <> - <strong>Error:</strong> {result.message} + ❌ <strong>Error:</strong> {result.message || "Operation failed"} </> - ) : null} + )} + {result.output && !isSuccess && ( + <details style={{ marginTop: '8px' }}> + <summary style={{ cursor: 'pointer', fontSize: '12px' }}>View Details</summary> + <pre style={{ ...STYLES.preWrap, fontSize: '11px', marginTop: '4px' }}> + {result.output} + </pre> + </details> + )} </div> </PanelSectionRow> ); |
