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:
1 parent
639408c0d0
commit
333146e8e3
24 files changed
+10411
-22
No files matched your search
@@ -850,6 +850,19 @@ export type ShareLinkDetail = (typeof shareLinkDetails)[number];
|
||||
export const shareLinkKinds = ["wall", "status", "calendar"] as const;
|
||||
export type ShareLinkKind = (typeof shareLinkKinds)[number];
|
||||
|
||||
// Named wall displays ("Hall TV"): which pages the board rotates through, in which order, and how fast — services/wallDisplays.ts. A share link to a wall can open one.
|
||||
export const wallDisplays = sqliteTable("wall_displays", {
|
||||
id: integer("id").primaryKey({ autoIncrement: true }),
|
||||
name: text("name").notNull(),
|
||||
slug: text("slug").notNull().unique(), // the address: /wall/<slug>
|
||||
pages: text("pages").notNull().default("[]"), // JSON: page ids in order ("overview", "alerts", "group:apps" …); empty = every page the board has
|
||||
rotateSeconds: integer("rotate_seconds"), // how long each page stays; null = not set (the address or the browser decides, else the board does not rotate)
|
||||
createdBy: text("created_by"),
|
||||
createdAt: text("created_at")
|
||||
.notNull()
|
||||
.default(sql`(current_timestamp)`),
|
||||
});
|
||||
|
||||
// A link to the wall display that needs no sign-in, for a TV in the hall or someone who only wants to know if things are up. Only a hash
|
||||
// of the secret part of the address is kept (like an agent token), so it can't be read back out of the database or a backup.
|
||||
export const shareLinks = sqliteTable("share_links", {
|
||||
@@ -860,6 +873,8 @@ export const shareLinks = sqliteTable("share_links", {
|
||||
// summary = how things are, in numbers; names = also the names of what is wrong, in maintenance, and the integrations
|
||||
detail: text("detail").$type<ShareLinkDetail>().notNull().default("summary"),
|
||||
kind: text("kind").$type<ShareLinkKind>().notNull().default("wall"),
|
||||
// For a wall: the named display it opens (its pages and speed); null = the whole board. Taken away with the display.
|
||||
displayId: integer("display_id").references(() => wallDisplays.id, { onDelete: "set null" }),
|
||||
// A status page's own heading and an optional announcement under it ("Movies are being updated tonight"). Unused by a wall.
|
||||
title: text("title"),
|
||||
message: text("message"),
|
||||
|
||||
Reference in new issue
Block a user