mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-25 18:48:43 +00:00
@@ -339,7 +339,12 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
ThemeData theme,
|
ThemeData theme,
|
||||||
ReplyControl replyControl,
|
ReplyControl replyControl,
|
||||||
) {
|
) {
|
||||||
final ButtonStyle style = TextButton.styleFrom(
|
final textStyle = TextStyle(
|
||||||
|
fontSize: theme.textTheme.labelMedium!.fontSize,
|
||||||
|
color: theme.colorScheme.outline,
|
||||||
|
fontWeight: FontWeight.normal,
|
||||||
|
);
|
||||||
|
final buttonStyle = TextButton.styleFrom(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
||||||
visualDensity: VisualDensity.compact,
|
visualDensity: VisualDensity.compact,
|
||||||
@@ -350,7 +355,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
style: style,
|
style: buttonStyle,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
feedBack();
|
feedBack();
|
||||||
onReply?.call(replyItem);
|
onReply?.call(replyItem);
|
||||||
@@ -363,60 +368,28 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
color: theme.colorScheme.outline.withValues(alpha: 0.8),
|
color: theme.colorScheme.outline.withValues(alpha: 0.8),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
Text(
|
Text('回复', style: textStyle),
|
||||||
'回复',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
|
||||||
color: theme.colorScheme.outline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
if (replyItem.replyControl.upLike) ...[
|
if (replyItem.replyControl.cardLabels.isNotEmpty) ...[
|
||||||
SizedBox(
|
Text(
|
||||||
height: 32,
|
replyItem.replyControl.cardLabels
|
||||||
child: TextButton(
|
.map((e) => e.textContent)
|
||||||
onPressed: null,
|
.join(' '),
|
||||||
style: style,
|
style: textStyle.copyWith(color: theme.colorScheme.secondary),
|
||||||
child: Text(
|
|
||||||
'UP主觉得很赞',
|
|
||||||
style: TextStyle(
|
|
||||||
color: theme.colorScheme.secondary,
|
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 2),
|
const SizedBox(width: 2),
|
||||||
],
|
],
|
||||||
if (replyItem.replyControl.cardLabels
|
|
||||||
.map((item) => item.textContent)
|
|
||||||
.contains('热评'))
|
|
||||||
Text(
|
|
||||||
'热评',
|
|
||||||
style: TextStyle(
|
|
||||||
color: theme.colorScheme.secondary,
|
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (replyLevel == 2 && needDivider && replyItem.id != replyItem.dialog)
|
if (replyLevel == 2 && needDivider && replyItem.id != replyItem.dialog)
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 32,
|
height: 32,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: showDialogue,
|
onPressed: showDialogue,
|
||||||
style: style,
|
style: buttonStyle,
|
||||||
child: Text(
|
child: Text('查看对话', style: textStyle),
|
||||||
'查看对话',
|
|
||||||
style: TextStyle(
|
|
||||||
color: theme.colorScheme.outline,
|
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else if (replyLevel == 3 &&
|
else if (replyLevel == 3 &&
|
||||||
@@ -426,15 +399,8 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
height: 32,
|
height: 32,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: jumpToDialogue,
|
onPressed: jumpToDialogue,
|
||||||
style: style,
|
style: buttonStyle,
|
||||||
child: Text(
|
child: Text('跳转回复', style: textStyle),
|
||||||
'跳转回复',
|
|
||||||
style: TextStyle(
|
|
||||||
color: theme.colorScheme.outline,
|
|
||||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
|||||||
Reference in New Issue
Block a user