MCPcopy
hub / github.com/mum4k/termdash / writeExplorerStatus

Function writeExplorerStatus

termdashdemo/termdashdemo.go:2740–2760  ·  view source on GitHub ↗

writeExplorerStatus refreshes the small status pane.

(w *text.Text, message string)

Source from the content-addressed store, hash-verified

2738
2739// writeExplorerStatus refreshes the small status pane.
2740func writeExplorerStatus(w *text.Text, message string) error {
2741 w.Reset()
2742 rows := []struct {
2743 k string
2744 v string
2745 }{
2746 {"Status: ", message + "\n"},
2747 {"Catalog: ", "all leaves selectable\n"},
2748 {"Preview: ", "right pane swaps live widgets\n"},
2749 {"Tip: ", "click tree items to inspect"},
2750 }
2751 for _, row := range rows {
2752 if err := w.Write(row.k, text.WriteCellOpts(cell.FgColor(cell.ColorNumber(245)))); err != nil {
2753 return err
2754 }
2755 if err := w.Write(row.v, text.WriteCellOpts(cell.FgColor(cell.ColorNumber(252)))); err != nil {
2756 return err
2757 }
2758 }
2759 return nil
2760}
2761
2762// seedExplorerTimeline gives the Timeline and TimeRangePicker meaningful initial data.
2763func seedExplorerTimeline(tl *timeline.Timeline, picker *timeline.TimeRangePicker) {

Callers 3

newExplorerWidgetsFunction · 0.85
explorerButtonVariantsFunction · 0.85
explorerToastPreviewFunction · 0.85

Calls 5

WriteCellOptsFunction · 0.92
FgColorFunction · 0.92
ColorNumberFunction · 0.92
ResetMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected