Sfoglia il codice sorgente

fix: input lip visibility for transparent themes (#5544)

Nalin Singh 2 mesi fa
parent
commit
7c1124199e

+ 12 - 5
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

@@ -873,17 +873,24 @@ export function Prompt(props: PromptProps) {
           borderColor={highlight()}
           borderColor={highlight()}
           customBorderChars={{
           customBorderChars={{
             ...EmptyBorder,
             ...EmptyBorder,
-            vertical: "╹",
+            vertical: theme.backgroundElement.a !== 0 ? "╹" : " ",
           }}
           }}
         >
         >
           <box
           <box
             height={1}
             height={1}
             border={["bottom"]}
             border={["bottom"]}
             borderColor={theme.backgroundElement}
             borderColor={theme.backgroundElement}
-            customBorderChars={{
-              ...EmptyBorder,
-              horizontal: "▀",
-            }}
+            customBorderChars={
+              theme.backgroundElement.a !== 0
+                ? {
+                    ...EmptyBorder,
+                    horizontal: "▀",
+                  }
+                : {
+                    ...EmptyBorder,
+                    horizontal: " ",
+                  }
+            }
           />
           />
         </box>
         </box>
         <box flexDirection="row" justifyContent="space-between">
         <box flexDirection="row" justifyContent="space-between">