Notifications page: one list of toggles, without group headings

This commit is contained in:
Astra 2026-10-03 14:11:27 +01:00
parent a6960c25a2
commit 5863639e1a
3 changed files with 15 additions and 25 deletions

View file

@ -26,24 +26,23 @@ import (
// send yet: the page shows them, switched off.
type notifyType struct {
Key string `json:"key"`
Group string `json:"group"`
Label string `json:"label"`
Help string `json:"help,omitempty"`
Ready bool `json:"ready"`
}
var notifyTypes = []notifyType{
{Key: "ban", Group: "Bans", Label: "Ban added", Ready: true},
{Key: "unban", Group: "Bans", Label: "Ban lifted", Ready: true},
{Key: "gag", Group: "Gags", Label: "Gag added", Ready: true},
{Key: "ungag", Group: "Gags", Label: "Gag lifted", Ready: true},
{Key: "mute", Group: "Mutes", Label: "Mute added", Ready: true},
{Key: "unmute", Group: "Mutes", Label: "Mute lifted", Ready: true},
{Key: "silence", Group: "Silences", Label: "Silence added", Ready: true},
{Key: "unsilence", Group: "Silences", Label: "Silence lifted", Ready: true},
{Key: "server", Group: "Server", Label: "Server down and back up", Help: "When the panel loses the game server for 30 seconds, and when it's back.", Ready: true},
{Key: "livescore", Group: "Server", Label: "Live score", Help: "An updating scoreboard while people are playing. Coming later."},
{Key: "calladmin", Group: "Players", Label: "Admin called", Help: "A player asks for an admin in game. Needs a server plugin, coming later."},
{Key: "ban", Label: "Ban added", Ready: true},
{Key: "unban", Label: "Ban lifted", Ready: true},
{Key: "gag", Label: "Gag added", Ready: true},
{Key: "ungag", Label: "Gag lifted", Ready: true},
{Key: "mute", Label: "Mute added", Ready: true},
{Key: "unmute", Label: "Mute lifted", Ready: true},
{Key: "silence", Label: "Silence added", Ready: true},
{Key: "unsilence", Label: "Silence lifted", Ready: true},
{Key: "server", Label: "Server down and back up", Help: "When the panel loses the game server for 30 seconds, and when it's back.", Ready: true},
{Key: "livescore", Label: "Live score", Help: "An updating scoreboard while people are playing. Coming later."},
{Key: "calladmin", Label: "Admin called", Help: "A player asks for an admin in game. Needs a server plugin, coming later."},
}
// readyTypes are the keys that can be switched on, which is also everyone's default.