mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 00:26:18 +08:00
@@ -2,6 +2,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/skeleton/video_reply.dart';
|
||||
import 'package:PiliPlus/common/widgets/badge.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
@@ -951,7 +952,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
Expanded(
|
||||
child: textIconButton(
|
||||
text: '分享',
|
||||
icon: FontAwesomeIcons.shareNodes,
|
||||
icon: CustomIcon.share_node,
|
||||
stat: null,
|
||||
callback: () =>
|
||||
Utils.shareText(_articleCtr.url),
|
||||
|
||||
@@ -60,7 +60,7 @@ Widget content(
|
||||
TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
alignment: PlaceholderAlignment.bottom,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(right: 4),
|
||||
child: Icon(
|
||||
|
||||
@@ -19,7 +19,7 @@ TextSpan? richNode(
|
||||
BuildContext context,
|
||||
) {
|
||||
try {
|
||||
late final authorStyle = TextStyle(color: theme.colorScheme.primary);
|
||||
late final style = TextStyle(color: theme.colorScheme.primary);
|
||||
List<InlineSpan> spanChildren = [];
|
||||
|
||||
List<RichTextNodeItem>? richTextNodes;
|
||||
@@ -57,7 +57,7 @@ TextSpan? richNode(
|
||||
spanChildren.add(
|
||||
TextSpan(
|
||||
text: ' ${i.text}',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed('/member?mid=${i.rid}');
|
||||
@@ -70,7 +70,7 @@ TextSpan? richNode(
|
||||
spanChildren.add(
|
||||
TextSpan(
|
||||
text: i.origText!,
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed(
|
||||
@@ -100,7 +100,7 @@ TextSpan? richNode(
|
||||
..add(
|
||||
TextSpan(
|
||||
text: i.text ?? '',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
String? url = i.origText;
|
||||
@@ -115,21 +115,30 @@ TextSpan? richNode(
|
||||
break;
|
||||
// 投票
|
||||
case 'RICH_TEXT_NODE_TYPE_VOTE':
|
||||
spanChildren.add(
|
||||
TextSpan(
|
||||
text: '投票:${i.text}',
|
||||
style: TextStyle(
|
||||
color: theme.colorScheme.primary,
|
||||
spanChildren
|
||||
..add(
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(
|
||||
size: 20,
|
||||
Icons.bar_chart_rounded,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
final dynIdStr = item.basic?.commentIdStr;
|
||||
final dynId =
|
||||
dynIdStr != null ? int.tryParse(dynIdStr) : null;
|
||||
showVoteDialog(context, int.parse(i.rid!), dynId);
|
||||
},
|
||||
),
|
||||
);
|
||||
)
|
||||
..add(
|
||||
TextSpan(
|
||||
text: '投票:${i.text}',
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
final dynIdStr = item.basic?.commentIdStr;
|
||||
final dynId =
|
||||
dynIdStr != null ? int.tryParse(dynIdStr) : null;
|
||||
showVoteDialog(context, int.parse(i.rid!), dynId);
|
||||
},
|
||||
),
|
||||
);
|
||||
break;
|
||||
// 表情
|
||||
case 'RICH_TEXT_NODE_TYPE_EMOJI' when (i.emoji != null):
|
||||
@@ -161,7 +170,7 @@ TextSpan? richNode(
|
||||
..add(
|
||||
TextSpan(
|
||||
text: '${i.origText} ',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
Get.toNamed(
|
||||
@@ -191,7 +200,7 @@ TextSpan? richNode(
|
||||
..add(
|
||||
TextSpan(
|
||||
text: '${i.text} ',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: i.jumpUrl == null
|
||||
? null
|
||||
: (TapGestureRecognizer()
|
||||
@@ -217,7 +226,7 @@ TextSpan? richNode(
|
||||
..add(
|
||||
TextSpan(
|
||||
text: '${i.text} ',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () async {
|
||||
try {
|
||||
@@ -262,7 +271,7 @@ TextSpan? richNode(
|
||||
spanChildren.add(
|
||||
TextSpan(
|
||||
text: '${i.text}',
|
||||
style: authorStyle,
|
||||
style: style,
|
||||
),
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:PiliPlus/common/skeleton/video_reply.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||
import 'package:PiliPlus/common/widgets/custom_sliver_persistent_header_delegate.dart';
|
||||
import 'package:PiliPlus/common/widgets/loading_widget/http_error.dart';
|
||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||
@@ -599,7 +600,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
'${HttpString.dynamicShareBaseUrl}/${_dynamicDetailController.item.idStr}');
|
||||
},
|
||||
icon: Icon(
|
||||
FontAwesomeIcons.shareNodes,
|
||||
CustomIcon.share_node,
|
||||
size: 16,
|
||||
color: theme.colorScheme.outline,
|
||||
semanticLabel: "分享",
|
||||
|
||||
@@ -760,6 +760,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
null
|
||||
? PopupMenuButton<String>(
|
||||
icon: Icon(
|
||||
size: 22,
|
||||
Icons.more_vert,
|
||||
color: themeData
|
||||
.colorScheme.onSurface,
|
||||
@@ -1311,6 +1312,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
actions: [
|
||||
PopupMenuButton<String>(
|
||||
icon: const Icon(
|
||||
size: 22,
|
||||
Icons.more_vert,
|
||||
color: Colors.white,
|
||||
shadows: [
|
||||
@@ -1591,6 +1593,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
.plPlayerController.isOpenDanmu.value);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 22,
|
||||
videoDetailController
|
||||
.plPlayerController.isOpenDanmu.value
|
||||
? CustomIcon.dm_on
|
||||
|
||||
Reference in New Issue
Block a user