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

@@ -144,6 +144,12 @@ func (s *DetailScreen) View() string {
// renderContent renders the main detail screen content
func (s *DetailScreen) renderContent() string {
// Breadcrumb: Clients > Client Name
breadcrumb := components.RenderBreadcrumb([]components.BreadcrumbItem{
{Label: "Clients", ID: "list"},
{Label: s.client.Name, ID: "detail"},
})
statusText := s.status
if s.status == wireguard.StatusConnected {
statusText = theme.StyleSuccess.Bold(true).Render("● " + s.status)
@@ -154,6 +160,8 @@ func (s *DetailScreen) renderContent() string {
// Build content
content := lipgloss.JoinVertical(
lipgloss.Left,
breadcrumb,
"",
theme.StyleTitle.Render(fmt.Sprintf("Client Details: %s", s.client.Name)),
"",
s.renderField("Status", statusText),