fix: merge duplicate symbols, expand Zoroastrian citations, add reading deletion to sessions, and deduplicate Word of the Day
This commit is contained in:
@@ -152,6 +152,35 @@ class _CrossSystemComparisonScreenState extends State<CrossSystemComparisonScree
|
||||
);
|
||||
}
|
||||
|
||||
void _confirmDeleteReading(SyncreticReading reading) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
backgroundColor: const Color(0xFF151829),
|
||||
title: const Text('Удалить расклад?', style: TextStyle(color: Color(0xFFFFF9C4), fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
content: Text('Удалить «${reading.systemName} (${reading.layoutTitle})» из текущей сессии дня?', style: const TextStyle(color: Color(0xFFECEFF1), fontSize: 13)),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(ctx),
|
||||
child: const Text('Отмена', style: TextStyle(color: Color(0xFF8C93B8))),
|
||||
),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(backgroundColor: const Color(0xFFEF5350), foregroundColor: Colors.white),
|
||||
onPressed: () async {
|
||||
Navigator.pop(ctx);
|
||||
await _repo.removeReadingFromSyncreticSession(reading.id);
|
||||
setState(() {
|
||||
_session = _repo.currentSyncreticSession;
|
||||
});
|
||||
HapticFeedback.mediumImpact();
|
||||
},
|
||||
child: const Text('Удалить'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final readings = _session.readings;
|
||||
@@ -332,6 +361,11 @@ class _CrossSystemComparisonScreenState extends State<CrossSystemComparisonScree
|
||||
],
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close_rounded, size: 20, color: Color(0xFFEF5350)),
|
||||
tooltip: 'Удалить из сессии',
|
||||
onPressed: () => _confirmDeleteReading(reading),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
|
||||
Reference in New Issue
Block a user