Show a colour-coded team picker instead of cycling with T
CI / test (push) Successful in 15s
Release / test (push) Successful in 4s
Release / binaries (push) Successful in 28s

T used to silently cycle Model.activeTeamID through the caller's teams with
no visible list of choices. It now opens a full picker (modelled on the
existing user picker) listing every team plus "All teams", each with a
stable identity colour from a new six-colour theme palette. The same colour
now also shows as a bullet next to "team: <name>" in the header, so the
active team stays visible without opening the picker.

Adds an Identity palette to the theme package (six hues, skipping the ones
that already mean firing/critical), Styles.TeamColor to pick one by team id,
and identity_1..6 as theme-file tokens alongside the existing twelve so a
fully custom theme can still set every token.
This commit is contained in:
Niklas Ye
2026-09-27 18:14:45 +02:00
parent ee25552a53
commit 024dc095a5
11 changed files with 265 additions and 62 deletions
+13
View File
@@ -32,6 +32,13 @@ type rawTheme struct {
SevError *string `yaml:"sev_error"`
SevWarning *string `yaml:"sev_warning"`
SevInfo *string `yaml:"sev_info"`
Identity1 *string `yaml:"identity_1"`
Identity2 *string `yaml:"identity_2"`
Identity3 *string `yaml:"identity_3"`
Identity4 *string `yaml:"identity_4"`
Identity5 *string `yaml:"identity_5"`
Identity6 *string `yaml:"identity_6"`
}
// binding ties a YAML key to its raw value and the field it fills, so parsing,
@@ -56,6 +63,12 @@ func bindings(r *rawTheme, t *Theme) []binding {
{"sev_error", r.SevError, &t.SevError},
{"sev_warning", r.SevWarning, &t.SevWarning},
{"sev_info", r.SevInfo, &t.SevInfo},
{"identity_1", r.Identity1, &t.Identity[0]},
{"identity_2", r.Identity2, &t.Identity[1]},
{"identity_3", r.Identity3, &t.Identity[2]},
{"identity_4", r.Identity4, &t.Identity[3]},
{"identity_5", r.Identity5, &t.Identity[4]},
{"identity_6", r.Identity6, &t.Identity[5]},
}
}