Add loading spinners for async operations

This commit is contained in:
Calmcacil
2026-01-12 23:18:57 +01:00
parent 1c03a706d1
commit 3631339f8b
6 changed files with 35 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package screens
import (
"github.com/calmcacil/wg-admin/internal/tui/components"
"github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
)
@@ -37,6 +38,10 @@ func (s *HelpScreen) Update(msg tea.Msg) (Screen, tea.Cmd) {
// View renders the help screen
func (s *HelpScreen) View() string {
// Breadcrumb: Help
breadcrumb := components.RenderBreadcrumb([]components.BreadcrumbItem{{Label: "Help", ID: "help"}})
// Styles
borderStyle := lipgloss.NewStyle().
BorderStyle(lipgloss.RoundedBorder()).
@@ -105,7 +110,7 @@ func (s *HelpScreen) View() string {
footer := footerStyle.Render("Press q or Esc to return")
// Combine all
return borderStyle.Render(
return breadcrumb + "\n\n" + borderStyle.Render(
lipgloss.JoinVertical(lipgloss.Left, header, content, footer),
)
}