generated from dellevin/template
云备份界面优化
This commit is contained in:
@@ -580,6 +580,7 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
'read' => ('已读', colors.primary, colors.onPrimary),
|
||||
'reading' => ('在读', colors.outlineVariant, colors.onSurface.withValues(alpha: 0.6)),
|
||||
'want_to_read' => ('想读', colors.surfaceContainerHighest, colors.onSurface.withValues(alpha: 0.4)),
|
||||
'abandoned' => ('弃读', colors.error.withValues(alpha: 0.15), colors.error),
|
||||
_ => ('', colors.surfaceContainerHighest, colors.onSurface.withValues(alpha: 0.3)),
|
||||
};
|
||||
if (label.isEmpty) return const SizedBox.shrink();
|
||||
@@ -702,6 +703,11 @@ class _BookDetailPageState extends State<BookDetailPage> {
|
||||
bgColor = colors.surfaceContainerHighest;
|
||||
textColor = colors.onSurface.withValues(alpha: 0.4);
|
||||
break;
|
||||
case 'abandoned':
|
||||
label = '弃读';
|
||||
bgColor = colors.error.withValues(alpha: 0.15);
|
||||
textColor = colors.error;
|
||||
break;
|
||||
default:
|
||||
label = '未知';
|
||||
bgColor = colors.outlineVariant;
|
||||
|
||||
@@ -266,6 +266,7 @@ class _BookFormPageState extends State<BookFormPage> {
|
||||
_buildStatusOption('想读', 'want_to_read'),
|
||||
_buildStatusOption('在读', 'reading'),
|
||||
_buildStatusOption('已读', 'read'),
|
||||
_buildStatusOption('弃读', 'abandoned'),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
|
||||
@@ -44,7 +44,7 @@ class _BookTabPageState extends State<BookTabPage> {
|
||||
}
|
||||
}
|
||||
|
||||
static const _statusMap = {0: 'read', 1: 'reading', 2: 'want_to_read'};
|
||||
static const _statusMap = {0: 'read', 1: 'reading', 2: 'want_to_read', 3: 'abandoned'};
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -166,7 +166,7 @@ class _BookTabPageState extends State<BookTabPage> {
|
||||
final direction = (velocity ?? 0) > 0 ? -1 : 1; // 右滑→上一个,左滑→下一个
|
||||
final provider = context.read<AppProvider>();
|
||||
final currentIndex = provider.bookStatusIndex;
|
||||
final newIndex = (currentIndex + direction + 3) % 3;
|
||||
final newIndex = (currentIndex + direction + 4) % 4;
|
||||
setState(() => _dragDelta = 0.0);
|
||||
provider.setBookStatusIndex(newIndex);
|
||||
},
|
||||
@@ -297,7 +297,7 @@ class _BookTabPageState extends State<BookTabPage> {
|
||||
final colors = Theme.of(context).colorScheme;
|
||||
final provider = context.read<AppProvider>();
|
||||
final isWallMode = provider.bookshelfMode;
|
||||
final statusText = isWallMode ? '' : ['已读', '在读', '想读'][statusIndex];
|
||||
final statusText = isWallMode ? '' : ['已读', '在读', '想读', '弃读'][statusIndex];
|
||||
return Center(child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Container(width: 80, height: 80,
|
||||
decoration: BoxDecoration(color: colors.surfaceContainerHighest, borderRadius: BorderRadius.circular(20)),
|
||||
|
||||
Reference in New Issue
Block a user