Reduce status refresh interval to 3 seconds and add last updated indicator
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user