mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video tabbar, settings icon
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:PiliPalaX/models/common/dynamics_type.dart';
|
||||
import 'package:PiliPalaX/models/common/reply_sort_type.dart';
|
||||
import 'package:PiliPalaX/pages/setting/widgets/select_dialog.dart';
|
||||
import 'package:PiliPalaX/utils/storage.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
|
||||
import '../home/index.dart';
|
||||
import 'controller.dart';
|
||||
@@ -144,7 +145,17 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
SetSwitchItem(
|
||||
title: '空降助手',
|
||||
subTitle: '点击配置',
|
||||
leading: Icon(Icons.block),
|
||||
leading: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
const Icon(Icons.shield),
|
||||
Icon(
|
||||
Icons.play_arrow_rounded,
|
||||
size: 18,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
],
|
||||
),
|
||||
setKey: SettingBoxKey.enableSponsorBlock,
|
||||
defaultVal: false,
|
||||
onTap: () => Get.toNamed('/sponsorBlock'),
|
||||
@@ -152,7 +163,7 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
SetSwitchItem(
|
||||
title: '检查未读动态',
|
||||
subTitle: '点击设置检查周期(min)',
|
||||
leading: Icon(Icons.notifications_none),
|
||||
leading: const Icon(Icons.notifications_none),
|
||||
setKey: SettingBoxKey.checkDynamic,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
@@ -207,7 +218,11 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
SetSwitchItem(
|
||||
title: '使用gRPC加载评论',
|
||||
subTitle: '如无法加载评论,可关闭\n非gRPC楼中楼无法定位评论、按热度/时间排序、查看对话',
|
||||
leading: Icon(Icons.reply),
|
||||
leading: SizedBox(
|
||||
height: 24,
|
||||
width: 24,
|
||||
child: Icon(MdiIcons.google, size: 20),
|
||||
),
|
||||
setKey: SettingBoxKey.grpcReply,
|
||||
defaultVal: true,
|
||||
onChanged: (value) {
|
||||
@@ -218,44 +233,44 @@ class _ExtraSettingState extends State<ExtraSetting> {
|
||||
title: '显示视频分段信息',
|
||||
leading: Transform.rotate(
|
||||
angle: pi / 2,
|
||||
child: Icon(Icons.reorder),
|
||||
child: Icon(MdiIcons.viewHeadline),
|
||||
),
|
||||
setKey: SettingBoxKey.showViewPoints,
|
||||
defaultVal: true,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '视频页显示相关视频',
|
||||
leading: Icon(Icons.recommend_outlined),
|
||||
leading: Icon(MdiIcons.motionPlayOutline),
|
||||
setKey: SettingBoxKey.showRelatedVideo,
|
||||
defaultVal: true,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '显示视频评论',
|
||||
leading: Icon(Icons.reply_all),
|
||||
leading: Icon(MdiIcons.commentTextOutline),
|
||||
setKey: SettingBoxKey.showVideoReply,
|
||||
defaultVal: true,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '显示番剧评论',
|
||||
leading: Icon(Icons.reply_all),
|
||||
leading: Icon(MdiIcons.commentTextOutline),
|
||||
setKey: SettingBoxKey.showBangumiReply,
|
||||
defaultVal: true,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '默认展开视频简介',
|
||||
leading: Icon(Icons.expand_more),
|
||||
leading: const Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.alwaysExapndIntroPanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '横屏自动展开视频简介',
|
||||
leading: Icon(Icons.expand_more),
|
||||
leading: const Icon(Icons.expand_more),
|
||||
setKey: SettingBoxKey.exapndIntroPanelH,
|
||||
defaultVal: false,
|
||||
),
|
||||
SetSwitchItem(
|
||||
title: '横屏分P/合集列表显示在Tab栏',
|
||||
leading: Icon(Icons.format_list_numbered_rtl_sharp),
|
||||
leading: const Icon(Icons.format_list_numbered_rtl_sharp),
|
||||
setKey: SettingBoxKey.horizontalSeasonPanel,
|
||||
defaultVal: false,
|
||||
),
|
||||
|
||||
@@ -1578,6 +1578,28 @@ class VideoDetailController extends GetxController
|
||||
child: FloatingActionButton(
|
||||
tooltip: '提交',
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text(
|
||||
'确定无误再提交',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: Get.back,
|
||||
child: Text(
|
||||
'取消',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
Request()
|
||||
.post(
|
||||
'${GStorage.blockServer}/api/skipSegments',
|
||||
@@ -1586,8 +1608,8 @@ class VideoDetailController extends GetxController
|
||||
'cid': cid.value,
|
||||
'userID': GStorage.blockUserID,
|
||||
'userAgent': Constants.userAgent,
|
||||
'videoDuration':
|
||||
plPlayerController.durationSeconds.value,
|
||||
'videoDuration': plPlayerController
|
||||
.durationSeconds.value,
|
||||
},
|
||||
data: {
|
||||
'segments': list!
|
||||
@@ -1597,8 +1619,10 @@ class VideoDetailController extends GetxController
|
||||
item.segment.first,
|
||||
item.segment.second,
|
||||
],
|
||||
'category': item.category.name,
|
||||
'actionType': item.actionType.name,
|
||||
'category':
|
||||
item.category.name,
|
||||
'actionType':
|
||||
item.actionType.name,
|
||||
},
|
||||
)
|
||||
.toList(),
|
||||
@@ -1612,9 +1636,12 @@ class VideoDetailController extends GetxController
|
||||
SmartDialog.showToast('提交成功');
|
||||
list?.clear();
|
||||
_handleSBData(res);
|
||||
plPlayerController.segmentList.value =
|
||||
_segmentProgressList ?? <Segment>[];
|
||||
if (positionSubscription == null) {
|
||||
plPlayerController
|
||||
.segmentList.value =
|
||||
_segmentProgressList ??
|
||||
<Segment>[];
|
||||
if (positionSubscription ==
|
||||
null) {
|
||||
_initSkip();
|
||||
}
|
||||
} else {
|
||||
@@ -1630,6 +1657,12 @@ class VideoDetailController extends GetxController
|
||||
},
|
||||
);
|
||||
},
|
||||
child: const Text('确定提交'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Icon(Icons.check),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1256,7 +1256,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
const Spacer()
|
||||
else
|
||||
Flexible(
|
||||
flex: 1,
|
||||
flex: length == 3 ? 2 : 1,
|
||||
child: showReply ? Obx(() => tabbar()) : tabbar(),
|
||||
),
|
||||
Flexible(
|
||||
|
||||
@@ -1760,10 +1760,16 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () => widget.videoDetailCtr?.onBlock(context),
|
||||
icon: const Icon(
|
||||
Icons.block,
|
||||
size: 19,
|
||||
color: Colors.white,
|
||||
icon: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Icon(Icons.shield, size: 18),
|
||||
Icon(
|
||||
Icons.play_arrow_rounded,
|
||||
size: 17,
|
||||
color: Colors.black87,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -12,6 +12,7 @@ import 'package:flutter_volume_controller/flutter_volume_controller.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||
import 'package:media_kit/media_kit.dart';
|
||||
import 'package:media_kit_video/media_kit_video.dart';
|
||||
import 'package:PiliPalaX/plugin/pl_player/controller.dart';
|
||||
@@ -347,8 +348,8 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
child: ComBtn(
|
||||
icon: Transform.rotate(
|
||||
angle: pi / 2,
|
||||
child: const Icon(
|
||||
Icons.reorder,
|
||||
child: Icon(
|
||||
MdiIcons.viewHeadline,
|
||||
semanticLabel: '分段信息',
|
||||
size: 22,
|
||||
color: Colors.white,
|
||||
|
||||
Reference in New Issue
Block a user