emojis removed, updated headers, added spectate mode
This commit is contained in:
+138
-62
@@ -376,13 +376,24 @@ Future<void> _renameFolder(String oldFolderName) async {
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
child: Center(
|
||||
child: Text(
|
||||
isTournament ? _t('Tournament Mode 🏆') : _t('Mark as Tournament 🏆'),
|
||||
style: TextStyle(
|
||||
color: isTournament ? _bulletColor : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.emoji_events,
|
||||
size: 16,
|
||||
color: isTournament ? _bulletColor : Colors.white70,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
isTournament ? _t('Tournament Mode') : _t('Mark as Tournament'),
|
||||
style: TextStyle(
|
||||
color: isTournament ? _bulletColor : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -594,14 +605,14 @@ Widget _buildFolderRow(String folderName) {
|
||||
: 'Unknown Date';
|
||||
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
|
||||
margin: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300],
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
// Header section: Name and Date
|
||||
// Header section with grey background like toolbars
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
@@ -613,40 +624,56 @@ Widget _buildFolderRow(String folderName) {
|
||||
topRight: Radius.circular(12),
|
||||
),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[900],
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(12),
|
||||
topRight: Radius.circular(12),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
// Small colored indicator
|
||||
// White indicator line
|
||||
Container(
|
||||
width: 4,
|
||||
height: 20,
|
||||
decoration: BoxDecoration(
|
||||
color: _bulletColor,
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
_folderTypes[folderName] == true
|
||||
? '🏆 $folderName'
|
||||
: folderName,
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: _bulletColor),
|
||||
const SizedBox(width: 12),
|
||||
Row(
|
||||
children: [
|
||||
if (_folderTypes[folderName] == true) ...[
|
||||
const Icon(Icons.emoji_events, size: 18, color: Colors.white),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
Text(
|
||||
folderName,
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.calendar_today, size: 14, color: Colors.white),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
"📅 $formattedDate",
|
||||
style: const TextStyle(fontSize: 13, color: Colors.black87),
|
||||
formattedDate,
|
||||
style: const TextStyle(fontSize: 13, color: Colors.white),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const SizedBox(width: 12),
|
||||
Icon(
|
||||
_expandedFolder == folderName ? Icons.expand_less : Icons.expand_more,
|
||||
color: Colors.black87,
|
||||
color: Colors.white,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -698,7 +725,7 @@ Widget _buildFolderRow(String folderName) {
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.emoji_events, size: 16, color: Colors.amber),
|
||||
const Icon(Icons.emoji_events, size: 16, color: Colors.black87),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
"$totalScore",
|
||||
@@ -816,7 +843,7 @@ Widget _buildTargetsList(String folderName) {
|
||||
const SizedBox(width: 8),
|
||||
const Icon(
|
||||
Icons.emoji_events,
|
||||
color: Colors.amber,
|
||||
color: Colors.black87,
|
||||
size: 14,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
@@ -893,13 +920,28 @@ Widget build(BuildContext context) {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
_folderFilter == 'all'
|
||||
? _t('Showing: 📂 All folders')
|
||||
: _folderFilter == 'tournament'
|
||||
? _t('Showing: 🏆 Tournament folders')
|
||||
: _t('Showing: 🎯 Training folders'),
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.black),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
_folderFilter == 'all'
|
||||
? Icons.folder
|
||||
: _folderFilter == 'tournament'
|
||||
? Icons.emoji_events
|
||||
: Icons.track_changes,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
_folderFilter == 'all'
|
||||
? _t('Showing: All folders')
|
||||
: _folderFilter == 'tournament'
|
||||
? _t('Showing: Tournament folders')
|
||||
: _t('Showing: Training folders'),
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
Icon(Icons.filter_list, color: Colors.black87, size: 18),
|
||||
],
|
||||
@@ -917,6 +959,7 @@ Widget build(BuildContext context) {
|
||||
thickness: 6, // optional: adjust width
|
||||
radius: const Radius.circular(8),
|
||||
child: ListView.builder(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
itemCount: _filteredFolderNames().length,
|
||||
itemBuilder: (context, index) {
|
||||
String folderName = _filteredFolderNames()[index];
|
||||
@@ -955,11 +998,11 @@ void _showFolderFilterPopup(BuildContext context) {
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Folder type filters
|
||||
_buildStyledFilterButton('all', _t('📂 All folders'), context),
|
||||
_buildStyledFilterButton('all', Icons.folder, _t('All folders'), context),
|
||||
const SizedBox(height: 12),
|
||||
_buildStyledFilterButton('tournament', _t('🏆 Tournament'), context),
|
||||
_buildStyledFilterButton('tournament', Icons.emoji_events, _t('Tournament'), context),
|
||||
const SizedBox(height: 12),
|
||||
_buildStyledFilterButton('training', _t('🎯 Training'), context),
|
||||
_buildStyledFilterButton('training', Icons.track_changes, _t('Training'), context),
|
||||
|
||||
const SizedBox(height: 24),
|
||||
|
||||
@@ -986,16 +1029,27 @@ void _showFolderFilterPopup(BuildContext context) {
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_t('📅 Sort by Date'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: _sortMode == 'date' ? Colors.white : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.calendar_today,
|
||||
size: 14,
|
||||
color: _sortMode == 'date' ? Colors.white : Colors.white70,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_t('Sort by Date'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: _sortMode == 'date' ? Colors.white : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1015,16 +1069,27 @@ void _showFolderFilterPopup(BuildContext context) {
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
_t('🏆 Sort by Score'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: _sortMode == 'score' ? Colors.white : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.emoji_events,
|
||||
size: 14,
|
||||
color: _sortMode == 'score' ? Colors.white : Colors.white70,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
_t('Sort by Score'),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: _sortMode == 'score' ? Colors.white : Colors.white70,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1043,7 +1108,7 @@ void _showFolderFilterPopup(BuildContext context) {
|
||||
}
|
||||
|
||||
|
||||
Widget _buildStyledFilterButton(String value, String label, BuildContext context) {
|
||||
Widget _buildStyledFilterButton(String value, IconData icon, String label, BuildContext context) {
|
||||
final isSelected = _folderFilter == value;
|
||||
|
||||
return SizedBox(
|
||||
@@ -1062,13 +1127,24 @@ Widget _buildStyledFilterButton(String value, String label, BuildContext context
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: isSelected ? Colors.white : Colors.white70,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 18,
|
||||
color: isSelected ? Colors.white : Colors.white70,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
color: isSelected ? Colors.white : Colors.white70,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user