mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: report video
This commit is contained in:
@@ -5,6 +5,7 @@ import 'dart:math';
|
|||||||
import 'package:PiliPalaX/common/constants.dart';
|
import 'package:PiliPalaX/common/constants.dart';
|
||||||
import 'package:PiliPalaX/http/loading_state.dart';
|
import 'package:PiliPalaX/http/loading_state.dart';
|
||||||
import 'package:PiliPalaX/utils/extension.dart';
|
import 'package:PiliPalaX/utils/extension.dart';
|
||||||
|
import 'package:PiliPalaX/utils/id_utils.dart';
|
||||||
import 'package:auto_orientation/auto_orientation.dart';
|
import 'package:auto_orientation/auto_orientation.dart';
|
||||||
import 'package:floating/floating.dart';
|
import 'package:floating/floating.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -557,18 +558,38 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
elevation: 0,
|
elevation: 0,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: 0,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
actions: [
|
actions: (videoDetailController.userInfo == null)
|
||||||
IconButton(
|
? null
|
||||||
tooltip: '稍后再看',
|
: [
|
||||||
onPressed: () async {
|
PopupMenuButton<String>(
|
||||||
var res = await UserHttp.toViewLater(
|
onSelected: (String type) async {
|
||||||
bvid: videoDetailController.bvid);
|
switch (type) {
|
||||||
SmartDialog.showToast(res['msg']);
|
case 'later':
|
||||||
},
|
var res = await UserHttp.toViewLater(
|
||||||
icon: const Icon(Icons.history_outlined),
|
bvid: videoDetailController.bvid);
|
||||||
),
|
SmartDialog.showToast(res['msg']);
|
||||||
const SizedBox(width: 14)
|
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('举报'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
|
|||||||
Reference in New Issue
Block a user