mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
opt: video page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -892,7 +892,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
() => !videoDetailController.autoPlay.value
|
||||
? const SizedBox()
|
||||
: PLVideoPlayer(
|
||||
controller: plPlayerController!,
|
||||
plPlayerController: plPlayerController!,
|
||||
videoIntroController:
|
||||
videoDetailController.videoType == SearchType.video
|
||||
? videoIntroController
|
||||
@@ -936,38 +936,73 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
primary: false,
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: Colors.transparent,
|
||||
actions: videoDetailController.userInfo == null
|
||||
? null
|
||||
: [
|
||||
PopupMenuButton<String>(
|
||||
onSelected: (String type) async {
|
||||
switch (type) {
|
||||
case 'later':
|
||||
var res = await UserHttp.toViewLater(
|
||||
bvid: videoDetailController.bvid);
|
||||
SmartDialog.showToast(res['msg']);
|
||||
break;
|
||||
case 'report':
|
||||
Get.toNamed('/webviewnew', parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(videoDetailController.bvid)}&bvid=${videoDetailController.bvid}'
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
itemBuilder: (BuildContext context) =>
|
||||
<PopupMenuEntry<String>>[
|
||||
const PopupMenuItem<String>(
|
||||
value: 'later',
|
||||
child: Text('稍后再看'),
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'report',
|
||||
child: Text('举报'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
// automaticallyImplyLeading: false,
|
||||
// title: Row(
|
||||
// children: [
|
||||
// SizedBox(
|
||||
// width: 42,
|
||||
// height: 34,
|
||||
// child: IconButton(
|
||||
// tooltip: '返回',
|
||||
// icon: const Icon(
|
||||
// FontAwesomeIcons.arrowLeft,
|
||||
// size: 15,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// onPressed: Get.back,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 42,
|
||||
// height: 34,
|
||||
// child: IconButton(
|
||||
// tooltip: '返回主页',
|
||||
// icon: const Icon(
|
||||
// FontAwesomeIcons.house,
|
||||
// size: 15,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// onPressed: () {
|
||||
// Get.until((route) => route.isFirst);
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
actions: [
|
||||
PopupMenuButton<String>(
|
||||
onSelected: (String type) async {
|
||||
switch (type) {
|
||||
case 'later':
|
||||
var res = await UserHttp.toViewLater(
|
||||
bvid: videoDetailController.bvid);
|
||||
SmartDialog.showToast(res['msg']);
|
||||
break;
|
||||
case 'report':
|
||||
if (videoDetailController.userInfo == null) {
|
||||
SmartDialog.showToast('账号未登录');
|
||||
} else {
|
||||
Get.toNamed('/webviewnew', parameters: {
|
||||
'url':
|
||||
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(videoDetailController.bvid)}&bvid=${videoDetailController.bvid}'
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
itemBuilder: (BuildContext context) =>
|
||||
<PopupMenuEntry<String>>[
|
||||
const PopupMenuItem<String>(
|
||||
value: 'later',
|
||||
child: Text('稍后再看'),
|
||||
),
|
||||
const PopupMenuItem<String>(
|
||||
value: 'report',
|
||||
child: Text('举报'),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@@ -998,7 +1033,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
plPlayerController!.videoController == null
|
||||
? nil
|
||||
: PLVideoPlayer(
|
||||
controller: plPlayerController!,
|
||||
plPlayerController: plPlayerController!,
|
||||
videoIntroController:
|
||||
videoDetailController.videoType == SearchType.video
|
||||
? videoIntroController
|
||||
|
||||
Reference in New Issue
Block a user