diff --git a/newwhats.clube67.com/newwhats.local/frontend/pages/baileys/index.tsx b/newwhats.clube67.com/newwhats.local/frontend/pages/baileys/index.tsx index 45b77ed..e6d1140 100644 --- a/newwhats.clube67.com/newwhats.local/frontend/pages/baileys/index.tsx +++ b/newwhats.clube67.com/newwhats.local/frontend/pages/baileys/index.tsx @@ -7,6 +7,7 @@ import { ArrowDownLeft, ArrowUpRight, Filter, LayoutGrid, ShieldCheck, Clock } from 'lucide-react'; import { io, Socket } from 'socket.io-client'; +import { useAuthStore } from '../../store/authStore'; // ─── Types ──────────────────────────────────────────────────────────────────── @@ -502,6 +503,9 @@ function SessionCard({ // ─── Main Page ───────────────────────────────────────────────────────────────── export default function BaileysPage() { + const user = useAuthStore((s) => s.user); + // Termo técnico "Baileys" só para admin ou ruibto@gmail.com. + const canSeeTech = user?.role === 'ADMIN' || user?.email === 'ruibto@gmail.com'; const [sessions, setSessions] = useState>(new Map()); const [selectedSession, setSelectedSession] = useState(null); const [listening, setListening] = useState(true); @@ -702,7 +706,7 @@ export default function BaileysPage() {
-

Baileys Engine

+

{canSeeTech ? 'Baileys Engine' : 'Monitor de Eventos'}

{sessionList.length} {sessionList.length === 1 ? 'sessão' : 'sessões'} monitoradas

@@ -742,7 +746,7 @@ export default function BaileysPage() {

Nenhuma sessão detectada

-

Aguardando eventos do servidor Baileys...

+

Aguardando eventos do servidor{canSeeTech ? ' Baileys' : ''}...

) : (