Documentation
¶
Overview ¶
Package ui implements dirt's Bubble Tea UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyTheme ¶ added in v0.6.1
func ApplyTheme(name string)
ApplyTheme sets the global colour variables and rebuilds styles from the named theme. Unknown names fall back to "default".
func SetMigrationProgram ¶ added in v0.7.0
SetMigrationProgram is retained for backwards compat; prefer SetProgram.
func SetProgram ¶ added in v0.7.0
SetProgram records the tea.Program used by background job goroutines to send progress and completion messages.
Types ¶
type Job ¶ added in v0.7.0
type Job struct {
ID string // unique, e.g. "migrate-vm1-1702000000"
Kind string // "migrate" / "snap-create" / "snap-delete"
Target string // primary subject — VM name
Detail string // "→ otherhost" / "@ snap-name"
Phase string // "transferring memory" / "finalising"
Progress float64 // 0.0–1.0, or -1 for unbounded
DataDone uint64 // bytes transferred so far
DataTotal uint64 // total bytes (0 = unknown)
StartedAt time.Time
FinishedAt time.Time // zero until done
Err error
Cancel func() // may be nil for non-cancellable jobs
}
Job is a long-running background operation surfaced in the status bar and the :jobs view. Kind / Target are user-facing labels; Cancel is called when the master aborts the job.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the root Bubble Tea model.
func (Model) View ¶
View is the root render — composes header, list, and status bar, or shows the detail / help / splash overlays as appropriate.
func (Model) WithConfig ¶ added in v0.6.0
WithConfig applies user-level config.yaml preferences to the model: default sort column + direction and column visibility. Refresh interval is applied separately via WithRefreshInterval so the CLI --refresh flag can override the config without a second lookup.