From 3e84c0b88fdee13220fd64aa0527c261dce90294 Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Tue, 11 Nov 2025 17:19:36 +0000 Subject: [PATCH] Create Staff Chat page for internal communication cgen-7dd6e40b75974bc48a5159d937722f5e --- client/pages/StaffChat.tsx | 190 +++++++++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 client/pages/StaffChat.tsx diff --git a/client/pages/StaffChat.tsx b/client/pages/StaffChat.tsx new file mode 100644 index 00000000..3c83f909 --- /dev/null +++ b/client/pages/StaffChat.tsx @@ -0,0 +1,190 @@ +import { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import Layout from "@/components/Layout"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { + Card, + CardContent, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { MessageSquare, Send, ExternalLink, Hash, Lock } from "lucide-react"; + +const CHANNELS = [ + { id: 1, name: "general", type: "public", members: 12, unread: 3 }, + { id: 2, name: "engineering", type: "public", members: 8, unread: 0 }, + { id: 3, name: "operations", type: "public", members: 5, unread: 1 }, + { id: 4, name: "announcements", type: "locked", members: 15, unread: 2 }, +]; + +const MESSAGES = [ + { + id: 1, + author: "John Founder", + content: "Welcome to the AeThex staff chat!", + timestamp: "10:30 AM", + isOwn: false, + }, + { + id: 2, + author: "Sarah Dev", + content: "Great to have everyone here", + timestamp: "10:32 AM", + isOwn: false, + }, + { + id: 3, + author: "You", + content: "Looking forward to collaborating", + timestamp: "10:35 AM", + isOwn: true, + }, +]; + +export default function StaffChat() { + const navigate = useNavigate(); + const [selectedChannel, setSelectedChannel] = useState(CHANNELS[0]); + const [message, setMessage] = useState(""); + + const handleSend = () => { + if (message.trim()) { + setMessage(""); + } + }; + + return ( + +
+
+
+
+

+ Staff Chat +

+

+ + Internal team communication +

+
+ +
+ +
+ {/* Channels Sidebar */} + + + Channels + + + {CHANNELS.map((channel) => ( + + ))} + + + + {/* Chat Area */} + + {/* Channel Header */} + + + {selectedChannel.type === "locked" ? ( + + ) : ( + + )} + {selectedChannel.name} + + + + {/* Messages */} + + {MESSAGES.map((msg) => ( +
+
+ {!msg.isOwn && ( +

+ {msg.author} +

+ )} +

{msg.content}

+

+ {msg.timestamp} +

+
+
+ ))} +
+ + {/* Input */} +
+
+ setMessage(e.target.value)} + onKeyPress={(e) => + e.key === "Enter" && handleSend() + } + className="bg-slate-800/50 border-purple-500/20 text-white placeholder:text-gray-500" + /> + +
+
+
+
+
+
+
+ ); +}