chat firebase, menu admin horizontal e voltar

This commit is contained in:
Armando Soares 2026-09-16 05:52:06 +00:00
parent 96ef241731
commit d0f3ba8655
4 changed files with 33 additions and 6 deletions

View File

@ -78,6 +78,7 @@ export class ChatService {
}
private databaseUrl() {
return this.config.get<string>('FIREBASE_DATABASE_URL')?.replace(/\/$/, '') ?? '';
const configured = this.config.get<string>('FIREBASE_DATABASE_URL')?.replace(/\/$/, '') ?? '';
return configured || 'https://sinka-8ec10-default-rtdb.firebaseio.com';
}
}

View File

@ -55,6 +55,7 @@ services:
MYSQL_ADMIN_URL: mysql://root:${MYSQL_ROOT_PASSWORD:-root}@mysql:3306
REDIS_URL: redis://redis:6379
UPLOAD_DIR: /data/uploads
FIREBASE_DATABASE_URL: ${FIREBASE_DATABASE_URL:-https://sinka-8ec10-default-rtdb.firebaseio.com}
volumes:
- sinka_uploads:/data/uploads
ports:

View File

@ -66,7 +66,7 @@ export function RestrictedShell({
const links =
kind === "platform"
? [{ href: "/admin", label: "Empresas" }]
? [{ href: "/admin", label: "Clientes" }]
: [
{ href: basePath, label: "Dashboard" },
{ href: `${basePath}/simular`, label: "Simular" },
@ -86,10 +86,30 @@ export function RestrictedShell({
return (
<div className="min-h-dvh bg-black text-[#E8F4E5]">
<header className="border-b border-white/10">
<div className="mx-auto flex max-w-6xl items-center justify-between gap-4 px-5 py-4">
<Link href={basePath}>
<Image src="/brand/sinka-logo.webp" alt="Sinka" width={160} height={52} className="h-7 w-auto" />
</Link>
<div className="mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-4 px-5 py-4">
<div className="flex flex-wrap items-center gap-8">
<Link href={basePath}>
<Image src="/brand/sinka-logo.webp" alt="Sinka" width={160} height={52} className="h-7 w-auto" />
</Link>
<nav className="flex items-center gap-6 text-base">
{links.map((link) => {
const active = pathname === link.href;
return (
<Link
key={link.href}
href={link.href}
className={
active
? "font-medium text-[#82C85C]"
: "text-[#E8F4E5]/70 transition hover:text-[#E8F4E5]"
}
>
{link.label}
</Link>
);
})}
</nav>
</div>
<div className="flex items-center gap-3 text-sm">
<div className="hidden text-right sm:block">
<p className="font-medium">{user.name}</p>

View File

@ -94,6 +94,11 @@ export function SupportChat({
return (
<section className="flex min-h-[28rem] flex-col">
<p className="text-xs font-semibold uppercase tracking-[0.28em] text-[#82C85C]">Chat</p>
{user?.kind === "platform" ? (
<a href="/admin" className="mt-4 inline-flex text-sm text-[#82C85C] hover:underline">
Voltar para clientes
</a>
) : null}
<h1 className="font-display mt-2 text-4xl font-extrabold uppercase">{heading}</h1>
{error ? <p className="mt-4 text-sm text-red-300">{error}</p> : null}