mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: copy/move toview
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -128,6 +128,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
context: context,
|
||||
isCopy: true,
|
||||
ctr: _favDetailController,
|
||||
mediaId: _favDetailController.mediaId,
|
||||
),
|
||||
child: Text(
|
||||
'复制到',
|
||||
@@ -147,6 +148,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
||||
context: context,
|
||||
isCopy: false,
|
||||
ctr: _favDetailController,
|
||||
mediaId: _favDetailController.mediaId,
|
||||
),
|
||||
child: Text(
|
||||
'移动到',
|
||||
|
||||
@@ -12,9 +12,12 @@ import 'package:PiliPlus/http/user.dart';
|
||||
class LaterController extends MultiSelectController {
|
||||
RxInt count = (-1).obs;
|
||||
|
||||
dynamic mid;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
mid = GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
queryData();
|
||||
}
|
||||
|
||||
@@ -170,7 +173,7 @@ class LaterController extends MultiSelectController {
|
||||
'sourceType': 'watchLater',
|
||||
'count': list.length,
|
||||
'favTitle': '稍后再看',
|
||||
'mediaId': GStorage.userInfo.get('userInfoCache')?.mid,
|
||||
'mediaId': mid,
|
||||
'desc': false,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/widgets/icon_button.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/pages/history/view.dart' show AppBarWidget;
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||
@@ -80,10 +81,50 @@ class _LaterPageState extends State<LaterPage> {
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
),
|
||||
onPressed: () => _laterController.handleSelect(true),
|
||||
child: const Text('全选'),
|
||||
),
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
),
|
||||
onPressed: () => Utils.onCopyOrMove(
|
||||
context: context,
|
||||
isCopy: true,
|
||||
ctr: _laterController,
|
||||
mediaId: null,
|
||||
),
|
||||
child: Text(
|
||||
'复制到',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
),
|
||||
onPressed: () => Utils.onCopyOrMove(
|
||||
context: context,
|
||||
isCopy: false,
|
||||
ctr: _laterController,
|
||||
mediaId: null,
|
||||
),
|
||||
child: Text(
|
||||
'移动到',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
visualDensity: VisualDensity(horizontal: -2, vertical: -2),
|
||||
),
|
||||
onPressed: () => _laterController.onDelChecked(context),
|
||||
child: Text(
|
||||
'移除',
|
||||
|
||||
Reference in New Issue
Block a user