Documentation
¶
Overview ¶
Package topbar renders the frame's top chrome row: the app mark, the folder tabs, and the connection group with a clock.
The folder tabs move here from the chat list. Selection and key handling stay in chatlist — this package only draws — so the tabs can leave the list's 38-cell column without the folder keymap changing at all.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the top bar.
func (*Model) SetConnection ¶
SetConnection sets the dot and its description together, so the two can never disagree about whether the client is connected.
func (*Model) SetDevices ¶
SetDevices sets the authorised-session count. Zero means "unknown" and drops the cell.
func (*Model) SetFolders ¶
func (Model) TabAt ¶
TabAt returns the index of the folder tab drawn at column x, or -1.
It recomputes the same spans View lays out rather than remembering them, so the hit-test cannot drift from the drawing: any change to the tab layout has to be made in tabSpans, which both callers go through.
func (Model) View ¶
View renders the row at exactly the configured width.
The right group degrades from the left as space runs out: the status description truncates first, then the device count is dropped, then the transport. The clock is never dropped — it is the one thing on the row that is useful when everything else has been cut.