feat: add Go/Bubble Tea TUI rewrite (apps/tui-go)
Reimplement the TUI in Go using Bubble Tea, replacing the Kotlin/Tamboui app. Same WebSocket protocol, soft-rounded layout with blue accent theme.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// Command preview prints a single static TUI frame for screenshotting.
|
||||
// Usage: preview <kind> [cols] [rows]
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/correx/tui-go/internal/app"
|
||||
"github.com/muesli/termenv"
|
||||
)
|
||||
|
||||
func main() {
|
||||
lipgloss.SetColorProfile(termenv.TrueColor)
|
||||
|
||||
kind := "idle"
|
||||
if len(os.Args) > 1 {
|
||||
kind = os.Args[1]
|
||||
}
|
||||
cols, rows := 140, 36
|
||||
if len(os.Args) > 2 {
|
||||
cols, _ = strconv.Atoi(os.Args[2])
|
||||
}
|
||||
if len(os.Args) > 3 {
|
||||
rows, _ = strconv.Atoi(os.Args[3])
|
||||
}
|
||||
fmt.Print(app.PreviewFrame(kind, cols, rows))
|
||||
}
|
||||
Reference in New Issue
Block a user