Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-26 11:39:56 +08:00
parent 8e99ff1173
commit 41f251ad50
8 changed files with 59 additions and 39 deletions

View File

@@ -26,10 +26,13 @@ class IntroDetail extends StatelessWidget {
padding: const EdgeInsets.only(left: 14, right: 14),
child: Column(
children: [
Container(
height: 35,
padding: const EdgeInsets.only(bottom: 2),
child: Center(
GestureDetector(
onTap: Get.back,
behavior: HitTestBehavior.opaque,
child: Container(
height: 35,
alignment: Alignment.center,
padding: const EdgeInsets.only(bottom: 2),
child: Container(
width: 32,
height: 3,

View File

@@ -183,7 +183,6 @@ class _PgcIndexPageState extends State<PgcIndexPage>
_ctr.isExpand.value = _ctr.isExpand.value.not;
},
child: Container(
width: double.infinity,
alignment: Alignment.center,
child: Row(
mainAxisSize: MainAxisSize.min,

View File

@@ -204,8 +204,18 @@ Widget forWard(item, context, source, callback, {floor = 1}) {
// 转发
case 'DYNAMIC_TYPE_FORWARD':
return InkWell(
onTap: () => Utils.pushDynDetail(item.orig, floor + 1),
onTap: () {
if (item.orig.modules.moduleDynamic.major?.type ==
'MAJOR_TYPE_NONE') {
return;
}
Utils.pushDynDetail(item.orig, floor + 1);
},
onLongPress: () {
if (item.orig.modules.moduleDynamic.major?.type ==
'MAJOR_TYPE_NONE') {
return;
}
if (item.orig.type == 'DYNAMIC_TYPE_AV') {
imageSaveDialog(
context: context,

View File

@@ -9,6 +9,27 @@ import 'package:PiliPlus/utils/utils.dart';
import 'rich_node_panel.dart';
Widget videoSeasonWidget(item, context, type, {floor = 1}) {
if (item.modules.moduleDynamic.major?.type == 'MAJOR_TYPE_NONE') {
return item.modules.moduleDynamic.major?.none?.tips != null
? Row(
children: [
Icon(
Icons.error,
size: 18,
color: Theme.of(context).colorScheme.outline,
),
const SizedBox(width: 5),
Text(
'${item.modules.moduleDynamic.major.none.tips}',
style: TextStyle(
color: Theme.of(context).colorScheme.outline,
),
),
],
)
: const SizedBox.shrink();
}
TextStyle authorStyle =
TextStyle(color: Theme.of(context).colorScheme.primary);
// type archive ugcSeason
@@ -27,6 +48,9 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
InlineSpan? richNodes = richNode(item, context);
Widget buildCover() {
if (content?.cover == null) {
return const SizedBox.shrink();
}
return LayoutBuilder(builder: (context, box) {
double width = box.maxWidth;
return Stack(
@@ -166,17 +190,18 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
child: buildCover(),
),
const SizedBox(height: 6),
Padding(
padding: floor == 1
? const EdgeInsets.only(left: 12, right: 12)
: EdgeInsets.zero,
child: Text(
content.title,
maxLines: 1,
style: const TextStyle(fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
if (content?.title != null)
Padding(
padding: floor == 1
? const EdgeInsets.only(left: 12, right: 12)
: EdgeInsets.zero,
child: Text(
content.title,
maxLines: 1,
style: const TextStyle(fontWeight: FontWeight.bold),
overflow: TextOverflow.ellipsis,
),
),
),
],
);
}

View File

@@ -559,7 +559,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
controller: videoIntroController.expandableCtr,
collapsed: GestureDetector(
onLongPress: () {
feedBack();
Feedback.forLongPress(context);
Utils.copyText(
'${videoDetail.title ?? videoItem['title'] ?? ''}');
},
@@ -567,7 +567,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
),
expanded: GestureDetector(
onLongPress: () {
feedBack();
Feedback.forLongPress(context);
Utils.copyText(
'${videoDetail.title ?? videoItem['title'] ?? ''}');
},