mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-19 08:03:06 +00:00
No mobile (<768px) staff perde o botão de abrir sidebar na top bar (CampaignMobileTopBar role-gated via useCampaignPageChromeRole + isStaffCampaignRole; leader mantém) e o sheet de navegação deixa de montar (CampaignSidebar early-return quando isMobile && staff). Filtros salvos de Municípios (B18) migram para o drawer Mais (MunicipalityNavSavedFilters variant 'overflow', mesma store, apagar/desfazer/sucessão de foco; drawer ganha overflow-y-auto). Correção de bug pré-existente (D4): o Toaster vivia dentro do wrapper [contain:layout_paint] do painel da AI, que vira containing block para position:fixed e stacking context próprio — toasts com ação (ex. Desfazer) ficavam inalcançáveis sob os portais z-50 de drawer/sheet. Movido para o root layout (campaign). Testes: unit top bar (staff sem trigger / leader com trigger) + e2e (staff sem trigger/dialog, leader com sheet, B18 no drawer completo).
58 lines
1.7 KiB
TypeScript
58 lines
1.7 KiB
TypeScript
import type { Metadata, Viewport } from 'next'
|
|
import { Inter } from 'next/font/google'
|
|
import React from 'react'
|
|
|
|
import { CampaignIosViewportHeal } from '@/components/campaign/shell/CampaignIosViewportHeal'
|
|
import { RegisterServiceWorker } from '@/components/campaign/shell/RegisterServiceWorker'
|
|
import { Toaster } from '@/components/ui/Toaster'
|
|
import { CAMPAIGN_PWA_MANIFEST_PATH, CAMPAIGN_PWA_THEME_COLOR } from '@/utilities/campaignPwa'
|
|
|
|
import '../(frontend)/styles.css'
|
|
|
|
const inter = Inter({ subsets: ['latin'], variable: '--font-sans' })
|
|
|
|
export const metadata: Metadata = {
|
|
title: {
|
|
default: 'Campanha',
|
|
template: 'Solla - Campanha - %s',
|
|
},
|
|
robots: {
|
|
index: false,
|
|
follow: false,
|
|
},
|
|
manifest: CAMPAIGN_PWA_MANIFEST_PATH,
|
|
appleWebApp: {
|
|
capable: true,
|
|
title: 'Campanha',
|
|
statusBarStyle: 'default',
|
|
},
|
|
icons: {
|
|
apple: '/campaign-icons/apple-touch-icon.png',
|
|
},
|
|
}
|
|
|
|
export const viewport: Viewport = {
|
|
themeColor: CAMPAIGN_PWA_THEME_COLOR,
|
|
}
|
|
|
|
export default function CampanhaRootLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<html
|
|
lang="pt-BR"
|
|
data-theme="campaign"
|
|
className={inter.variable}
|
|
style={{ colorScheme: 'light' }}
|
|
>
|
|
<body className="bg-background bg-none text-foreground antialiased">
|
|
{children}
|
|
{/* Outside the (app) shells on purpose: the AI panel's `contain:layout
|
|
paint` wrapper would trap the toaster's `position: fixed` under the
|
|
portal z-50 of sheets/drawers, making action toasts (e.g. undo)
|
|
unclickable while a modal is open (C102). */}
|
|
<Toaster position="top-center" />
|
|
<RegisterServiceWorker />
|
|
<CampaignIosViewportHeal />
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|