fix(tui): unify keybinding footer, remove duplicate status bar

This commit is contained in:
swanadiva
2026-06-23 17:45:06 +07:00
parent 4af555c135
commit e5d32bd22e
8 changed files with 7 additions and 26 deletions
-19
View File
@@ -4,7 +4,6 @@ import (
"strings"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
)
// Tab represents a single tab in the TUI
@@ -175,10 +174,6 @@ func (tm *TabManager) View() string {
b.WriteString(content)
}
// Render status bar (muted, like tamagosh)
b.WriteString("\n")
b.WriteString(renderStatusBar(tm))
return b.String()
}
@@ -202,18 +197,4 @@ 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
}