From cbed25162a1058e67180aafb8fbd424bf2573e95 Mon Sep 17 00:00:00 2001
From: xXJSONDeruloXx <danielhimebauch@gmail.com>
Date: Fri, 26 Sep 2025 11:32:03 -0400
Subject: initial path override ui and be

---
 src/components/OptiScalerControls.tsx | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

(limited to 'src/components/OptiScalerControls.tsx')

diff --git a/src/components/OptiScalerControls.tsx b/src/components/OptiScalerControls.tsx
index 7b2db0e..5dac6d0 100644
--- a/src/components/OptiScalerControls.tsx
+++ b/src/components/OptiScalerControls.tsx
@@ -10,6 +10,8 @@ import { ClipboardCommands } from "./ClipboardCommands";
 import { InstructionCard } from "./InstructionCard";
 import { OptiScalerWiki } from "./OptiScalerWiki";
 import { UninstallButton } from "./UninstallButton";
+import { CustomPathOverride } from "./CustomPathOverride";
+import type { CustomOverrideConfig } from "../types/index";
 
 interface OptiScalerControlsProps {
   pathExists: boolean | null;
@@ -21,6 +23,13 @@ export function OptiScalerControls({ pathExists, setPathExists }: OptiScalerCont
   const [uninstalling, setUninstalling] = useState(false);
   const [installResult, setInstallResult] = useState<OperationResult | null>(null);
   const [uninstallResult, setUninstallResult] = useState<OperationResult | null>(null);
+  const [overrideConfig, setOverrideConfig] = useState<CustomOverrideConfig | null>(null);
+
+  useEffect(() => {
+    if (pathExists !== true && overrideConfig) {
+      setOverrideConfig(null);
+    }
+  }, [pathExists, overrideConfig]);
 
   useEffect(() => {
     if (installResult) {
@@ -76,7 +85,11 @@ export function OptiScalerControls({ pathExists, setPathExists }: OptiScalerCont
       
       <OptiScalerHeader pathExists={pathExists} />
       
-      <ClipboardCommands pathExists={pathExists} />
+      {pathExists === true && (
+        <CustomPathOverride onOverrideChange={setOverrideConfig} />
+      )}
+
+      <ClipboardCommands pathExists={pathExists} overrideConfig={overrideConfig} />
       
       <InstructionCard pathExists={pathExists} />
       
-- 
cgit v1.2.3

