mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: video report button
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -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>(
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user