mod: video report button

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-03 21:07:09 +08:00
parent 48d4e3ed34
commit 4ec7a628a6
2 changed files with 16 additions and 2 deletions

View File

@@ -994,7 +994,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
primary: false,
foregroundColor: Colors.white,
backgroundColor: Colors.transparent,
actions: (videoDetailController.userInfo == null)
actions: videoDetailController.userInfo == null
? null
: [
PopupMenuButton<String>(

View File

@@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'package:PiliPalaX/utils/id_utils.dart';
import 'package:floating/floating.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -177,12 +178,25 @@ class _HeaderControlState extends State<HeaderControl> {
// ),
// ),
// ),
if (widget.videoDetailCtr?.userInfo != null)
ListTile(
onTap: () {
Get.back();
Get.toNamed('/webviewnew', parameters: {
'url':
'https://www.bilibili.com/appeal/?avid=${IdUtils.bv2av(widget.videoDetailCtr!.bvid)}&bvid=${widget.videoDetailCtr!.bvid}'
});
},
dense: true,
leading: const Icon(Icons.error_outline, size: 20),
title: const Text('举报', style: titleStyle),
),
ListTile(
onTap: () async {
Get.back();
final res = await UserHttp.toViewLater(
bvid: widget.videoDetailCtr!.bvid);
SmartDialog.showToast(res['msg']);
Get.back();
},
dense: true,
leading: const Icon(Icons.watch_later_outlined, size: 20),