fix(tui): restore muted status bar, remove duplicate global keys from tab footers

This commit is contained in:
swanadiva
2026-06-23 17:15:39 +07:00
parent 7f197b9e3a
commit f9b2337612
5 changed files with 23 additions and 4 deletions
+19
View File
@@ -4,6 +4,7 @@ import (
"strings"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
)
// Tab represents a single tab in the TUI
@@ -174,6 +175,10 @@ func (tm *TabManager) View() string {
b.WriteString(content)
}
// Render status bar (muted, like tamagosh)
b.WriteString("\n")
b.WriteString(renderStatusBar(tm))
return b.String()
}
@@ -197,4 +202,18 @@ func renderTabBar(tm *TabManager) string {
return TabBarStyle.Render(bar)
}
// renderStatusBar renders the bottom status bar, centered — muted like tamagosh
func renderStatusBar(tm *TabManager) string {
hints := "Ctrl+Tab:switch Ctrl+Q:close ↑↓:nav Enter:SSH Ctrl+N:add Ctrl+F:SFTP Ctrl+K:keys Ctrl+P:snippets q:quit"
rendered := SubtitleStyle.Render(hints)
if tm.width > 0 {
w := lipgloss.Width(rendered)
if w < tm.width {
pad := (tm.width - w) / 2
rendered = strings.Repeat(" ", pad) + rendered
}
}
return rendered
}