mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-01 07:39:47 +08:00
mod: 侧边栏、动态重构,排行改为首页分区,平板、折叠屏、竖屏视频新适配,播放页可隐藏黑边、截图、点踩,弹幕粗细调整,默认关闭后台播放,弹窗接受返回
This commit is contained in:
@@ -87,10 +87,10 @@ class _HistoryPageState extends State<HistoryPage> {
|
||||
// 处理菜单项选择的逻辑
|
||||
switch (type) {
|
||||
case 'pause':
|
||||
_historyController.onPauseHistory();
|
||||
_historyController.onPauseHistory(context);
|
||||
break;
|
||||
case 'clear':
|
||||
_historyController.onClearHistory();
|
||||
_historyController.onClearHistory(context);
|
||||
break;
|
||||
case 'del':
|
||||
_historyController.onDelHistory();
|
||||
@@ -162,7 +162,7 @@ class _HistoryPageState extends State<HistoryPage> {
|
||||
child: const Text('全选'),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => _historyController.onDelCheckedHistory(),
|
||||
onPressed: () => _historyController.onDelCheckedHistory(context),
|
||||
child: Text(
|
||||
'删除',
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.error),
|
||||
@@ -194,16 +194,13 @@ class _HistoryPageState extends State<HistoryPage> {
|
||||
() => _historyController.historyList.isNotEmpty
|
||||
? SliverGrid(
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithMaxCrossAxisExtent(
|
||||
SliverGridDelegateWithExtentAndRatio(
|
||||
mainAxisSpacing: StyleString.cardSpace,
|
||||
crossAxisSpacing: StyleString.safeSpace,
|
||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||
mainAxisExtent: Grid.calculateActualWidth(
|
||||
context,
|
||||
Grid.maxRowWidth * 2,
|
||||
StyleString.safeSpace) /
|
||||
2.1 /
|
||||
StyleString.aspectRatio),
|
||||
childAspectRatio:
|
||||
StyleString.aspectRatio * 2.3,
|
||||
mainAxisExtent: 0),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(context, index) {
|
||||
return HistoryItem(
|
||||
@@ -231,7 +228,13 @@ class _HistoryPageState extends State<HistoryPage> {
|
||||
}
|
||||
} else {
|
||||
// 骨架屏
|
||||
return SliverList(
|
||||
return SliverGrid(
|
||||
gridDelegate: SliverGridDelegateWithExtentAndRatio(
|
||||
mainAxisSpacing: StyleString.cardSpace,
|
||||
crossAxisSpacing: StyleString.safeSpace,
|
||||
maxCrossAxisExtent: Grid.maxRowWidth * 2,
|
||||
childAspectRatio: StyleString.aspectRatio * 2.3,
|
||||
mainAxisExtent: 0),
|
||||
delegate: SliverChildBuilderDelegate((context, index) {
|
||||
return const VideoCardHSkeleton();
|
||||
}, childCount: 10),
|
||||
|
||||
Reference in New Issue
Block a user