Merge branch 'design'
This commit is contained in:
@ -117,20 +117,23 @@ class DynamicsController extends GetxController {
|
||||
/// 点击评论action 直接查看评论
|
||||
if (action == 'comment') {
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor, 'action': action});
|
||||
arguments: {'item': item, 'floor': floor, 'action': action},
|
||||
preventDuplicates: false);
|
||||
return false;
|
||||
}
|
||||
switch (item!.type) {
|
||||
/// 转发的动态
|
||||
case 'DYNAMIC_TYPE_FORWARD':
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
|
||||
/// 图文动态查看
|
||||
case 'DYNAMIC_TYPE_DRAW':
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
case 'DYNAMIC_TYPE_AV':
|
||||
String bvid = item.modules.moduleDynamic.major.archive.bvid;
|
||||
@ -188,7 +191,8 @@ class DynamicsController extends GetxController {
|
||||
case 'DYNAMIC_TYPE_WORD':
|
||||
print('纯文本');
|
||||
Get.toNamed('/dynamicDetail',
|
||||
arguments: {'item': item, 'floor': floor});
|
||||
arguments: {'item': item, 'floor': floor},
|
||||
preventDuplicates: false);
|
||||
break;
|
||||
case 'DYNAMIC_TYPE_LIVE_RCMD':
|
||||
DynamicLiveModel liveRcmd = item.modules.moduleDynamic.major.liveRcmd;
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@ -61,6 +63,7 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
|
||||
void onClickUp(data, i, {type = 'click'}) {
|
||||
if (type == 'click') {
|
||||
data.hasUpdate = false;
|
||||
pageController.jumpToPage(i);
|
||||
}
|
||||
}
|
||||
@ -81,11 +84,11 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 50,
|
||||
child: TabBar(
|
||||
TabBar(
|
||||
controller: _tabController,
|
||||
dividerColor: Colors.transparent,
|
||||
automaticIndicatorColorAdjustment: false,
|
||||
@ -106,7 +109,6 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: PageView.builder(
|
||||
itemCount: upList.length,
|
||||
@ -119,13 +121,15 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: UpDyanmicsPage(upInfo: upList[index], ctr: widget.ctr),
|
||||
child:
|
||||
UpDyanmicsPage(upInfo: upList[index], ctr: widget.ctr),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -139,8 +143,8 @@ class _OverlayPanelState extends State<OverlayPanel>
|
||||
duration: const Duration(milliseconds: 200),
|
||||
scale: currentMid == data.mid ? 1 : 0.9,
|
||||
child: NetworkImgLayer(
|
||||
width: contentWidth,
|
||||
height: contentWidth,
|
||||
width: 46,
|
||||
height: 46,
|
||||
src: data.face,
|
||||
type: 'avatar',
|
||||
),
|
||||
|
@ -44,6 +44,7 @@ class _UpPanelState extends State<UpPanel> {
|
||||
|
||||
void onClickUp(data, i) {
|
||||
currentMid.value = data.mid;
|
||||
data.hasUpdate = false;
|
||||
Navigator.push(
|
||||
context,
|
||||
PlPopupRoute(
|
||||
|
@ -66,6 +66,8 @@ class VideoIntroController extends GetxController {
|
||||
late bool enableRelatedVideo;
|
||||
UgcSeason? ugcSeason;
|
||||
RxList<Part> pages = <Part>[].obs;
|
||||
// 默认原创视频
|
||||
int copyright = 1;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
@ -94,6 +96,7 @@ class VideoIntroController extends GetxController {
|
||||
videoDetail.value = result['data']!;
|
||||
ugcSeason = result['data']!.ugcSeason;
|
||||
pages.value = result['data']!.pages!;
|
||||
copyright = result['data']!.copyright!;
|
||||
if (type == null) {
|
||||
lastPlayCid.value = cid ?? videoDetail.value.cid!;
|
||||
}
|
||||
@ -215,7 +218,7 @@ class VideoIntroController extends GetxController {
|
||||
contentPadding: const EdgeInsets.fromLTRB(0, 12, 0, 24),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [1, 2]
|
||||
children: (copyright == 2 ? [1] : [1, 2])
|
||||
.map(
|
||||
(e) => ListTile(
|
||||
title: Padding(
|
||||
|
@ -8,6 +8,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:pilipala/common/constants.dart';
|
||||
import 'package:pilipala/common/skeleton/video_intro.dart';
|
||||
import 'package:pilipala/common/widgets/badge.dart';
|
||||
import 'package:pilipala/common/widgets/http_error.dart';
|
||||
import 'package:pilipala/pages/video/detail/index.dart';
|
||||
import 'package:pilipala/common/widgets/network_img_layer.dart';
|
||||
@ -264,6 +265,26 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
Widget build(BuildContext context) {
|
||||
final ThemeData t = Theme.of(context);
|
||||
final Color outline = t.colorScheme.outline;
|
||||
const TextStyle titleStyle = TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
TextSpan titltWidget = TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Visibility(
|
||||
visible: widget.videoDetail!.copyright == 2,
|
||||
child: const PBadge(text: '转载', type: 'color'),
|
||||
),
|
||||
),
|
||||
const TextSpan(text: ' '),
|
||||
TextSpan(
|
||||
text: widget.videoDetail!.title!,
|
||||
style: titleStyle,
|
||||
),
|
||||
],
|
||||
);
|
||||
return SliverPadding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: StyleString.safeSpace,
|
||||
@ -285,25 +306,8 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
||||
},
|
||||
child: ExpandablePanel(
|
||||
controller: _expandableCtr,
|
||||
collapsed: Text(
|
||||
widget.videoDetail!.title!,
|
||||
softWrap: true,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
expanded: Text(
|
||||
widget.videoDetail!.title!,
|
||||
softWrap: true,
|
||||
maxLines: 10,
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
collapsed: Text.rich(softWrap: true, maxLines: 2, titltWidget),
|
||||
expanded: Text.rich(softWrap: true, maxLines: 10, titltWidget),
|
||||
theme: const ExpandableThemeData(
|
||||
animationDuration: Duration(milliseconds: 300),
|
||||
scrollAnimationDuration: Duration(milliseconds: 300),
|
||||
|
Reference in New Issue
Block a user