tui: remove unused permission dialog component

pull/6319/head
Dax Raad 2025-12-31 19:12:36 -05:00
parent 59a748a890
commit 4a07bb561f
2 changed files with 0 additions and 55 deletions

View File

@ -34,7 +34,6 @@ import { Provider } from "@/provider/provider"
import { ArgsProvider, useArgs, type Args } from "./context/args"
import open from "open"
import { PromptRefProvider, usePromptRef } from "./context/prompt"
import { Permission } from "./component/dialog-permission"
async function getTerminalBackgroundColor(): Promise<"dark" | "light"> {
// can't set raw mode if not a TTY
@ -608,7 +607,6 @@ function App() {
}
}}
>
<Permission />
<Switch>
<Match when={route.data.type === "home"}>
<Home />

View File

@ -1,53 +0,0 @@
import { onMount } from "solid-js"
import { useDialog } from "../ui/dialog"
import { TextAttributes } from "@opentui/core"
import { useTheme } from "../context/theme"
export function Permission() {
const dialog = useDialog()
onMount(() => {})
return null
}
function DialogPermission() {
const dialog = useDialog()
const { theme } = useTheme()
onMount(() => {
dialog.setSize("medium")
})
return (
<box
gap={1}
paddingLeft={2}
paddingRight={2}
onKeyDown={(e) => {
console.log(e)
}}
ref={(r) => {
setTimeout(() => {
r?.focus()
}, 1)
}}
>
<box flexDirection="row" justifyContent="space-between">
<text attributes={TextAttributes.BOLD}>Permission Request</text>
<text fg={theme.textMuted}>esc</text>
</box>
<text fg={theme.textMuted}>Change to foo directory and create bar file</text>
<text>$ cd foo && touch bar</text>
<box paddingBottom={1}>
<box paddingLeft={2} paddingRight={2} backgroundColor={theme.primary}>
<text fg={theme.background}>Allow</text>
</box>
<box paddingLeft={2} paddingRight={2}>
<text>Always allow the touch command</text>
</box>
<box paddingLeft={2} paddingRight={2}>
<text>Reject</text>
</box>
</box>
</box>
)
}