#490 viewer: export actions available as quick actions
This commit is contained in:
parent
52b60e15b9
commit
f07244c144
4 changed files with 14 additions and 9 deletions
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Viewer: overlay details expand/collapse on tap
|
- Viewer: overlay details expand/collapse on tap
|
||||||
|
- Viewer: export actions available as quick actions
|
||||||
- TV: improved support for Info
|
- TV: improved support for Info
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -71,13 +71,15 @@ class EntryActions {
|
||||||
];
|
];
|
||||||
|
|
||||||
static const export = [
|
static const export = [
|
||||||
|
...exportInternal,
|
||||||
|
...exportExternal,
|
||||||
|
];
|
||||||
|
|
||||||
|
static const exportInternal = [
|
||||||
EntryAction.convert,
|
EntryAction.convert,
|
||||||
EntryAction.addShortcut,
|
EntryAction.addShortcut,
|
||||||
EntryAction.copyToClipboard,
|
EntryAction.copyToClipboard,
|
||||||
EntryAction.print,
|
EntryAction.print,
|
||||||
EntryAction.open,
|
|
||||||
EntryAction.openMap,
|
|
||||||
EntryAction.setAs,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
static const exportExternal = [
|
static const exportExternal = [
|
||||||
|
|
|
@ -25,6 +25,7 @@ class ViewerActionEditorPage extends StatelessWidget {
|
||||||
EntryAction.flip,
|
EntryAction.flip,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
...EntryActions.exportInternal,
|
||||||
EntryAction.videoCaptureFrame,
|
EntryAction.videoCaptureFrame,
|
||||||
EntryAction.videoToggleMute,
|
EntryAction.videoToggleMute,
|
||||||
EntryAction.videoSetSpeed,
|
EntryAction.videoSetSpeed,
|
||||||
|
|
|
@ -71,15 +71,16 @@ class ViewerButtons extends StatelessWidget {
|
||||||
selector: (context, s) => s.isRotationLocked,
|
selector: (context, s) => s.isRotationLocked,
|
||||||
builder: (context, s, child) {
|
builder: (context, s, child) {
|
||||||
final quickActions = (trashed ? EntryActions.trashed : settings.viewerQuickActions).where(actionDelegate.isVisible).where(actionDelegate.canApply).take(availableCount - 1).toList();
|
final quickActions = (trashed ? EntryActions.trashed : settings.viewerQuickActions).where(actionDelegate.isVisible).where(actionDelegate.canApply).take(availableCount - 1).toList();
|
||||||
final topLevelActions = EntryActions.topLevel.where((action) => !quickActions.contains(action)).where(actionDelegate.isVisible).toList();
|
List<EntryAction> getMenuActions(List<EntryAction> categoryActions) {
|
||||||
final exportActions = EntryActions.export.where((action) => !quickActions.contains(action)).where(actionDelegate.isVisible).toList();
|
return categoryActions.where((action) => !quickActions.contains(action)).where(actionDelegate.isVisible).toList();
|
||||||
final videoActions = EntryActions.video.where((action) => !quickActions.contains(action)).where(actionDelegate.isVisible).toList();
|
}
|
||||||
|
|
||||||
return ViewerButtonRowContent(
|
return ViewerButtonRowContent(
|
||||||
actionDelegate: EntryActionDelegate(mainEntry, pageEntry, collection),
|
actionDelegate: EntryActionDelegate(mainEntry, pageEntry, collection),
|
||||||
quickActions: quickActions,
|
quickActions: quickActions,
|
||||||
topLevelActions: topLevelActions,
|
topLevelActions: getMenuActions(EntryActions.topLevel),
|
||||||
exportActions: exportActions,
|
exportActions: getMenuActions(EntryActions.export),
|
||||||
videoActions: videoActions,
|
videoActions: getMenuActions(EntryActions.video),
|
||||||
scale: scale,
|
scale: scale,
|
||||||
mainEntry: mainEntry,
|
mainEntry: mainEntry,
|
||||||
pageEntry: pageEntry,
|
pageEntry: pageEntry,
|
||||||
|
|
Loading…
Reference in a new issue