mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-31 00:03:01 +03:00
style(tui): frame recovery decisions
This commit is contained in:
@@ -312,6 +312,7 @@ function recoveryNoticeTheme(palette: Palette): RecoveryNoticeTheme {
|
|||||||
return {
|
return {
|
||||||
text: palette.text,
|
text: palette.text,
|
||||||
muted: palette.muted,
|
muted: palette.muted,
|
||||||
|
border: palette.border,
|
||||||
accent: palette.accent,
|
accent: palette.accent,
|
||||||
warning: palette.warning,
|
warning: palette.warning,
|
||||||
error: palette.error,
|
error: palette.error,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import type { RecoveryState } from "./protocol"
|
|||||||
export interface RecoveryNoticeTheme {
|
export interface RecoveryNoticeTheme {
|
||||||
text: string
|
text: string
|
||||||
muted: string
|
muted: string
|
||||||
|
border: string
|
||||||
accent: string
|
accent: string
|
||||||
warning: string
|
warning: string
|
||||||
error: string
|
error: string
|
||||||
@@ -41,9 +42,12 @@ export class RecoveryNotice {
|
|||||||
this.root = new BoxRenderable(renderer, {
|
this.root = new BoxRenderable(renderer, {
|
||||||
id: "nanobot-tui-recovery-notice",
|
id: "nanobot-tui-recovery-notice",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
height: 2,
|
height: 4,
|
||||||
flexShrink: 0,
|
flexShrink: 0,
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
|
border: true,
|
||||||
|
borderStyle: "rounded",
|
||||||
|
borderColor: theme.border,
|
||||||
paddingLeft: 1,
|
paddingLeft: 1,
|
||||||
paddingRight: 1,
|
paddingRight: 1,
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -106,6 +110,7 @@ export class RecoveryNotice {
|
|||||||
|
|
||||||
setTheme(theme: RecoveryNoticeTheme): void {
|
setTheme(theme: RecoveryNoticeTheme): void {
|
||||||
this.theme = theme
|
this.theme = theme
|
||||||
|
this.root.borderColor = theme.border
|
||||||
if (this.visible) this.render()
|
if (this.visible) this.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user