Reduce status refresh interval to 3 seconds and add last updated indicator

This commit is contained in:
Calmcacil
2026-01-12 23:04:48 +01:00
parent 5136484cd2
commit 68939cdc08
6 changed files with 56 additions and 41 deletions

View File

@@ -29,7 +29,7 @@ var (
addHelpStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("241")).
MarginTop(1)
loadingStyle = lipgloss.NewStyle().
addLoadingStyle = lipgloss.NewStyle().
Foreground(lipgloss.Color("62")).
Bold(true).
MarginTop(1)
@@ -147,7 +147,7 @@ func (s *AddScreen) View() string {
}
if s.isCreating {
return loadingStyle.Render(
return addLoadingStyle.Render(
lipgloss.JoinVertical(
lipgloss.Left,
addTitleStyle.Render("Add New WireGuard Client"),
@@ -172,7 +172,7 @@ func (s *AddScreen) createClient(name, dns string, usePSK bool) tea.Cmd {
// Create the client via wireguard package
err := wireguard.CreateClient(name, dns, usePSK)
if err != nil {
return errMsg{err: fmt.Errorf("failed to create client: %w", err)}
return ErrMsg{Err: fmt.Errorf("failed to create client: %w", err)}
}
// Return success message