fix(tui): unify keybinding footer, remove duplicate status bar
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user