e8e37d77fe
Extracted from unibus v0.13.0: the chat SPA (web/, React+Mantine, per-user BIP39 wallet) and the web gateway (cmd/webgw, REST+SSE) that acts as a bus peer for the browser. Consumes unibus as a Go module via replace => ../unibus, keeping its own replace fn-registry for the cybersecurity primitives. go build/vet/test and pnpm build green in the new location.
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
import type { Room } from "./types";
|
|
|
|
// Datos de muestra para iterar el diseño sin el bus conectado.
|
|
const now = 1749300000000;
|
|
const m = (n: number) => now - n * 60_000;
|
|
|
|
export const MOCK_ROOMS: Room[] = [
|
|
{
|
|
id: "general",
|
|
name: "general",
|
|
encrypted: true,
|
|
lastMessage: "¿Lo desplegamos hoy?",
|
|
lastTs: m(2),
|
|
unread: 3,
|
|
messages: [
|
|
{ id: "1", sender: "ana", body: "Buenas, ¿cómo va el cluster?", ts: m(40) },
|
|
{ id: "2", sender: "lucas", body: "Los 3 nodos en R3, quorum verde", ts: m(38), mine: true },
|
|
{ id: "3", sender: "ana", body: "Brutal. ¿Y el frontend?", ts: m(30) },
|
|
{ id: "4", sender: "leo", body: "Primera iteración lista, estilo Element", ts: m(6) },
|
|
{ id: "5", sender: "ana", body: "¿Lo desplegamos hoy?", ts: m(2) },
|
|
],
|
|
},
|
|
{
|
|
id: "board",
|
|
name: "board · privado",
|
|
encrypted: true,
|
|
lastMessage: "Os paso el acta cifrada",
|
|
lastTs: m(95),
|
|
unread: 0,
|
|
messages: [
|
|
{ id: "1", sender: "ceo", body: "Reunión a las 18:00", ts: m(120) },
|
|
{ id: "2", sender: "lucas", body: "Anotado", ts: m(96), mine: true },
|
|
{ id: "3", sender: "ceo", body: "Os paso el acta cifrada", ts: m(95) },
|
|
],
|
|
},
|
|
{
|
|
id: "bots",
|
|
name: "bots",
|
|
encrypted: false,
|
|
lastMessage: "echo: ping",
|
|
lastTs: m(210),
|
|
unread: 0,
|
|
messages: [
|
|
{ id: "1", sender: "lucas", body: "!ping", ts: m(212), mine: true },
|
|
{ id: "2", sender: "echobot", body: "echo: ping", ts: m(210) },
|
|
],
|
|
},
|
|
{
|
|
id: "infra",
|
|
name: "infra",
|
|
encrypted: true,
|
|
lastMessage: "magnus + homer + datardos OK",
|
|
lastTs: m(330),
|
|
unread: 1,
|
|
messages: [
|
|
{ id: "1", sender: "leo", body: "magnus + homer + datardos OK", ts: m(330) },
|
|
],
|
|
},
|
|
];
|