mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
@@ -3,6 +3,7 @@ import 'dart:math';
|
||||
import 'package:PiliPlus/common/assets.dart';
|
||||
import 'package:PiliPlus/common/style.dart';
|
||||
import 'package:PiliPlus/common/widgets/dialog/report.dart';
|
||||
import 'package:PiliPlus/common/widgets/extra_hit_test_widget.dart';
|
||||
import 'package:PiliPlus/common/widgets/pendant_avatar.dart';
|
||||
import 'package:PiliPlus/http/constants.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
@@ -98,37 +99,40 @@ class AuthorPanel extends StatelessWidget {
|
||||
Get.toNamed('/member?mid=${moduleAuthor.mid}');
|
||||
}
|
||||
: null,
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
PendantAvatar(
|
||||
size: 40,
|
||||
moduleAuthor.face,
|
||||
pendantImage: moduleAuthor.pendant?.image,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
moduleAuthor.name!,
|
||||
maxLines: 1,
|
||||
overflow: .ellipsis,
|
||||
style: TextStyle(
|
||||
color:
|
||||
moduleAuthor.vip != null &&
|
||||
moduleAuthor.vip!.status > 0 &&
|
||||
moduleAuthor.vip!.type == 2
|
||||
? theme.colorScheme.vipColor
|
||||
: theme.colorScheme.onSurface,
|
||||
fontSize: theme.textTheme.titleSmall!.fontSize,
|
||||
),
|
||||
),
|
||||
?pubTs,
|
||||
],
|
||||
child: ExtraHitTestWidget(
|
||||
width: 50,
|
||||
child: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
PendantAvatar(
|
||||
size: 40,
|
||||
moduleAuthor.face,
|
||||
pendantImage: moduleAuthor.pendant?.image,
|
||||
),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
moduleAuthor.name!,
|
||||
maxLines: 1,
|
||||
overflow: .ellipsis,
|
||||
style: TextStyle(
|
||||
color:
|
||||
moduleAuthor.vip != null &&
|
||||
moduleAuthor.vip!.status > 0 &&
|
||||
moduleAuthor.vip!.type == 2
|
||||
? theme.colorScheme.vipColor
|
||||
: theme.colorScheme.onSurface,
|
||||
fontSize: theme.textTheme.titleSmall!.fontSize,
|
||||
),
|
||||
),
|
||||
?pubTs,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
Widget? moreBtn = isSave
|
||||
|
||||
@@ -153,11 +153,11 @@ class _SuperChatCardState extends State<SuperChatCard> {
|
||||
name = Row(
|
||||
spacing: 5,
|
||||
children: [
|
||||
Flexible(child: name),
|
||||
MedalWidget.fromMedalInfo(
|
||||
medal: medal,
|
||||
padding: MedalWidget.mediumPadding,
|
||||
),
|
||||
Flexible(child: name),
|
||||
],
|
||||
);
|
||||
} catch (e, s) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:PiliPlus/common/constants.dart';
|
||||
import 'package:PiliPlus/common/style.dart';
|
||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||
import 'package:PiliPlus/common/widgets/dialog/report.dart';
|
||||
import 'package:PiliPlus/common/widgets/extra_hit_test_widget.dart';
|
||||
import 'package:PiliPlus/common/widgets/flutter/text/text.dart' as custom_text;
|
||||
import 'package:PiliPlus/common/widgets/gesture/tap_gesture_recognizer.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
@@ -139,100 +140,108 @@ class ReplyItemGrpc extends StatelessWidget {
|
||||
feedBack();
|
||||
Get.toNamed('/member?mid=${replyItem.mid}');
|
||||
},
|
||||
child: Row(
|
||||
crossAxisAlignment: .center,
|
||||
spacing: 12,
|
||||
children: [
|
||||
PendantAvatar(
|
||||
member.face,
|
||||
size: 34,
|
||||
badgeSize: 14,
|
||||
vipStatus: member.vipStatus.toInt(),
|
||||
officialType: member.officialVerifyType.toInt(),
|
||||
pendantImage: member.hasGarbPendantImage()
|
||||
? member.garbPendantImage
|
||||
: null,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
member.name,
|
||||
maxLines: 1,
|
||||
overflow: .ellipsis,
|
||||
style: TextStyle(
|
||||
color: (member.vipStatus > 0 && member.vipType == 2)
|
||||
? theme.colorScheme.vipColor
|
||||
: theme.colorScheme.outline,
|
||||
fontSize: 13,
|
||||
child: ExtraHitTestWidget(
|
||||
width: 46,
|
||||
child: Row(
|
||||
crossAxisAlignment: .center,
|
||||
spacing: 12,
|
||||
children: [
|
||||
PendantAvatar(
|
||||
member.face,
|
||||
size: 34,
|
||||
badgeSize: 14,
|
||||
vipStatus: member.vipStatus.toInt(),
|
||||
officialType: member.officialVerifyType.toInt(),
|
||||
pendantImage: member.hasGarbPendantImage()
|
||||
? member.garbPendantImage
|
||||
: null,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 6,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
member.name,
|
||||
maxLines: 1,
|
||||
overflow: .ellipsis,
|
||||
style: TextStyle(
|
||||
color: (member.vipStatus > 0 && member.vipType == 2)
|
||||
? theme.colorScheme.vipColor
|
||||
: theme.colorScheme.outline,
|
||||
fontSize: 13,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Image.asset(
|
||||
Utils.levelName(
|
||||
member.level,
|
||||
isSeniorMember: member.isSeniorMember == 1,
|
||||
),
|
||||
height: 11,
|
||||
cacheHeight: 11.cacheSize(context),
|
||||
),
|
||||
if (replyItem.mid == upMid)
|
||||
const PBadge(
|
||||
text: 'UP',
|
||||
size: PBadgeSize.small,
|
||||
isStack: false,
|
||||
fontSize: 9,
|
||||
)
|
||||
else if (GlobalData().showMedal &&
|
||||
member.hasFansMedalLevel())
|
||||
MedalWidget(
|
||||
medalName: member.fansMedalName,
|
||||
level: member.fansMedalLevel.toInt(),
|
||||
backgroundColor: DmUtils.decimalToColor(
|
||||
member.fansMedalColor.toInt(),
|
||||
Image.asset(
|
||||
Utils.levelName(
|
||||
member.level,
|
||||
isSeniorMember: member.isSeniorMember == 1,
|
||||
),
|
||||
nameColor: DmUtils.decimalToColor(
|
||||
member.fansMedalColorName.toInt(),
|
||||
height: 11,
|
||||
cacheHeight: 11.cacheSize(context),
|
||||
),
|
||||
if (replyItem.mid == upMid)
|
||||
const PBadge(
|
||||
text: 'UP',
|
||||
size: PBadgeSize.small,
|
||||
isStack: false,
|
||||
fontSize: 9,
|
||||
)
|
||||
else if (GlobalData().showMedal &&
|
||||
member.hasFansMedalLevel())
|
||||
MedalWidget(
|
||||
medalName: member.fansMedalName,
|
||||
level: member.fansMedalLevel.toInt(),
|
||||
backgroundColor: DmUtils.decimalToColor(
|
||||
member.fansMedalColor.toInt(),
|
||||
),
|
||||
nameColor: DmUtils.decimalToColor(
|
||||
member.fansMedalColorName.toInt(),
|
||||
),
|
||||
padding: const .symmetric(
|
||||
horizontal: 6,
|
||||
vertical: 1.5,
|
||||
),
|
||||
),
|
||||
padding: const .symmetric(horizontal: 6, vertical: 1.5),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
replyLevel == 0
|
||||
? DateFormatUtils.format(
|
||||
replyItem.ctime.toInt(),
|
||||
format: DateFormatUtils.longFormatDs,
|
||||
)
|
||||
: DateFormatUtils.dateFormat(replyItem.ctime.toInt()),
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
if (replyItem.replyControl.hasLocation())
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
' • ${replyItem.replyControl.location}',
|
||||
replyLevel == 0
|
||||
? DateFormatUtils.format(
|
||||
replyItem.ctime.toInt(),
|
||||
format: DateFormatUtils.longFormatDs,
|
||||
)
|
||||
: DateFormatUtils.dateFormat(
|
||||
replyItem.ctime.toInt(),
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
if (replyItem.replyControl.hasLocation())
|
||||
Text(
|
||||
' • ${replyItem.replyControl.location}',
|
||||
style: TextStyle(
|
||||
fontSize: theme.textTheme.labelSmall!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
if (PendantAvatar.showDecorate) {
|
||||
|
||||
Reference in New Issue
Block a user