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

Method ShowWarning

internal/ui/components/header.go:136–149  ·  view source on GitHub ↗

ShowWarning displays a warning message temporarily.

(message string)

Source from the content-addressed store, hash-verified

134
135// ShowWarning displays a warning message temporarily.
136func (h *Header) ShowWarning(message string) {
137 h.mu.Lock()
138 h.isLoading = false
139 if h.loadingCancel != nil {
140 h.loadingCancel()
141 h.loadingCancel = nil
142 }
143 h.mu.Unlock()
144 h.StopLoading()
145 h.SetText(theme.ReplaceSemanticTags("[warning]⚠ " + message + "[-]"))
146
147 // Clear the message after 3 seconds
148 h.clearMessageAfterDelay(3 * time.Second)
149}
150
151// formatProfileText creates the formatted header text for a profile.
152func (h *Header) formatProfileText(profileName string) string {

Callers

nothing calls this directly

Calls 4

StopLoadingMethod · 0.95
SetTextMethod · 0.95
ReplaceSemanticTagsFunction · 0.92

Tested by

no test coverage detected