diff --git a/apps/dashboard/src/App.tsx b/apps/dashboard/src/App.tsx index 8ef9ce0..78a752b 100644 --- a/apps/dashboard/src/App.tsx +++ b/apps/dashboard/src/App.tsx @@ -7,6 +7,7 @@ import { type StatusSnapshot, fetchDashboardData, runScheduledTaskAction, + sendRoomMessage, } from './api'; import { LOCALES, @@ -44,6 +45,10 @@ const DEFAULT_VIEW: DashboardView = 'inbox'; const HEALTH_STALE_MS = 5 * 60_000; const HEALTH_DOWN_MS = 15 * 60_000; +function makeClientRequestId(): string { + return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`; +} + function isDashboardView( value: string | null | undefined, ): value is DashboardView { @@ -865,13 +870,58 @@ function HealthPanel({ ); } +function RoomMessageForm({ + busy, + onChange, + onSubmit, + t, + value, +}: { + busy: boolean; + onChange: (value: string) => void; + onSubmit: () => void; + t: Messages; + value: string; +}) { + return ( +
+ ); +} + function RoomPanel({ + onSendRoomMessage, + roomMessageKey, snapshots, t, }: { + onSendRoomMessage: ( + roomJid: string, + text: string, + requestId: string, + ) => Promise
@@ -1349,6 +1429,7 @@ function App() {
const [taskActionKey, setTaskActionKey] = useState{t.panels.rooms}
{t.panels.queue}
-