account system and syslogs
This commit is contained in:
@@ -7,7 +7,8 @@ export type AdminDashboardTab =
|
||||
| "matches"
|
||||
| "matchmaker"
|
||||
| "ledger"
|
||||
| "analysis";
|
||||
| "analysis"
|
||||
| "logs";
|
||||
|
||||
export type DashboardUrlQuery = {
|
||||
tab: AdminDashboardTab;
|
||||
@@ -32,6 +33,10 @@ export type DashboardUrlQuery = {
|
||||
analysisTo?: string | null;
|
||||
/** Analysis tab: comma-separated player ids (`aplayers`). */
|
||||
analysisPlayers?: string | null;
|
||||
/** Matches tab: local date-only bounds (`mfrom` / `mto`) + tz offset minutes (`mtz`). */
|
||||
matchesFrom?: string | null;
|
||||
matchesTo?: string | null;
|
||||
matchesTzOffsetMinutes?: number | null;
|
||||
};
|
||||
|
||||
/** Build `/?…` for dashboard tabs, filters, and optional edit / error flags. */
|
||||
@@ -42,6 +47,7 @@ export function buildDashboardHref(q: DashboardUrlQuery): string {
|
||||
else if (q.tab === "matchmaker") p.set("tab", "matchmaker");
|
||||
else if (q.tab === "ledger") p.set("tab", "ledger");
|
||||
else if (q.tab === "analysis") p.set("tab", "analysis");
|
||||
else if (q.tab === "logs") p.set("tab", "logs");
|
||||
if (q.highlightId) p.set("highlight", q.highlightId);
|
||||
if (q.participantRaw) p.set("participant", q.participantRaw);
|
||||
if (q.tab === "matchmaker" && q.matchmakerSource === "raw") {
|
||||
@@ -72,6 +78,16 @@ export function buildDashboardHref(q: DashboardUrlQuery): string {
|
||||
if (q.analysisTo) p.set("ato", q.analysisTo);
|
||||
if (q.analysisPlayers) p.set("aplayers", q.analysisPlayers);
|
||||
}
|
||||
if (q.tab === "matches") {
|
||||
if (q.matchesFrom) p.set("mfrom", q.matchesFrom);
|
||||
if (q.matchesTo) p.set("mto", q.matchesTo);
|
||||
if (
|
||||
q.matchesTzOffsetMinutes != null &&
|
||||
Number.isFinite(q.matchesTzOffsetMinutes)
|
||||
) {
|
||||
p.set("mtz", String(Math.trunc(q.matchesTzOffsetMinutes)));
|
||||
}
|
||||
}
|
||||
if (q.editId != null && Number.isFinite(q.editId)) {
|
||||
p.set("edit", String(q.editId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user