Add named wall displays: pages, order and speed per screen

An administrator can make named displays (Hall TV, Office monitor) under
Settings -> Share links, each with an address of its own (/wall/hall-tv), the
pages it rotates through in the board's order, and a rotation speed. The
signed-in wall opens one from its address and can switch between them, and a
wall share link can open one too. The address still wins over the display's
speed, then the browser's choice.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5.5 committed 2026-11-12 23:04:22 +01:00
1 parent 639408c0d0
commit 333146e8e3
24 files changed
+10411 -22

No files matched your search

+29 -1
View File
@@ -53,11 +53,31 @@ export interface PublicStatus {
}
/** A link that opens the wall display, or a status page, without signing in, as the settings list shows it (never the secret). */
/** A named wall display: which pages the board rotates through (in order; none is every page) and how fast. */
export interface WallDisplay {
id: number;
name: string;
/** The address: /wall/<slug>. */
slug: string;
pages: string[];
rotateSeconds: number | null;
createdBy: string | null;
createdAt: string;
}
export interface WallDisplayInput {
name: string;
slug?: string;
pages: string[];
rotateSeconds: number | null;
}
export interface ShareLink {
id: number;
label: string;
tokenPrefix: string;
kind: ShareLinkKind;
/** For a wall: the named display it opens; null is the whole board. */
displayId: number | null;
/** A status page's own heading and message. */
title: string | null;
message: string | null;
@@ -90,6 +110,8 @@ export interface WallGroup {
}
export interface PublicWall {
/** The named display this link opens, if any. */
displayConfig?: { name: string; pages: string[]; rotateSeconds: number | null } | null;
detail: ShareLinkDetail;
level: "ok" | "warning" | "critical" | "unsure";
environment: string | null;
@@ -4059,10 +4081,16 @@ export const api = {
},
shareLinks: {
list: () => request<{ links: ShareLink[] }>("/api/share-links"),
create: (data: { label: string; detail?: ShareLinkDetail; kind?: ShareLinkKind; title?: string; message?: string; expiresInDays: number | null }) =>
create: (data: { label: string; detail?: ShareLinkDetail; kind?: ShareLinkKind; displayId?: number | null; title?: string; message?: string; expiresInDays: number | null }) =>
request<{ link: ShareLink; token: string; path: string }>("/api/share-links", { method: "POST", body: JSON.stringify(data) }),
remove: (id: number) => request<void>(`/api/share-links/${id}`, { method: "DELETE" }),
},
wallDisplays: {
list: () => request<{ displays: WallDisplay[] }>("/api/wall-displays"),
create: (data: WallDisplayInput) => request<{ display: WallDisplay }>("/api/wall-displays", { method: "POST", body: JSON.stringify(data) }),
update: (id: number, data: WallDisplayInput) => request<{ display: WallDisplay }>(`/api/wall-displays/${id}`, { method: "PUT", body: JSON.stringify(data) }),
remove: (id: number) => request<void>(`/api/wall-displays/${id}`, { method: "DELETE" }),
},
statusPages: {
get: (linkId: number) => request<{ title: string; message: string; items: StatusPageItem[]; maxItems: number }>("/api/share-links/" + linkId + "/status"),
choices: () => request<{ servers: { id: number; name: string }[]; integrations: { id: number; name: string; type: string }[] }>("/api/share-links/status-choices"),