mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: video sheet
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -113,24 +113,6 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
right: 12,
|
||||
bottom: 12 + MediaQuery.paddingOf(context).bottom,
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 35,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 32,
|
||||
height: 3,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSecondaryContainer
|
||||
.withOpacity(0.5),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(3))),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: MediaQuery.removePadding(
|
||||
@@ -138,6 +120,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
removeBottom: true,
|
||||
child: ListView(
|
||||
children: [
|
||||
const SizedBox(height: 14),
|
||||
// ListTile(
|
||||
// onTap: () {},
|
||||
// dense: true,
|
||||
@@ -171,15 +154,13 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
bvid: widget.videoDetailCtr.bvid);
|
||||
SmartDialog.showToast(res['msg']);
|
||||
},
|
||||
leading:
|
||||
const Icon(Icons.watch_later_outlined, size: 20),
|
||||
leading: const Icon(Icons.watch_later_outlined, size: 20),
|
||||
title: const Text('添加至「稍后再看」', style: titleStyle),
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () => {Get.back(), scheduleExit()},
|
||||
leading:
|
||||
const Icon(Icons.hourglass_top_outlined, size: 20),
|
||||
leading: const Icon(Icons.hourglass_top_outlined, size: 20),
|
||||
title: const Text('定时关闭', style: titleStyle),
|
||||
),
|
||||
ListTile(
|
||||
@@ -195,8 +176,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
),
|
||||
ListTile(
|
||||
dense: true,
|
||||
leading: const Icon(
|
||||
Icons.stay_current_landscape_outlined,
|
||||
leading: const Icon(Icons.stay_current_landscape_outlined,
|
||||
size: 20),
|
||||
title: Row(
|
||||
children: [
|
||||
@@ -211,8 +191,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
const SizedBox(width: 10),
|
||||
Builder(
|
||||
builder: (context) => PopupMenuButton(
|
||||
initialValue: SuperResolutionType.values[
|
||||
widget.controller.superResolutionType],
|
||||
initialValue: SuperResolutionType
|
||||
.values[widget.controller.superResolutionType],
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(4),
|
||||
child: Row(
|
||||
@@ -220,26 +200,23 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
children: [
|
||||
Text(
|
||||
SuperResolutionType
|
||||
.values[widget
|
||||
.controller.superResolutionType]
|
||||
.values[
|
||||
widget.controller.superResolutionType]
|
||||
.title,
|
||||
strutStyle:
|
||||
StrutStyle(leading: 0, height: 1),
|
||||
strutStyle: StrutStyle(leading: 0, height: 1),
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
fontSize: 14,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
MdiIcons.unfoldMoreHorizontal,
|
||||
size: MediaQuery.textScalerOf(context)
|
||||
.scale(14),
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
color:
|
||||
Theme.of(context).colorScheme.secondary,
|
||||
)
|
||||
],
|
||||
),
|
||||
@@ -250,8 +227,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
(context as Element).markNeedsBuild();
|
||||
}
|
||||
},
|
||||
itemBuilder: (context) =>
|
||||
SuperResolutionType.values
|
||||
itemBuilder: (context) => SuperResolutionType.values
|
||||
.map((item) => PopupMenuItem(
|
||||
value: item,
|
||||
child: Text(item.title),
|
||||
@@ -279,10 +255,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
title: 'CDN 设置',
|
||||
value: defaultCDNService,
|
||||
values: CDNService.values.map((e) {
|
||||
return {
|
||||
'title': e.description,
|
||||
'value': e.code
|
||||
};
|
||||
return {'title': e.description, 'value': e.code};
|
||||
}).toList());
|
||||
},
|
||||
);
|
||||
@@ -326,9 +299,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
? Theme.of(context)
|
||||
.colorScheme
|
||||
.onSecondaryContainer
|
||||
: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline,
|
||||
: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
@@ -344,18 +315,17 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
iconData: Icons.headphones,
|
||||
onTap: widget.controller.setOnlyPlayAudio,
|
||||
text: " 听视频 ",
|
||||
selectStatus:
|
||||
widget.controller.onlyPlayAudio.value,
|
||||
selectStatus: widget.controller.onlyPlayAudio.value,
|
||||
),
|
||||
),
|
||||
3 => Obx(
|
||||
() => ActionRowLineItem(
|
||||
iconData: Icons.play_circle_outline,
|
||||
onTap: widget
|
||||
.controller.setContinuePlayInBackground,
|
||||
onTap:
|
||||
widget.controller.setContinuePlayInBackground,
|
||||
text: " 后台播放 ",
|
||||
selectStatus: widget.controller
|
||||
.continuePlayInBackground.value,
|
||||
selectStatus: widget
|
||||
.controller.continuePlayInBackground.value,
|
||||
),
|
||||
),
|
||||
int() => throw UnimplementedError(),
|
||||
@@ -366,8 +336,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () => {Get.back(), showSetVideoQa()},
|
||||
leading:
|
||||
const Icon(Icons.play_circle_outline, size: 20),
|
||||
leading: const Icon(Icons.play_circle_outline, size: 20),
|
||||
title: const Text('选择画质', style: titleStyle),
|
||||
subtitle: Text(
|
||||
'当前画质 ${widget.videoDetailCtr.currentVideoQa.description}',
|
||||
@@ -411,8 +380,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
title: const Text('播放信息', style: titleStyle),
|
||||
leading: const Icon(Icons.info_outline, size: 20),
|
||||
onTap: () {
|
||||
Player? player =
|
||||
widget.controller.videoPlayerController;
|
||||
Player? player = widget.controller.videoPlayerController;
|
||||
if (player == null) {
|
||||
SmartDialog.showToast('播放器未初始化');
|
||||
return;
|
||||
@@ -441,8 +409,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("VideoParams"),
|
||||
subtitle: Text(player.state.videoParams
|
||||
.toString()),
|
||||
subtitle:
|
||||
Text(player.state.videoParams.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'VideoParams\n${player.state.videoParams}',
|
||||
@@ -453,8 +421,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("AudioParams"),
|
||||
subtitle: Text(player.state.audioParams
|
||||
.toString()),
|
||||
subtitle:
|
||||
Text(player.state.audioParams.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'AudioParams\n${player.state.audioParams}',
|
||||
@@ -465,8 +433,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("Media"),
|
||||
subtitle: Text(
|
||||
player.state.playlist.toString()),
|
||||
subtitle:
|
||||
Text(player.state.playlist.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'Media\n${player.state.playlist}',
|
||||
@@ -477,8 +445,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("AudioTrack"),
|
||||
subtitle: Text(player.state.track.audio
|
||||
.toString()),
|
||||
subtitle:
|
||||
Text(player.state.track.audio.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'AudioTrack\n${player.state.track.audio}',
|
||||
@@ -489,8 +457,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("VideoTrack"),
|
||||
subtitle: Text(player.state.track.video
|
||||
.toString()),
|
||||
subtitle:
|
||||
Text(player.state.track.video.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'VideoTrack\n${player.state.track.audio}',
|
||||
@@ -501,8 +469,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("pitch"),
|
||||
subtitle: Text(
|
||||
player.state.pitch.toString()),
|
||||
subtitle:
|
||||
Text(player.state.pitch.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'pitch\n${player.state.pitch}',
|
||||
@@ -512,8 +480,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("rate"),
|
||||
subtitle: Text(
|
||||
player.state.rate.toString()),
|
||||
subtitle:
|
||||
Text(player.state.rate.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'rate\n${player.state.rate}',
|
||||
@@ -523,8 +491,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("AudioBitrate"),
|
||||
subtitle: Text(player.state.audioBitrate
|
||||
.toString()),
|
||||
subtitle: Text(
|
||||
player.state.audioBitrate.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'AudioBitrate\n${player.state.audioBitrate}',
|
||||
@@ -535,8 +503,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
ListTile(
|
||||
dense: true,
|
||||
title: const Text("Volume"),
|
||||
subtitle: Text(
|
||||
player.state.volume.toString()),
|
||||
subtitle:
|
||||
Text(player.state.volume.toString()),
|
||||
onTap: () {
|
||||
Utils.copyText(
|
||||
'Volume\n${player.state.volume}',
|
||||
@@ -553,9 +521,8 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
child: Text(
|
||||
'确定',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.outline),
|
||||
color:
|
||||
Theme.of(context).colorScheme.outline),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -586,9 +553,6 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -619,7 +583,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
const SizedBox(height: 10),
|
||||
const Center(child: Text('定时关闭', style: titleStyle)),
|
||||
const SizedBox(height: 10),
|
||||
...[
|
||||
@@ -1149,8 +1113,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
||||
Get.toNamed('/danmakuBlock',
|
||||
arguments: widget.controller)
|
||||
},
|
||||
child: Text(
|
||||
"屏蔽管理(${widget.controller.filterCount})")),
|
||||
child: Text("屏蔽管理(${widget.controller.filterCount})")),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
|
||||
Reference in New Issue
Block a user