Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/shell/domain/TabRegistry

Pure (DOMAIN-001): the tab registry every region (browser / tools / drawer) uses.

Cockpit client (features), next. Source: ui/client/features/shell/domain/TabRegistry.ts.

Functions#

addTab()#

addTab(tabs, tab): ShellTab[]

Defined in: ui/client/features/shell/domain/TabRegistry.ts:5

Parameters#

tabs

ShellTab[]

tab

ShellTab

Returns#

ShellTab[]


badgeText()#

badgeText(badge): string

Defined in: ui/client/features/shell/domain/TabRegistry.ts:23

What a badge shows. A count over 99 is capped so that a tab's badge -- and therefore the position of every tab after it -- is the same width whether the project has 1 problem or 700. The real total is in the panel.

Parameters#

badge

string | number

Returns#

string


removeTab()#

removeTab(tabs, id): ShellTab[]

Defined in: ui/client/features/shell/domain/TabRegistry.ts:13

Parameters#

tabs

ShellTab[]

id

string

Returns#

ShellTab[]


resolveActiveTab()#

resolveActiveTab(tabs, activeId): ShellTab | null

Defined in: ui/client/features/shell/domain/TabRegistry.ts:27

Parameters#

tabs

ShellTab[]

activeId

string | null

Returns#

ShellTab | null