opt vote item

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-04 22:21:21 +08:00
parent 0036b58aab
commit 8cf2195435
3 changed files with 30 additions and 5 deletions

View File

@@ -183,10 +183,22 @@ mixin CommonDynPageMixin<T extends StatefulWidget>
}, },
); );
} }
return HttpError(
final child = HttpError(
errMsg: '还没有评论', errMsg: '还没有评论',
onReload: controller.onReload, 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): case Error(:final errMsg):
return HttpError( return HttpError(
errMsg: errMsg, errMsg: errMsg,

View File

@@ -228,10 +228,22 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
itemCount: count, itemCount: count,
); );
} }
return HttpError(
final child = HttpError(
errMsg: '还没有评论', errMsg: '还没有评论',
onReload: _videoReplyController.onReload, 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): case Error(:final errMsg):
return HttpError( return HttpError(
errMsg: errMsg, errMsg: errMsg,

View File

@@ -302,15 +302,15 @@ class ReplyItemGrpc extends StatelessWidget {
children: [ children: [
switch (voteOption.labelKind) { switch (voteOption.labelKind) {
.RED => TextSpan( .RED => TextSpan(
text: ' ', text: ' ',
style: TextStyle(color: colorScheme.vipColor), style: TextStyle(color: colorScheme.vipColor),
), ),
.BLUE => TextSpan( .BLUE => TextSpan(
text: ' ', text: ' ',
style: TextStyle(color: colorScheme.blue), style: TextStyle(color: colorScheme.blue),
), ),
_ => TextSpan( _ => TextSpan(
text: '投票 ', text: '投票 ',
style: TextStyle(color: colorScheme.outline), style: TextStyle(color: colorScheme.outline),
), ),
}, },
@@ -318,6 +318,7 @@ class ReplyItemGrpc extends StatelessWidget {
], ],
), ),
style: TextStyle( style: TextStyle(
height: 1.75,
fontSize: 12, fontSize: 12,
color: colorScheme.onSurfaceVariant, color: colorScheme.onSurfaceVariant,
), ),