mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
Simplifica tipografia para fonte America
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import { fetchDashboardNotifications } from "@/features/dashboard/notifications-queries";
|
||||
import { fetchPendingInboxCount } from "@/features/inbox/queries";
|
||||
import { AppNavbar } from "@/shared/components/navigation/navbar/app-navbar";
|
||||
import { FontProvider } from "@/shared/components/providers/font-provider";
|
||||
import { PrivacyProvider } from "@/shared/components/providers/privacy-provider";
|
||||
import { getUserSession } from "@/shared/lib/auth/server";
|
||||
import { fetchPagadoresWithAccess } from "@/shared/lib/payers/access";
|
||||
import { PAGADOR_ROLE_ADMIN } from "@/shared/lib/payers/constants";
|
||||
import { fetchUserFontPreferences } from "@/shared/lib/preferences/fonts";
|
||||
import { parsePeriodParam } from "@/shared/utils/period";
|
||||
|
||||
export default async function DashboardLayout({
|
||||
@@ -36,35 +34,27 @@ export default async function DashboardLayout({
|
||||
const { period: currentPeriod } = parsePeriodParam(
|
||||
singlePeriodoParam ?? null,
|
||||
);
|
||||
// Buscar notificações, contagem de pré-lançamentos e preferências de fonte em paralelo
|
||||
const [notificationsSnapshot, preLancamentosCount, fontPrefs] =
|
||||
await Promise.all([
|
||||
fetchDashboardNotifications(session.user.id, currentPeriod),
|
||||
fetchPendingInboxCount(session.user.id),
|
||||
fetchUserFontPreferences(session.user.id),
|
||||
]);
|
||||
const [notificationsSnapshot, preLancamentosCount] = await Promise.all([
|
||||
fetchDashboardNotifications(session.user.id, currentPeriod),
|
||||
fetchPendingInboxCount(session.user.id),
|
||||
]);
|
||||
|
||||
return (
|
||||
<FontProvider
|
||||
systemFont={fontPrefs.systemFont}
|
||||
moneyFont={fontPrefs.moneyFont}
|
||||
>
|
||||
<PrivacyProvider>
|
||||
<AppNavbar
|
||||
user={{ ...session.user, image: session.user.image ?? null }}
|
||||
pagadorAvatarUrl={adminPagador?.avatarUrl ?? null}
|
||||
preLancamentosCount={preLancamentosCount}
|
||||
notificationsSnapshot={notificationsSnapshot}
|
||||
/>
|
||||
<div className="relative flex flex-1 flex-col pt-16">
|
||||
<div className="pointer-events-none absolute inset-0" />
|
||||
<div className="@container/main flex flex-1 flex-col gap-2">
|
||||
<div className="flex flex-col gap-4 py-5 md:gap-6 w-full max-w-8xl mx-auto px-4 ">
|
||||
{children}
|
||||
</div>
|
||||
<PrivacyProvider>
|
||||
<AppNavbar
|
||||
user={{ ...session.user, image: session.user.image ?? null }}
|
||||
pagadorAvatarUrl={adminPagador?.avatarUrl ?? null}
|
||||
preLancamentosCount={preLancamentosCount}
|
||||
notificationsSnapshot={notificationsSnapshot}
|
||||
/>
|
||||
<div className="relative flex flex-1 flex-col pt-16">
|
||||
<div className="pointer-events-none absolute inset-0" />
|
||||
<div className="@container/main flex flex-1 flex-col gap-2">
|
||||
<div className="flex flex-col gap-4 py-5 md:gap-6 w-full max-w-8xl mx-auto px-4 ">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</PrivacyProvider>
|
||||
</FontProvider>
|
||||
</div>
|
||||
</PrivacyProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import { UpdateEmailForm } from "@/features/settings/components/update-email-for
|
||||
import { UpdateNameForm } from "@/features/settings/components/update-name-form";
|
||||
import { UpdatePasswordForm } from "@/features/settings/components/update-password-form";
|
||||
import { fetchAjustesPageData } from "@/features/settings/queries";
|
||||
import { DEFAULT_FONT_KEY } from "@/public/fonts/font_index";
|
||||
import { Card } from "@/shared/components/ui/card";
|
||||
import {
|
||||
Tabs,
|
||||
@@ -78,8 +77,6 @@ export default async function Page() {
|
||||
lancamentosColumnOrder={
|
||||
userPreferences?.lancamentosColumnOrder ?? null
|
||||
}
|
||||
systemFont={userPreferences?.systemFont ?? DEFAULT_FONT_KEY}
|
||||
moneyFont={userPreferences?.moneyFont ?? DEFAULT_FONT_KEY}
|
||||
/>
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
}
|
||||
|
||||
:root {
|
||||
/* Font customization */
|
||||
--font-app: var(--font-ai-sans);
|
||||
--font-money: var(--font-ai-sans);
|
||||
|
||||
/* Base surfaces - warm cream with subtle orange undertone */
|
||||
--background: oklch(98.01% 0.00331 67.026);
|
||||
--foreground: #201207;
|
||||
@@ -186,8 +182,7 @@
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--default-font-family: var(--font-app);
|
||||
--default-mono-font-family: var(--font-money);
|
||||
--default-font-family: var(--font-america);
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
@@ -259,6 +254,7 @@
|
||||
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
font-family: var(--font-america), sans-serif;
|
||||
}
|
||||
|
||||
*::selection {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Analytics } from "@vercel/analytics/next";
|
||||
import { SpeedInsights } from "@vercel/speed-insights/next";
|
||||
import type { Metadata } from "next";
|
||||
import { allFontVariables } from "@/public/fonts/font_index";
|
||||
import { ThemeProvider } from "@/shared/components/providers/theme-provider";
|
||||
import { Toaster } from "@/shared/components/ui/sonner";
|
||||
import "./globals.css";
|
||||
import { america } from "@/public/fonts/font_index";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
@@ -21,7 +21,11 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="pt-BR" className={allFontVariables} suppressHydrationWarning>
|
||||
<html
|
||||
lang="pt-BR"
|
||||
className={`${america.variable} ${america.className}`}
|
||||
suppressHydrationWarning
|
||||
>
|
||||
<head>
|
||||
<meta name="apple-mobile-web-app-title" content="OpenMonetis" />
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user