mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -126,111 +126,79 @@ class _VideoInfoState extends State<VideoInfo> {
|
|||||||
|
|
||||||
late final _horizontalMemberPage = GStorage.horizontalMemberPage;
|
late final _horizontalMemberPage = GStorage.horizontalMemberPage;
|
||||||
|
|
||||||
Widget _buildVideoTitle([bool isExpand = false]) => Obx(
|
Widget _buildVideoTitle([bool isExpand = false]) => videoDetailCtr
|
||||||
() => Text.rich(
|
.enableSponsorBlock
|
||||||
TextSpan(
|
? Obx(
|
||||||
children: [
|
() => Text.rich(
|
||||||
if (videoIntroController.videoDetail.value.honorReply?.honor
|
TextSpan(
|
||||||
?.any((item) => item.type == 7) ==
|
children: [
|
||||||
true) ...[
|
if (videoDetailCtr.videoLabel.value.isNotEmpty) ...[
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.symmetric(
|
||||||
left: 6, right: 8, top: 2, bottom: 2),
|
horizontal: 4,
|
||||||
decoration: BoxDecoration(
|
vertical: 2,
|
||||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
),
|
||||||
borderRadius: BorderRadius.circular(20),
|
decoration: BoxDecoration(
|
||||||
),
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
child: Row(
|
borderRadius: BorderRadius.circular(4),
|
||||||
mainAxisSize: MainAxisSize.min,
|
),
|
||||||
children: [
|
child: Row(
|
||||||
Icon(
|
mainAxisSize: MainAxisSize.min,
|
||||||
MdiIcons.fire,
|
children: [
|
||||||
size: 16,
|
Stack(
|
||||||
color: Theme.of(context)
|
alignment: Alignment.center,
|
||||||
.colorScheme
|
children: [
|
||||||
.onSecondaryContainer,
|
Icon(
|
||||||
),
|
Icons.shield_outlined,
|
||||||
Text(
|
size: 16,
|
||||||
'热门',
|
color: Theme.of(context)
|
||||||
textScaler: TextScaler.linear(1),
|
.colorScheme
|
||||||
strutStyle: StrutStyle(leading: 0, height: 1),
|
.onSecondaryContainer,
|
||||||
style: TextStyle(
|
),
|
||||||
height: 1,
|
Icon(
|
||||||
fontSize: 12,
|
Icons.play_arrow_rounded,
|
||||||
color: Theme.of(context)
|
size: 12,
|
||||||
.colorScheme
|
color: Theme.of(context)
|
||||||
.onSecondaryContainer,
|
.colorScheme
|
||||||
|
.onSecondaryContainer,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
Text(
|
||||||
],
|
videoDetailCtr.videoLabel.value,
|
||||||
),
|
textScaler: TextScaler.linear(1),
|
||||||
),
|
strutStyle: StrutStyle(leading: 0, height: 1),
|
||||||
),
|
style: TextStyle(
|
||||||
TextSpan(text: ' '),
|
height: 1,
|
||||||
],
|
fontSize: 13,
|
||||||
if (videoDetailCtr.videoLabel.value.isNotEmpty) ...[
|
|
||||||
WidgetSpan(
|
|
||||||
alignment: PlaceholderAlignment.middle,
|
|
||||||
child: Container(
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: 4,
|
|
||||||
vertical: 2,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Stack(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Icons.shield_outlined,
|
|
||||||
size: 16,
|
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onSecondaryContainer,
|
.onSecondaryContainer,
|
||||||
),
|
),
|
||||||
Icon(
|
|
||||||
Icons.play_arrow_rounded,
|
|
||||||
size: 12,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.onSecondaryContainer,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
videoDetailCtr.videoLabel.value,
|
|
||||||
textScaler: TextScaler.linear(1),
|
|
||||||
strutStyle: StrutStyle(leading: 0, height: 1),
|
|
||||||
style: TextStyle(
|
|
||||||
height: 1,
|
|
||||||
fontSize: 13,
|
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.onSecondaryContainer,
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
TextSpan(text: ' '),
|
||||||
TextSpan(text: ' '),
|
],
|
||||||
|
TextSpan(
|
||||||
|
text: '${videoDetail.title ?? videoItem['title'] ?? ''}'),
|
||||||
],
|
],
|
||||||
TextSpan(
|
),
|
||||||
text: '${videoDetail.title ?? videoItem['title'] ?? ''}'),
|
maxLines: isExpand ? null : 2,
|
||||||
],
|
overflow: isExpand ? null : TextOverflow.ellipsis,
|
||||||
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
'${videoDetail.title ?? videoItem['title'] ?? ''}',
|
||||||
maxLines: isExpand ? null : 2,
|
maxLines: isExpand ? null : 2,
|
||||||
overflow: isExpand ? null : TextOverflow.ellipsis,
|
overflow: isExpand ? null : TextOverflow.ellipsis,
|
||||||
style: const TextStyle(fontSize: 16),
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
void handleState(Future Function() action) async {
|
void handleState(Future Function() action) async {
|
||||||
if (isProcessing.not) {
|
if (isProcessing.not) {
|
||||||
|
|||||||
Reference in New Issue
Block a user