mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: 侧边栏、动态重构,排行改为首页分区,平板、折叠屏、竖屏视频新适配,播放页可隐藏黑边、截图、点踩,弹幕粗细调整,默认关闭后台播放,弹窗接受返回
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../http/user.dart';
|
||||
import '../../http/video.dart';
|
||||
@@ -11,7 +12,7 @@ class VideoPopupMenu extends StatelessWidget {
|
||||
final double? size;
|
||||
final double? iconSize;
|
||||
final dynamic videoItem;
|
||||
final double menuItemHeight = 50;
|
||||
final double menuItemHeight = 45;
|
||||
|
||||
const VideoPopupMenu({
|
||||
Key? key,
|
||||
@@ -53,10 +54,44 @@ class VideoPopupMenu extends StatelessWidget {
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
onTap: () async {
|
||||
SmartDialog.show(
|
||||
useSystem: true,
|
||||
animationType: SmartAnimationType.centerFade_otherSlide,
|
||||
builder: (BuildContext context) {
|
||||
Get.toNamed('/member?mid=${videoItem.owner.mid}', arguments: {
|
||||
'face': videoItem.owner.face,
|
||||
'heroTag': '${videoItem.owner.mid}',
|
||||
});
|
||||
},
|
||||
value: 'visit',
|
||||
height: menuItemHeight,
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(CupertinoIcons.person, size: 16),
|
||||
const SizedBox(width: 6),
|
||||
Text('访问:${videoItem.owner.name}',
|
||||
style: const TextStyle(fontSize: 13))
|
||||
],
|
||||
),
|
||||
),
|
||||
// 不感兴趣
|
||||
PopupMenuItem<String>(
|
||||
onTap: () async {
|
||||
// var res = await VideoHttp.dislike(bvid: videoItem.bvid as String);
|
||||
// SmartDialog.showToast(res['msg']);
|
||||
SmartDialog.showToast("暂未实现");
|
||||
},
|
||||
value: 'dislike',
|
||||
height: menuItemHeight,
|
||||
child: const Row(
|
||||
children: [
|
||||
Icon(CupertinoIcons.hand_thumbsdown, size: 16),
|
||||
SizedBox(width: 6),
|
||||
Text('不感兴趣', style: TextStyle(fontSize: 13))
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
onTap: () async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
title: const Text('提示'),
|
||||
content: Text(
|
||||
@@ -64,7 +99,7 @@ class VideoPopupMenu extends StatelessWidget {
|
||||
'\n\n注:被拉黑的Up可以在隐私设置-黑名单管理中解除'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => SmartDialog.dismiss(),
|
||||
onPressed: () => Get.back(),
|
||||
child: Text(
|
||||
'点错了',
|
||||
style: TextStyle(
|
||||
@@ -86,7 +121,7 @@ class VideoPopupMenu extends StatelessWidget {
|
||||
blackMidsList.insert(0, videoItem.owner.mid);
|
||||
GStrorage.setting
|
||||
.put(SettingBoxKey.blackMidsList, blackMidsList);
|
||||
SmartDialog.dismiss();
|
||||
Get.back();
|
||||
SmartDialog.showToast(res['msg'] ?? '成功');
|
||||
},
|
||||
child: const Text('确认'),
|
||||
|
||||
Reference in New Issue
Block a user