Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-20 22:44:09 +08:00
parent db65e7df76
commit 7617bb692a
21 changed files with 279 additions and 280 deletions

View File

@@ -4,8 +4,8 @@ import 'package:PiliPlus/common/assets.dart';
import 'package:PiliPlus/common/style.dart';
import 'package:PiliPlus/common/widgets/custom_icon.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/common/widgets/translucent_row.dart';
import 'package:PiliPlus/http/constants.dart';
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/http/reply.dart';
@@ -94,49 +94,51 @@ class AuthorPanel extends StatelessWidget {
);
}
}
Widget header = GestureDetector(
onTap: moduleAuthor.type == 'AUTHOR_TYPE_NORMAL'
? () {
feedBack();
Get.toNamed('/member?mid=${moduleAuthor.mid}');
}
: null,
child: ExtraHitTestWidget(
width: 50,
child: Row(
spacing: 10,
final children = [
PendantAvatar(
size: 40,
moduleAuthor.face,
pendantImage: moduleAuthor.pendant?.image,
),
Flexible(
child: Column(
crossAxisAlignment: .start,
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,
],
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 header;
if (moduleAuthor.type == 'AUTHOR_TYPE_NORMAL') {
header = GestureDetector(
onTap: () => {
feedBack(),
Get.toNamed('/member?mid=${moduleAuthor.mid}'),
},
child: TranslucentRow(
spacing: 10,
extraWidth: 50,
children: children,
),
);
} else {
header = Row(spacing: 10, children: children);
}
Widget? moreBtn = isSave
? null
: SizedBox(