mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: post segment panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1407,6 +1407,7 @@ class VideoDetailController extends GetxController
|
|||||||
(index) => Stack(
|
(index) => Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
margin: const EdgeInsets.symmetric(
|
margin: const EdgeInsets.symmetric(
|
||||||
horizontal: 16,
|
horizontal: 16,
|
||||||
vertical: 5,
|
vertical: 5,
|
||||||
@@ -1420,43 +1421,57 @@ class VideoDetailController extends GetxController
|
|||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (list![index].actionType !=
|
if (list![index].actionType !=
|
||||||
ActionType.full) ...[
|
ActionType.full) ...[
|
||||||
Row(
|
Wrap(
|
||||||
|
runSpacing: 8,
|
||||||
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
...segmentWidget(
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: segmentWidget(
|
||||||
isFirst: true,
|
isFirst: true,
|
||||||
index: index,
|
index: index,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
if (list![index].category !=
|
if (list![index].category !=
|
||||||
SegmentType
|
SegmentType.poi_highlight)
|
||||||
.poi_highlight) ...[
|
Row(
|
||||||
const SizedBox(width: 16),
|
mainAxisSize:
|
||||||
...segmentWidget(
|
MainAxisSize.min,
|
||||||
|
children: segmentWidget(
|
||||||
isFirst: false,
|
isFirst: false,
|
||||||
index: index,
|
index: index,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
|
Wrap(
|
||||||
|
runSpacing: 8,
|
||||||
|
spacing: 16,
|
||||||
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Text('分类: '),
|
const Text('分类: '),
|
||||||
PopupMenuButton(
|
PopupMenuButton(
|
||||||
initialValue:
|
initialValue:
|
||||||
list![index].category,
|
list![index].category,
|
||||||
onSelected: (item) async {
|
onSelected: (item) async {
|
||||||
list![index].category = item;
|
list![index].category =
|
||||||
|
item;
|
||||||
List<ActionType>
|
List<ActionType>
|
||||||
constraintList =
|
constraintList =
|
||||||
_segmentType2ActionType(
|
_segmentType2ActionType(
|
||||||
item);
|
item);
|
||||||
if (constraintList
|
if (constraintList
|
||||||
.contains(
|
.contains(list![index]
|
||||||
list![index].actionType)
|
.actionType)
|
||||||
.not) {
|
.not) {
|
||||||
list![index].actionType =
|
list![index].actionType =
|
||||||
constraintList.first;
|
constraintList.first;
|
||||||
@@ -1495,14 +1510,18 @@ class VideoDetailController extends GetxController
|
|||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize:
|
||||||
|
MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
list![index].category.title,
|
list![index]
|
||||||
|
.category
|
||||||
|
.title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1,
|
height: 1,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Theme.of(context)
|
color:
|
||||||
|
Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary,
|
.secondary,
|
||||||
),
|
),
|
||||||
@@ -1514,8 +1533,8 @@ class VideoDetailController extends GetxController
|
|||||||
Icon(
|
Icon(
|
||||||
MdiIcons
|
MdiIcons
|
||||||
.unfoldMoreHorizontal,
|
.unfoldMoreHorizontal,
|
||||||
size:
|
size: MediaQuery
|
||||||
MediaQuery.textScalerOf(
|
.textScalerOf(
|
||||||
context)
|
context)
|
||||||
.scale(14),
|
.scale(14),
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
@@ -1525,14 +1544,20 @@ class VideoDetailController extends GetxController
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16),
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
const Text('行为类别: '),
|
const Text('行为类别: '),
|
||||||
PopupMenuButton(
|
PopupMenuButton(
|
||||||
initialValue:
|
initialValue:
|
||||||
list![index].actionType,
|
list![index].actionType,
|
||||||
onSelected: (item) async {
|
onSelected: (item) async {
|
||||||
list![index].actionType = item;
|
list![index].actionType =
|
||||||
if (item == ActionType.full) {
|
item;
|
||||||
|
if (item ==
|
||||||
|
ActionType.full) {
|
||||||
updateSegment(
|
updateSegment(
|
||||||
isFirst: true,
|
isFirst: true,
|
||||||
index: index,
|
index: index,
|
||||||
@@ -1544,20 +1569,23 @@ class VideoDetailController extends GetxController
|
|||||||
itemBuilder: (context) =>
|
itemBuilder: (context) =>
|
||||||
ActionType.values
|
ActionType.values
|
||||||
.map(
|
.map(
|
||||||
(item) => PopupMenuItem<
|
(item) =>
|
||||||
|
PopupMenuItem<
|
||||||
ActionType>(
|
ActionType>(
|
||||||
enabled: _segmentType2ActionType(
|
enabled: _segmentType2ActionType(
|
||||||
list![index]
|
list![index]
|
||||||
.category)
|
.category)
|
||||||
.contains(item),
|
.contains(
|
||||||
|
item),
|
||||||
value: item,
|
value: item,
|
||||||
child:
|
child: Text(
|
||||||
Text(item.title),
|
item.title),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize:
|
||||||
|
MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
list![index]
|
list![index]
|
||||||
@@ -1566,7 +1594,8 @@ class VideoDetailController extends GetxController
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1,
|
height: 1,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Theme.of(context)
|
color:
|
||||||
|
Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.secondary,
|
.secondary,
|
||||||
),
|
),
|
||||||
@@ -1578,8 +1607,8 @@ class VideoDetailController extends GetxController
|
|||||||
Icon(
|
Icon(
|
||||||
MdiIcons
|
MdiIcons
|
||||||
.unfoldMoreHorizontal,
|
.unfoldMoreHorizontal,
|
||||||
size:
|
size: MediaQuery
|
||||||
MediaQuery.textScalerOf(
|
.textScalerOf(
|
||||||
context)
|
context)
|
||||||
.scale(14),
|
.scale(14),
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
@@ -1593,6 +1622,8 @@ class VideoDetailController extends GetxController
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 10,
|
top: 10,
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: context,
|
context: context,
|
||||||
removeBottom: true,
|
removeBottom: true,
|
||||||
@@ -835,6 +836,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: Scrollbar(
|
child: Scrollbar(
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -920,6 +922,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Center(child: Text('选择音质', style: titleStyle))),
|
child: Center(child: Text('选择音质', style: titleStyle))),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: context,
|
context: context,
|
||||||
removeBottom: true,
|
removeBottom: true,
|
||||||
@@ -1010,6 +1013,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Center(child: Text('选择解码格式', style: titleStyle))),
|
child: Center(child: Text('选择解码格式', style: titleStyle))),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: context,
|
context: context,
|
||||||
removeBottom: true,
|
removeBottom: true,
|
||||||
@@ -1739,6 +1743,7 @@ class _HeaderControlState extends State<HeaderControl> {
|
|||||||
child: Center(child: Text('选择播放顺序', style: titleStyle))),
|
child: Center(child: Text('选择播放顺序', style: titleStyle))),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Material(
|
child: Material(
|
||||||
|
color: Colors.transparent,
|
||||||
child: MediaQuery.removePadding(
|
child: MediaQuery.removePadding(
|
||||||
context: context,
|
context: context,
|
||||||
removeBottom: true,
|
removeBottom: true,
|
||||||
|
|||||||
@@ -54,18 +54,12 @@ class Utils {
|
|||||||
GetDialogRoute(
|
GetDialogRoute(
|
||||||
pageBuilder: (buildContext, animation, secondaryAnimation) {
|
pageBuilder: (buildContext, animation, secondaryAnimation) {
|
||||||
return MediaQuery.orientationOf(Get.context!) == Orientation.portrait
|
return MediaQuery.orientationOf(Get.context!) == Orientation.portrait
|
||||||
? isFullScreen
|
|
||||||
? Column(
|
? Column(
|
||||||
children: [
|
|
||||||
const Spacer(flex: 4),
|
|
||||||
Expanded(flex: 6, child: child),
|
|
||||||
if (padding != null) SizedBox(height: padding),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Column(
|
|
||||||
children: [
|
children: [
|
||||||
const Spacer(flex: 3),
|
const Spacer(flex: 3),
|
||||||
Expanded(flex: 7, child: child),
|
Expanded(flex: 7, child: child),
|
||||||
|
if (isFullScreen && padding != null)
|
||||||
|
SizedBox(height: padding),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
: Row(
|
: Row(
|
||||||
|
|||||||
Reference in New Issue
Block a user