left align splash

oc-run
Simon Klee 2026-04-07 11:43:30 +02:00
parent db31f66923
commit fbf80ce803
No known key found for this signature in database
GPG Key ID: B91696044D47BEA3
1 changed files with 7 additions and 7 deletions

View File

@ -207,13 +207,13 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback
const rightText = logo.right[i] ?? "" const rightText = logo.right[i] ?? ""
draw(lines, leftText, { draw(lines, leftText, {
left: 2, left: 0,
top: y, top: y,
fg: left, fg: left,
shadow: leftShadow, shadow: leftShadow,
}) })
draw(lines, rightText, { draw(lines, rightText, {
left: 2 + leftText.length + 1, left: leftText.length + 1,
top: y, top: y,
fg: right, fg: right,
shadow: rightShadow, shadow: rightShadow,
@ -226,22 +226,22 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback
if (input.showSession !== false) { if (input.showSession !== false) {
const label = "Session".padEnd(10, " ") const label = "Session".padEnd(10, " ")
push(lines, 2, y, label, input.theme.system.body, undefined, TextAttributes.DIM) push(lines, 0, y, label, input.theme.system.body, undefined, TextAttributes.DIM)
push(lines, 2 + label.length, y, meta.title, input.theme.assistant.body, undefined, TextAttributes.BOLD) push(lines, label.length, y, meta.title, input.theme.assistant.body, undefined, TextAttributes.BOLD)
y += 1 y += 1
} }
if (kind === "entry") { if (kind === "entry") {
push(lines, 2, y, "Type /exit or /quit to finish.", input.theme.system.body, undefined, undefined) push(lines, 0, y, "Type /exit or /quit to finish.", input.theme.system.body, undefined, undefined)
y += 1 y += 1
} }
if (kind === "exit") { if (kind === "exit") {
const next = "Continue".padEnd(10, " ") const next = "Continue".padEnd(10, " ")
push(lines, 2, y, next, input.theme.system.body, undefined, TextAttributes.DIM) push(lines, 0, y, next, input.theme.system.body, undefined, TextAttributes.DIM)
push( push(
lines, lines,
2 + next.length, next.length,
y, y,
`opencode -s ${meta.session_id}`, `opencode -s ${meta.session_id}`,
input.theme.assistant.body, input.theme.assistant.body,