MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / ShowSuccess

Method ShowSuccess

internal/ui/components/header.go:103–117  ·  view source on GitHub ↗

ShowSuccess displays a success message temporarily.

(message string)

Source from the content-addressed store, hash-verified

101
102// ShowSuccess displays a success message temporarily.
103func (h *Header) ShowSuccess(message string) {
104 // Mark not loading before changing text to prevent race with animateLoading
105 h.mu.Lock()
106 h.isLoading = false
107 if h.loadingCancel != nil {
108 h.loadingCancel()
109 h.loadingCancel = nil
110 }
111 h.mu.Unlock()
112 h.StopLoading()
113 h.SetText(theme.ReplaceSemanticTags("[success]✓ " + message + "[-]"))
114
115 // Clear the message after 2 seconds (shorter than error messages)
116 h.clearMessageAfterDelay(2 * time.Second)
117}
118
119// ShowError displays an error message temporarily.
120func (h *Header) ShowError(message string) {

Callers

nothing calls this directly

Calls 4

StopLoadingMethod · 0.95
SetTextMethod · 0.95
ReplaceSemanticTagsFunction · 0.92

Tested by

no test coverage detected