mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-03-10 04:51:47 +00:00
refactor: melhorias de UI e responsividade mobile
- Corrigir layout truncado no card de parcelas (analise-parcelas) - Empilhar cards de top estabelecimentos e categorias no mobile - Ajustes gerais de responsividade em múltiplos componentes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export function AppNavbar({
|
||||
notificationsSnapshot,
|
||||
}: AppNavbarProps) {
|
||||
return (
|
||||
<header className="fixed top-0 left-0 right-0 z-50 h-15 shrink-0 flex items-center bg-card backdrop-blur-lg supports-backdrop-filter:bg-card/60">
|
||||
<header className="fixed top-0 left-0 right-0 z-50 h-16 shrink-0 flex items-center bg-card backdrop-blur-lg supports-backdrop-filter:bg-card/50">
|
||||
<div className="w-full max-w-8xl mx-auto px-4 flex items-center gap-4 h-full">
|
||||
{/* Logo */}
|
||||
<Link href="/dashboard" className="shrink-0 mr-1">
|
||||
|
||||
@@ -18,6 +18,7 @@ export type NavItem = {
|
||||
icon: React.ReactNode;
|
||||
badge?: number;
|
||||
preservePeriod?: boolean;
|
||||
hideOnMobile?: boolean;
|
||||
};
|
||||
|
||||
export type NavSection = {
|
||||
@@ -44,6 +45,7 @@ export const NAV_SECTIONS: NavSection[] = [
|
||||
href: "/calendario",
|
||||
label: "calendário",
|
||||
icon: <RiCalendarEventLine className="size-4" />,
|
||||
hideOnMobile: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@ export function NavMenu() {
|
||||
return (
|
||||
<>
|
||||
{/* Desktop */}
|
||||
<nav className="hidden md:flex items-center flex-1">
|
||||
<nav className="hidden md:flex items-center justify-center flex-1">
|
||||
<NavigationMenu viewport={false}>
|
||||
<NavigationMenuList className="gap-0">
|
||||
<NavigationMenuItem>
|
||||
@@ -63,13 +63,13 @@ export function NavMenu() {
|
||||
</NavigationMenu>
|
||||
</nav>
|
||||
|
||||
{/* Mobile */}
|
||||
{/* Mobile - order-[-1] places hamburger before logo visually */}
|
||||
<Sheet open={sheetOpen} onOpenChange={setSheetOpen}>
|
||||
<SheetTrigger asChild>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
className="md:hidden text-foreground hover:bg-foreground/10 hover:text-foreground"
|
||||
className="-order-1 md:hidden text-foreground hover:bg-foreground/10 hover:text-foreground"
|
||||
>
|
||||
<RiMenuLine className="size-5" />
|
||||
<span className="sr-only">Abrir menu</span>
|
||||
@@ -86,26 +86,32 @@ export function NavMenu() {
|
||||
onClick={close}
|
||||
preservePeriod
|
||||
>
|
||||
Dashboard
|
||||
dashboard
|
||||
</MobileLink>
|
||||
|
||||
{NAV_SECTIONS.map((section) => (
|
||||
<div key={section.label}>
|
||||
<MobileSectionLabel label={section.label} />
|
||||
{section.items.map((item) => (
|
||||
<MobileLink
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
icon={item.icon}
|
||||
onClick={close}
|
||||
badge={item.badge}
|
||||
preservePeriod={item.preservePeriod}
|
||||
>
|
||||
{item.label}
|
||||
</MobileLink>
|
||||
))}
|
||||
</div>
|
||||
))}
|
||||
{NAV_SECTIONS.map((section) => {
|
||||
const mobileItems = section.items.filter(
|
||||
(item) => !item.hideOnMobile,
|
||||
);
|
||||
if (mobileItems.length === 0) return null;
|
||||
return (
|
||||
<div key={section.label}>
|
||||
<MobileSectionLabel label={section.label} />
|
||||
{mobileItems.map((item) => (
|
||||
<MobileLink
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
icon={item.icon}
|
||||
onClick={close}
|
||||
badge={item.badge}
|
||||
preservePeriod={item.preservePeriod}
|
||||
>
|
||||
{item.label}
|
||||
</MobileLink>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
<MobileSectionLabel label="Ferramentas" />
|
||||
<MobileTools onClose={close} />
|
||||
|
||||
Reference in New Issue
Block a user