Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/opencode/src/cli/cmd/tui/ui/dialog-alert.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TextAttributes } from "@opentui/core"
import { useTheme } from "../context/theme"
import { useTheme, selectedForeground } from "../context/theme"
import { useDialog, type DialogContext } from "./dialog"
import { useKeyboard } from "@opentui/solid"

Expand All @@ -12,6 +12,7 @@ export type DialogAlertProps = {
export function DialogAlert(props: DialogAlertProps) {
const dialog = useDialog()
const { theme } = useTheme()
const fg = selectedForeground(theme)

useKeyboard((evt) => {
if (evt.name === "return") {
Expand Down Expand Up @@ -42,7 +43,7 @@ export function DialogAlert(props: DialogAlertProps) {
dialog.clear()
}}
>
<text fg={theme.selectedListItemText}>ok</text>
<text fg={fg}>ok</text>
</box>
</box>
</box>
Expand Down
7 changes: 3 additions & 4 deletions packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TextAttributes } from "@opentui/core"
import { useTheme } from "../context/theme"
import { useTheme, selectedForeground } from "../context/theme"
import { useDialog, type DialogContext } from "./dialog"
import { createStore } from "solid-js/store"
import { For } from "solid-js"
Expand All @@ -16,6 +16,7 @@ export type DialogConfirmProps = {
export function DialogConfirm(props: DialogConfirmProps) {
const dialog = useDialog()
const { theme } = useTheme()
const fg = selectedForeground(theme)
const [store, setStore] = createStore({
active: "confirm" as "confirm" | "cancel",
})
Expand Down Expand Up @@ -57,9 +58,7 @@ export function DialogConfirm(props: DialogConfirmProps) {
dialog.clear()
}}
>
<text fg={key === store.active ? theme.selectedListItemText : theme.textMuted}>
{Locale.titlecase(key)}
</text>
<text fg={key === store.active ? fg : theme.textMuted}>{Locale.titlecase(key)}</text>
</box>
)}
</For>
Expand Down
5 changes: 3 additions & 2 deletions packages/opencode/src/cli/cmd/tui/ui/dialog-help.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { TextAttributes } from "@opentui/core"
import { useTheme } from "@tui/context/theme"
import { useTheme, selectedForeground } from "@tui/context/theme"
import { useDialog } from "./dialog"
import { useKeyboard } from "@opentui/solid"
import { useKeybind } from "@tui/context/keybind"

export function DialogHelp() {
const dialog = useDialog()
const { theme } = useTheme()
const fg = selectedForeground(theme)
const keybind = useKeybind()

useKeyboard((evt) => {
Expand All @@ -32,7 +33,7 @@ export function DialogHelp() {
</box>
<box flexDirection="row" justifyContent="flex-end" paddingBottom={1}>
<box paddingLeft={3} paddingRight={3} backgroundColor={theme.primary} onMouseUp={() => dialog.clear()}>
<text fg={theme.selectedListItemText}>ok</text>
<text fg={fg}>ok</text>
</box>
</box>
</box>
Expand Down
Loading