chat firebase, menu admin horizontal e voltar
This commit is contained in:
parent
96ef241731
commit
d0f3ba8655
@ -78,6 +78,7 @@ export class ChatService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private databaseUrl() {
|
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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -55,6 +55,7 @@ services:
|
|||||||
MYSQL_ADMIN_URL: mysql://root:${MYSQL_ROOT_PASSWORD:-root}@mysql:3306
|
MYSQL_ADMIN_URL: mysql://root:${MYSQL_ROOT_PASSWORD:-root}@mysql:3306
|
||||||
REDIS_URL: redis://redis:6379
|
REDIS_URL: redis://redis:6379
|
||||||
UPLOAD_DIR: /data/uploads
|
UPLOAD_DIR: /data/uploads
|
||||||
|
FIREBASE_DATABASE_URL: ${FIREBASE_DATABASE_URL:-https://sinka-8ec10-default-rtdb.firebaseio.com}
|
||||||
volumes:
|
volumes:
|
||||||
- sinka_uploads:/data/uploads
|
- sinka_uploads:/data/uploads
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@ -66,7 +66,7 @@ export function RestrictedShell({
|
|||||||
|
|
||||||
const links =
|
const links =
|
||||||
kind === "platform"
|
kind === "platform"
|
||||||
? [{ href: "/admin", label: "Empresas" }]
|
? [{ href: "/admin", label: "Clientes" }]
|
||||||
: [
|
: [
|
||||||
{ href: basePath, label: "Dashboard" },
|
{ href: basePath, label: "Dashboard" },
|
||||||
{ href: `${basePath}/simular`, label: "Simular" },
|
{ href: `${basePath}/simular`, label: "Simular" },
|
||||||
@ -86,10 +86,30 @@ export function RestrictedShell({
|
|||||||
return (
|
return (
|
||||||
<div className="min-h-dvh bg-black text-[#E8F4E5]">
|
<div className="min-h-dvh bg-black text-[#E8F4E5]">
|
||||||
<header className="border-b border-white/10">
|
<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">
|
<div className="mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-4 px-5 py-4">
|
||||||
<Link href={basePath}>
|
<div className="flex flex-wrap items-center gap-8">
|
||||||
<Image src="/brand/sinka-logo.webp" alt="Sinka" width={160} height={52} className="h-7 w-auto" />
|
<Link href={basePath}>
|
||||||
</Link>
|
<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="flex items-center gap-3 text-sm">
|
||||||
<div className="hidden text-right sm:block">
|
<div className="hidden text-right sm:block">
|
||||||
<p className="font-medium">{user.name}</p>
|
<p className="font-medium">{user.name}</p>
|
||||||
|
|||||||
@ -94,6 +94,11 @@ export function SupportChat({
|
|||||||
return (
|
return (
|
||||||
<section className="flex min-h-[28rem] flex-col">
|
<section className="flex min-h-[28rem] flex-col">
|
||||||
<p className="text-xs font-semibold uppercase tracking-[0.28em] text-[#82C85C]">Chat</p>
|
<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>
|
<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}
|
{error ? <p className="mt-4 text-sm text-red-300">{error}</p> : null}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user