diff --git a/backend/src/auth/auth.service.ts b/backend/src/auth/auth.service.ts index f1fdd4e..472f432 100644 --- a/backend/src/auth/auth.service.ts +++ b/backend/src/auth/auth.service.ts @@ -22,7 +22,7 @@ export class AuthService { role: dto.role, }); - return this.generateToken(user.id, user.email, user.role); + return this.generateToken(user.id, user.email, user.role, user.name); } async login(dto: LoginDto) { @@ -39,11 +39,11 @@ export class AuthService { throw new UnauthorizedException('Credenciais inválidas'); } - return this.generateToken(user.id, user.email, user.role); + return this.generateToken(user.id, user.email, user.role, user.name); } - private generateToken(userId: string, email: string, role: string) { - const payload = { sub: userId, email, role }; + private generateToken(userId: string, email: string, role: string, name: string) { + const payload = { sub: userId, email, role, name }; return { access_token: this.jwtService.sign(payload), }; diff --git a/backend/src/auth/strategies/jwt.strategy.ts b/backend/src/auth/strategies/jwt.strategy.ts index c3c9928..121c4db 100644 --- a/backend/src/auth/strategies/jwt.strategy.ts +++ b/backend/src/auth/strategies/jwt.strategy.ts @@ -16,7 +16,7 @@ export class JwtStrategy extends PassportStrategy(Strategy) { }); } - async validate(payload: { sub: string; email: string; role: string }) { - return { id: payload.sub, email: payload.email, role: payload.role }; + async validate(payload: { sub: string; email: string; role: string; name: string }) { + return { id: payload.sub, email: payload.email, role: payload.role, name: payload.name }; } } diff --git a/frontend/public/file.svg b/frontend/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/frontend/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/globe.svg b/frontend/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/frontend/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/next.svg b/frontend/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/frontend/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/pokecenter_icon.ico b/frontend/public/pokecenter_icon.ico new file mode 100644 index 0000000..cea15f4 Binary files /dev/null and b/frontend/public/pokecenter_icon.ico differ diff --git a/frontend/public/vercel.svg b/frontend/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/frontend/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/window.svg b/frontend/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/frontend/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index faa12e3..1e67ccb 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -1,4 +1,44 @@ @import "tailwindcss"; @plugin "daisyui" { - themes: garden --default; + themes: pokemon --default; +} + + +@plugin "daisyui/theme" { + name: "PokeCenter"; + default: true; + prefersdark: false; + color-scheme: "light"; + --color-base-100: oklch(98% 0.001 106.423); + --color-base-200: oklch(92% 0.003 48.717); + --color-base-300: oklch(86% 0.005 56.366); + --color-base-content: oklch(21% 0.006 285.885); + --color-primary: oklch(60% 0.118 184.704); + --color-primary-content: oklch(97% 0.021 166.113); + --color-secondary: oklch(66% 0.179 58.318); + --color-secondary-content: oklch(98% 0.022 95.277); + --color-accent: oklch(38% 0.063 188.416); + --color-accent-content: oklch(96% 0.018 272.314); + --color-neutral: oklch(37% 0.01 67.558); + --color-neutral-content: oklch(98% 0 0); + --color-info: oklch(50% 0.134 242.749); + --color-info-content: oklch(97% 0.013 236.62); + --color-success: oklch(59% 0.145 163.225); + --color-success-content: oklch(98% 0.014 180.72); + --color-warning: oklch(55% 0.135 66.442); + --color-warning-content: oklch(98% 0.026 102.212); + --color-error: oklch(51% 0.222 16.935); + --color-error-content: oklch(97% 0.013 17.38); + --radius-selector: 0.5rem; + --radius-field: 0.5rem; + --radius-box: 0.5rem; + --size-selector: 0.25rem; + --size-field: 0.25rem; + --border: 1.5px; + --depth: 1; + --noise: 1; +} + +body { + font-family: var(--font-lato), sans-serif; } \ No newline at end of file diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx index 37e0d7c..86e6236 100644 --- a/frontend/src/app/layout.tsx +++ b/frontend/src/app/layout.tsx @@ -1,9 +1,21 @@ import type { Metadata } from 'next'; +import { Lato } from 'next/font/google'; import './globals.css'; +import Footer from '@/components/ui/Footer'; + +const lato = Lato({ + subsets: ['latin'], + weight: ['300', '400', '700', '900'], + variable: '--font-lato', + display: 'swap', +}); export const metadata: Metadata = { - title: 'Centro Pokémon', + title: 'PokéCenter', description: 'Sistema de gerenciamento de Pokémons', + icons: { + icon: 'pokecenter_icon.ico', + } }; export default function RootLayout({ @@ -12,8 +24,11 @@ export default function RootLayout({ children: React.ReactNode; }) { return ( - -
{children} + + + {children} + + ); } \ No newline at end of file diff --git a/frontend/src/components/pokemon/PokemonForm.tsx b/frontend/src/components/pokemon/PokemonForm.tsx index 2e6b452..d515691 100644 --- a/frontend/src/components/pokemon/PokemonForm.tsx +++ b/frontend/src/components/pokemon/PokemonForm.tsx @@ -132,11 +132,29 @@ export default function PokemonForm({ initialData, onSubmit, isLoading }: Pokemo )} - {/* Busca na PokéAPI com autocomplete */} -