Draft fields in a panel block; approval card on panel so its buttons show
This commit is contained in:
1 parent
f54ea6ad42
commit
67c8a79275
2 files changed
+3
-2
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { ClickRow } from "./Button.tsx";
|
||||
import { BAR } from "./edges.ts";
|
||||
import { colors } from "./theme.ts";
|
||||
|
||||
export interface DraftLine {
|
||||
@@ -22,7 +23,7 @@ export function DraftView(props: { readonly lines: readonly DraftLine[] }) {
|
||||
<box flexGrow={1} />
|
||||
<text fg={colors.faint}>esc cancel</text>
|
||||
</box>
|
||||
<box flexDirection="column" marginTop={1}>
|
||||
<box flexDirection="column" marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.border} backgroundColor={colors.panel} paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={1}>
|
||||
{props.lines.map((line) => (
|
||||
<ClickRow key={line.key} flexDirection="row" height={1} onPress={line.onPick}>
|
||||
<text fg={colors.muted} flexShrink={0}>{line.label.padEnd(labelWidth)}</text>
|
||||
|
||||
@@ -300,7 +300,7 @@ export function childThreadOf(entry: WorkLogEntry): ThreadId | null {
|
||||
function EventRow({ item, pending, onRespond }: { readonly onRespond: (decision: ProviderApprovalDecision) => void; readonly item: MessagesTimelineRow extends infer R ? (R extends { kind: "event"; projectedItem: { item: infer I } } ? I : never) : never; readonly pending: boolean }) {
|
||||
if (item.type === "approval_request" && pending) {
|
||||
return (
|
||||
<box marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.warn} backgroundColor={colors.element} flexDirection="column" paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2}>
|
||||
<box marginTop={1} border={["left"]} customBorderChars={BAR} borderColor={colors.warn} backgroundColor={colors.panel} flexDirection="column" paddingTop={1} paddingBottom={1} paddingLeft={2} paddingRight={2}>
|
||||
<text fg={colors.warn}>
|
||||
<strong>{approvalTitle(item.requestKind)}</strong>
|
||||
</text>
|
||||
|
||||
Reference in new issue
Block a user