feat: Logo模块化与渐变色统一

- 修复 --help/-h/-?/--version 在交互模式下无响应的问题
- 新增 internal/logo/logo.go 统一管理logo展示
- 新增 build.sh 自动注入git版本号
- TUI头部与CLI使用统一logo模块
- 移除TUI头部的 [Ctrl+C 退出] 显示
- 统一版本号格式: ( v1.1.1-dirty )
This commit is contained in:
2026-04-08 01:08:47 +08:00
parent 9acbc834a4
commit a9b7a69224
7 changed files with 237 additions and 67 deletions

3
build.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "")
go build -ldflags "-X github.com/titor/fanyi/internal/logo.version=${VERSION}" -o yoyo ./cmd/yoyo