From 8cf21954358c7d63469af8c31377425749837d8d Mon Sep 17 00:00:00 2001 From: dom Date: Sat, 4 Jul 2026 22:21:21 +0800 Subject: [PATCH] opt vote item Signed-off-by: dom --- lib/pages/common/dyn/common_dyn_page.dart | 14 +++++++++++++- lib/pages/video/reply/view.dart | 14 +++++++++++++- lib/pages/video/reply/widgets/reply_item_grpc.dart | 7 ++++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/lib/pages/common/dyn/common_dyn_page.dart b/lib/pages/common/dyn/common_dyn_page.dart index daceaf310..96eeba42a 100644 --- a/lib/pages/common/dyn/common_dyn_page.dart +++ b/lib/pages/common/dyn/common_dyn_page.dart @@ -183,10 +183,22 @@ mixin CommonDynPageMixin }, ); } - return HttpError( + + final child = HttpError( errMsg: '还没有评论', onReload: controller.onReload, ); + if (controller.voteCard case final voteCard?) { + return SliverMainAxisGroup( + slivers: [ + SliverToBoxAdapter( + child: buildVoteCard(context, theme.colorScheme, voteCard), + ), + child, + ], + ); + } + return child; case Error(:final errMsg): return HttpError( errMsg: errMsg, diff --git a/lib/pages/video/reply/view.dart b/lib/pages/video/reply/view.dart index e32f8c194..130b49058 100644 --- a/lib/pages/video/reply/view.dart +++ b/lib/pages/video/reply/view.dart @@ -228,10 +228,22 @@ class _VideoReplyPanelState extends State itemCount: count, ); } - return HttpError( + + final child = HttpError( errMsg: '还没有评论', onReload: _videoReplyController.onReload, ); + if (_videoReplyController.voteCard case final voteCard?) { + return SliverMainAxisGroup( + slivers: [ + SliverToBoxAdapter( + child: buildVoteCard(context, colorScheme, voteCard), + ), + child, + ], + ); + } + return child; case Error(:final errMsg): return HttpError( errMsg: errMsg, diff --git a/lib/pages/video/reply/widgets/reply_item_grpc.dart b/lib/pages/video/reply/widgets/reply_item_grpc.dart index e26a0aa93..1d5d332bd 100644 --- a/lib/pages/video/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/reply/widgets/reply_item_grpc.dart @@ -302,15 +302,15 @@ class ReplyItemGrpc extends StatelessWidget { children: [ switch (voteOption.labelKind) { .RED => TextSpan( - text: '红队 ', + text: '红方 ', style: TextStyle(color: colorScheme.vipColor), ), .BLUE => TextSpan( - text: '蓝队 ', + text: '蓝方 ', style: TextStyle(color: colorScheme.blue), ), _ => TextSpan( - text: '投票 ', + text: '投票 ', style: TextStyle(color: colorScheme.outline), ), }, @@ -318,6 +318,7 @@ class ReplyItemGrpc extends StatelessWidget { ], ), style: TextStyle( + height: 1.75, fontSize: 12, color: colorScheme.onSurfaceVariant, ),