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

Method ShowError

internal/ui/components/header.go:120–133  ·  view source on GitHub ↗

ShowError displays an error message temporarily.

(message string)

Source from the content-addressed store, hash-verified

118
119// ShowError displays an error message temporarily.
120func (h *Header) ShowError(message string) {
121 h.mu.Lock()
122 h.isLoading = false
123 if h.loadingCancel != nil {
124 h.loadingCancel()
125 h.loadingCancel = nil
126 }
127 h.mu.Unlock()
128 h.StopLoading()
129 h.SetText(theme.ReplaceSemanticTags("[error]✗ " + message + "[-]"))
130
131 // Clear the message after 3 seconds
132 h.clearMessageAfterDelay(3 * time.Second)
133}
134
135// ShowWarning displays a warning message temporarily.
136func (h *Header) ShowWarning(message string) {

Callers

nothing calls this directly

Calls 4

StopLoadingMethod · 0.95
SetTextMethod · 0.95
ReplaceSemanticTagsFunction · 0.92

Tested by

no test coverage detected