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