diff --git a/lib/app.dart b/lib/app.dart index 8986641..86c33c0 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -430,6 +430,11 @@ class _NotesAppState extends State final bool? retry = await showDialog( context: dialogCtx, builder: (BuildContext context) => AlertDialog( + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: const Text('No se pudo activar la biometría'), content: const Text( 'No se pudo activar la biometría. ¿Quieres intentarlo de nuevo o entrar sin huella?', diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 6f07984..8540bc0 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -935,6 +935,11 @@ class _CategoryDialogState extends State<_CategoryDialog> { final bool? confirm = await showDialog( context: context, builder: (BuildContext context) => AlertDialog( + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: const Text('Borrar categoría'), content: const Text('¿Seguro que quieres borrar esta categoría?'), actions: [ @@ -943,6 +948,7 @@ class _CategoryDialogState extends State<_CategoryDialog> { child: const Text('Cancelar'), ), TextButton( + style: TextButton.styleFrom(foregroundColor: AppColors.destructive), onPressed: () => Navigator.pop(context, true), child: const Text('Borrar'), ), @@ -957,12 +963,14 @@ class _CategoryDialogState extends State<_CategoryDialog> { try { await widget.repository.deleteCategory(widget.category!.id); await widget.onCategoriesChanged(); - try { - await widget.onRequestSync(); - } catch (_) {} + // Notify parent to switch view to all notes when a category is deleted. + await widget.onCategoryDeleted(); if (mounted) { Navigator.pop(context); } + try { + await widget.onRequestSync(); + } catch (_) {} } catch (e) { if (mounted) { ScaffoldMessenger.of(context).showSnackBar( @@ -975,6 +983,11 @@ class _CategoryDialogState extends State<_CategoryDialog> { @override Widget build(BuildContext context) { return AlertDialog( + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: Text( widget.category == null ? 'Crear categoría' : 'Editar categoría', ), diff --git a/lib/screens/note_editor_screen.dart b/lib/screens/note_editor_screen.dart index 3c6c38c..48572dd 100644 --- a/lib/screens/note_editor_screen.dart +++ b/lib/screens/note_editor_screen.dart @@ -202,7 +202,11 @@ class _NoteEditorScreenState extends State { final bool isDeletedNote = _currentNote.isDeleted; return AlertDialog( - backgroundColor: AppColors.surfaceElevated, + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: Text( isDeletedNote ? 'Eliminar permanentemente' : 'Eliminar nota', style: const TextStyle(color: AppColors.textPrimary), diff --git a/lib/screens/settings_screen.dart b/lib/screens/settings_screen.dart index 97df491..e920990 100644 --- a/lib/screens/settings_screen.dart +++ b/lib/screens/settings_screen.dart @@ -43,6 +43,11 @@ class _SettingsScreenState extends State { final bool? confirmed = await showDialog( context: context, builder: (context) => AlertDialog( + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: const Text('Borrar todos los datos'), content: const Text( '¿Estás seguro? Esta acción eliminará la base de datos local y la clave de cifrado. Asegúrate de tener una copia de seguridad si es necesario o cuenta sincronizada.', @@ -96,6 +101,11 @@ class _SettingsScreenState extends State { final bool? confirmed = await showDialog( context: context, builder: (context) => AlertDialog( + backgroundColor: AppColors.cardBackground, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12), + side: BorderSide(color: AppColors.border), + ), title: const Text('Borrar toda la info del servidor'), content: const Text( '¿Estás seguro? Esta acción eliminará toda la información almacenada en el servidor y no se puede deshacer.', diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index d508daf..2488966 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:notas/theme/app_colors.dart'; class AppTheme { - static ThemeData theme({Color seedColor = Colors.amber}) { + static ThemeData theme({Color seedColor = AppColors.defaultThemeSeedColor}) { final Brightness foregroundBrightness = ThemeData.estimateBrightnessForColor(seedColor); final Color foregroundColor = foregroundBrightness == Brightness.dark