mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-12 11:24:08 +00:00
feat: emphasize task creation and add empty-list actions
This commit is contained in:
1 parent
091e7b8936
commit
1fc0ff6738
5 files changed
+100
-49
No files matched your search
@@ -4,7 +4,7 @@ import 'package:shadcn_flutter/shadcn_flutter.dart' as shad;
|
||||
|
||||
import '../../../../shared/theme/app_design_tokens.dart';
|
||||
import '../../../../shared/theme/app_palette.dart';
|
||||
import '../../../../shared/widgets/app_primary_button.dart';
|
||||
import '../../../tasks/presentation/widgets/task_create_button.dart';
|
||||
import '../../../../shared/widgets/app_text_field.dart';
|
||||
import '../../../../l10n/l10n.dart';
|
||||
|
||||
@@ -62,7 +62,7 @@ class TasksTopBar extends StatelessWidget {
|
||||
ConstrainedBox(
|
||||
key: const ValueKey('tasks-create-button-container'),
|
||||
constraints: const BoxConstraints(minWidth: 120, maxWidth: 190),
|
||||
child: _AddTaskButton(onPressed: onAddTask),
|
||||
child: TaskCreateButton(onPressed: onAddTask),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Row(
|
||||
@@ -131,27 +131,6 @@ class _SearchField extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class _AddTaskButton extends StatelessWidget {
|
||||
const _AddTaskButton({required this.onPressed});
|
||||
|
||||
final VoidCallback onPressed;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppPrimaryButton(
|
||||
onPressed: onPressed,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.add),
|
||||
const SizedBox(width: AppDesignTokens.space8),
|
||||
Flexible(child: Text(context.l10n.create, maxLines: 1, overflow: TextOverflow.ellipsis)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _ActionIconButton extends StatelessWidget {
|
||||
const _ActionIconButton({required this.icon, required this.onPressed});
|
||||
|
||||
|
||||
Reference in new issue
Block a user