diff --git a/mobile/agent.md b/mobile/agent.md index 9ac03b4..ec4419e 100644 --- a/mobile/agent.md +++ b/mobile/agent.md @@ -392,6 +392,7 @@ Base: `EXPO_PUBLIC_API_URL` (padrão: `http://localhost:3000/api/v1`) - **Arquivo**: `app/(app)/inventory/[id]/edit.tsx` - **Mudança**: `onSubmit()` agora chama `updateFilamentUseCase.execute()` em vez de apenas atualizar o store local - **Código**: + ```typescript const onSubmit = async () => { try { @@ -415,6 +416,7 @@ Base: `EXPO_PUBLIC_API_URL` (padrão: `http://localhost:3000/api/v1`) } }; ``` + - **Impacto**: Edições de filamento agora persistem no servidor #### 4. **Custom Color Picker — Hex Input com Validação** @@ -473,6 +475,41 @@ Base: `EXPO_PUBLIC_API_URL` (padrão: `http://localhost:3000/api/v1`) - Refresh: `listFilamentsUseCase` → `setFilaments(result)` - Create: `createFilamentUseCase` → `addFilament(result)` +#### 6. **CatIcon com Fundo Turquesa — Design Integration** + +- **Arquivos**: `src/presentation/components/icons/CatIcon.tsx`, `app/(auth)/login.tsx` +- **Mudança**: Implementação de suporte a fundo turquesa no ícone CatIcon conforme design Paper +- **Novas Props**: + ```typescript + interface CatIconProps { + size?: number; // tamanho do SVG (padrão: 48px) + color?: string; // cor do ícone (padrão: #14120F) + withBackground?: boolean; // ativar fundo (padrão: false) + backgroundColor?: string; // cor do fundo (padrão: #38BCC2 — accent turquesa) + } + ``` +- **Implementação**: Quando `withBackground={true}`, o componente envolve o SVG em um `View` com: + - Tamanho: 80×80px + - Background color: `#38BCC2` (accent turquesa) + - Border radius: 24px + - Flexbox centered + +- **Uso na tela de Login** (G3-0): + + ```typescript + // Antes: + + + + + // Depois: + + ``` + +- **Remoção**: Deletado `logoContainer` style antigo do `StyleSheet` +- **Resultado**: Ícone agora exibe com fundo turquesa arredondado, alinhado com design do Paper +- **Impacto**: Visual correto da tela de login (G3-0) sincronizado com mockups + ### Arquitetura Mantida - Todos use cases injetados via `container.ts` (Dependency Injection) diff --git a/mobile/app/(auth)/login.tsx b/mobile/app/(auth)/login.tsx index 3f4ced2..cdc43d3 100644 --- a/mobile/app/(auth)/login.tsx +++ b/mobile/app/(auth)/login.tsx @@ -11,6 +11,7 @@ import { Button } from '@presentation/components/ui/Button'; import { colors, typography, spacing } from '@shared/theme'; import { loginUseCase } from '@infrastructure/container'; import { useAuthStore } from '@store/authStore'; +import { CatIcon } from '@presentation/components/icons/CatIcon'; const schema = z.object({ email: z.string().email('E-mail inválido'), @@ -64,9 +65,7 @@ export default function LoginScreen(): React.ReactElement { {/* Logo */} - - - + MeowSpool Gerencie seus filamentos com precisão. @@ -78,7 +77,7 @@ export default function LoginScreen(): React.ReactElement { name="email" render={({ field }) => ( ( } @@ -149,15 +148,6 @@ const styles = StyleSheet.create({ paddingBottom: spacing[10], gap: spacing[2], }, - logoContainer: { - width: 80, - height: 80, - borderRadius: 20, - backgroundColor: colors.bgSurface, - alignItems: 'center', - justifyContent: 'center', - marginBottom: spacing[2], - }, appName: { fontFamily: typography.fontFamily.ui, fontSize: typography.fontSize['2xl'], diff --git a/mobile/assets/adaptive-icon.png b/mobile/assets/adaptive-icon.png index f7d0f26..109969b 100644 Binary files a/mobile/assets/adaptive-icon.png and b/mobile/assets/adaptive-icon.png differ diff --git a/mobile/assets/cat.svg b/mobile/assets/cat.svg new file mode 100644 index 0000000..4078571 --- /dev/null +++ b/mobile/assets/cat.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/mobile/assets/favicon.png b/mobile/assets/favicon.png index b4e5143..f7d0f26 100644 Binary files a/mobile/assets/favicon.png and b/mobile/assets/favicon.png differ diff --git a/mobile/assets/icon-template.svg b/mobile/assets/icon-template.svg new file mode 100644 index 0000000..2f8e210 --- /dev/null +++ b/mobile/assets/icon-template.svg @@ -0,0 +1,99 @@ + + diff --git a/mobile/assets/icon.png b/mobile/assets/icon.png index b2b7989..109969b 100644 Binary files a/mobile/assets/icon.png and b/mobile/assets/icon.png differ diff --git a/mobile/src/presentation/components/icons/CatIcon.tsx b/mobile/src/presentation/components/icons/CatIcon.tsx new file mode 100644 index 0000000..251c798 --- /dev/null +++ b/mobile/src/presentation/components/icons/CatIcon.tsx @@ -0,0 +1,107 @@ +import React from 'react'; +import { View } from 'react-native'; +import Svg, { G, Path } from 'react-native-svg'; + +interface CatIconProps { + size?: number; + color?: string; + withBackground?: boolean; + backgroundColor?: string; +} + +export function CatIcon({ + size = 48, + color = '#14120F', + withBackground = false, + backgroundColor = '#38BCC2', +}: CatIconProps): React.ReactElement { + const containerSize = 80; + const borderRadius = 24; + + const svgElement = ( + + + + + + + + + + + + + + + + + + ); + + if (withBackground) { + return ( + + {svgElement} + + ); + } + + return svgElement; +}