mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-02 00:36:20 +08:00
feat: add copy/move support to fav/later search results (#1822)
* feat: add copy/move support to fav/later search results * update Signed-off-by: dom <githubaccount56556@proton.me> --------- Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:PiliPlus/pages/later/widgets/video_card_h_later.dart';
|
||||
import 'package:PiliPlus/pages/later_search/controller.dart';
|
||||
import 'package:PiliPlus/utils/grid.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:PiliPlus/utils/request_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -25,6 +26,38 @@ class _LaterSearchPageState
|
||||
tag: Utils.generateRandomString(8),
|
||||
);
|
||||
|
||||
@override
|
||||
List<Widget>? get multiSelectActions {
|
||||
final btnStyle = TextButton.styleFrom(visualDensity: .compact);
|
||||
final textStyle = TextStyle(
|
||||
color: ColorScheme.of(context).onSurfaceVariant,
|
||||
);
|
||||
return [
|
||||
TextButton(
|
||||
style: btnStyle,
|
||||
onPressed: () => RequestUtils.onCopyOrMove<LaterItemModel>(
|
||||
context: context,
|
||||
isCopy: true,
|
||||
ctr: controller,
|
||||
mediaId: null,
|
||||
mid: controller.mid,
|
||||
),
|
||||
child: Text('复制', style: textStyle),
|
||||
),
|
||||
TextButton(
|
||||
style: btnStyle,
|
||||
onPressed: () => RequestUtils.onCopyOrMove<LaterItemModel>(
|
||||
context: context,
|
||||
isCopy: false,
|
||||
ctr: controller,
|
||||
mediaId: null,
|
||||
mid: controller.mid,
|
||||
),
|
||||
child: Text('移动', style: textStyle),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
late final gridDelegate = Grid.videoCardHDelegate(context, minHeight: 110);
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user