aboutsummaryrefslogtreecommitdiff
path: root/plugins/aves_model/lib/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/aves_model/lib/src/actions')
-rw-r--r--plugins/aves_model/lib/src/actions/chip.dart13
-rw-r--r--plugins/aves_model/lib/src/actions/chip_set.dart74
-rw-r--r--plugins/aves_model/lib/src/actions/entry.dart148
-rw-r--r--plugins/aves_model/lib/src/actions/entry_set.dart129
-rw-r--r--plugins/aves_model/lib/src/actions/explorer.dart6
-rw-r--r--plugins/aves_model/lib/src/actions/map.dart9
-rw-r--r--plugins/aves_model/lib/src/actions/map_cluster.dart4
-rw-r--r--plugins/aves_model/lib/src/actions/move_type.dart7
-rw-r--r--plugins/aves_model/lib/src/actions/settings.dart4
-rw-r--r--plugins/aves_model/lib/src/actions/share.dart4
-rw-r--r--plugins/aves_model/lib/src/actions/slideshow.dart6
11 files changed, 404 insertions, 0 deletions
diff --git a/plugins/aves_model/lib/src/actions/chip.dart b/plugins/aves_model/lib/src/actions/chip.dart
new file mode 100644
index 0000000..b2b119c
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/chip.dart
@@ -0,0 +1,13 @@
+enum ChipAction {
+ goToAlbumPage,
+ goToCountryPage,
+ goToPlacePage,
+ goToTagPage,
+ goToExplorerPage,
+ ratingOrGreater,
+ ratingOrLower,
+ decompose,
+ reverse,
+ hide,
+ lockVault,
+}
diff --git a/plugins/aves_model/lib/src/actions/chip_set.dart b/plugins/aves_model/lib/src/actions/chip_set.dart
new file mode 100644
index 0000000..13db2f8
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/chip_set.dart
@@ -0,0 +1,74 @@
+enum ChipSetAction {
+ // general
+ configureView,
+ select,
+ selectAll,
+ selectNone,
+ // browsing
+ search,
+ toggleTitleSearch,
+ createGroup,
+ createAlbum,
+ createVault,
+ // browsing or selecting
+ map,
+ slideshow,
+ stats,
+ // selecting (single/multiple filters)
+ delete,
+ remove,
+ hide,
+ pin,
+ unpin,
+ group,
+ lockVault,
+ showCountryStates,
+ showCollection,
+ // selecting (single filter)
+ rename,
+ setCover,
+ configureVault,
+}
+
+class ChipSetActions {
+ static const general = [
+ ChipSetAction.configureView,
+ ChipSetAction.select,
+ ChipSetAction.selectAll,
+ ChipSetAction.selectNone,
+ ];
+
+ // `null` items are converted to dividers
+ static const browsing = [
+ ChipSetAction.search,
+ ChipSetAction.toggleTitleSearch,
+ null,
+ ChipSetAction.map,
+ ChipSetAction.slideshow,
+ ChipSetAction.stats,
+ null,
+ ChipSetAction.createAlbum,
+ ChipSetAction.createVault,
+ ];
+
+ // `null` items are converted to dividers
+ static const selection = [
+ ChipSetAction.setCover,
+ ChipSetAction.pin,
+ ChipSetAction.unpin,
+ ChipSetAction.delete,
+ ChipSetAction.remove,
+ ChipSetAction.rename,
+ ChipSetAction.showCountryStates,
+ ChipSetAction.hide,
+ ChipSetAction.group,
+ null,
+ ChipSetAction.showCollection,
+ ChipSetAction.map,
+ ChipSetAction.slideshow,
+ ChipSetAction.stats,
+ null,
+ ChipSetAction.configureVault,
+ ChipSetAction.lockVault,
+ ];
+}
diff --git a/plugins/aves_model/lib/src/actions/entry.dart b/plugins/aves_model/lib/src/actions/entry.dart
new file mode 100644
index 0000000..02becf1
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/entry.dart
@@ -0,0 +1,148 @@
+enum EntryAction {
+ info,
+ addShortcut,
+ copyToClipboard,
+ delete,
+ restore,
+ convert,
+ print,
+ rename,
+ copy,
+ move,
+ share,
+ toggleFavourite,
+ // raster
+ rotateCCW,
+ rotateCW,
+ flip,
+ // vector
+ viewSource,
+ // video
+ lockViewer,
+ videoCaptureFrame,
+ videoSelectStreams,
+ videoSetSpeed,
+ videoABRepeat,
+ videoToggleMute,
+ videoSettings,
+ videoTogglePlay,
+ videoReplay10,
+ videoSkip10,
+ videoShowPreviousFrame,
+ videoShowNextFrame,
+ // external
+ edit,
+ open,
+ openVideoPlayer,
+ openMap,
+ setAs,
+ cast,
+ // platform
+ rotateScreen,
+ // metadata
+ editDate,
+ editLocation,
+ editTitleDescription,
+ editRating,
+ editTags,
+ removeMetadata,
+ exportMetadata,
+ // metadata / GeoTIFF
+ showGeoTiffOnMap,
+ // metadata / motion photo
+ convertMotionPhotoToStillImage,
+ viewMotionPhotoVideo,
+ // debug
+ debug,
+}
+
+class EntryActions {
+ static const topLevel = [
+ EntryAction.info,
+ EntryAction.share,
+ EntryAction.edit,
+ EntryAction.rename,
+ EntryAction.delete,
+ EntryAction.copy,
+ EntryAction.move,
+ EntryAction.toggleFavourite,
+ EntryAction.rotateScreen,
+ EntryAction.viewSource,
+ ];
+
+ static const export = [
+ ...exportInternal,
+ ...exportExternal,
+ ];
+
+ static const exportInternal = [
+ EntryAction.convert,
+ EntryAction.addShortcut,
+ EntryAction.copyToClipboard,
+ EntryAction.print,
+ ];
+
+ static const exportExternal = [
+ EntryAction.open,
+ EntryAction.openMap,
+ EntryAction.setAs,
+ EntryAction.cast,
+ ];
+
+ static const pageActions = {
+ EntryAction.videoCaptureFrame,
+ EntryAction.videoToggleMute,
+ EntryAction.videoSetSpeed,
+ EntryAction.videoABRepeat,
+ EntryAction.videoSelectStreams,
+ EntryAction.videoSettings,
+ ...videoPlayback,
+ ...orientationActions,
+ };
+
+ static const orientationActions = [
+ EntryAction.rotateCCW,
+ EntryAction.rotateCW,
+ EntryAction.flip,
+ ];
+
+ static const trashed = [
+ EntryAction.delete,
+ EntryAction.restore,
+ EntryAction.debug,
+ ];
+
+ static const video = [
+ EntryAction.videoCaptureFrame,
+ EntryAction.videoToggleMute,
+ EntryAction.videoSetSpeed,
+ EntryAction.videoABRepeat,
+ EntryAction.videoSelectStreams,
+ EntryAction.videoSettings,
+ EntryAction.lockViewer,
+ ];
+
+ static const videoPlayback = [
+ EntryAction.videoReplay10,
+ EntryAction.videoShowPreviousFrame,
+ EntryAction.videoTogglePlay,
+ EntryAction.videoShowNextFrame,
+ EntryAction.videoSkip10,
+ ];
+
+ static const commonMetadataActions = [
+ EntryAction.editDate,
+ EntryAction.editLocation,
+ EntryAction.editTitleDescription,
+ EntryAction.editRating,
+ EntryAction.editTags,
+ EntryAction.removeMetadata,
+ EntryAction.exportMetadata,
+ ];
+
+ static const formatSpecificMetadataActions = [
+ EntryAction.showGeoTiffOnMap,
+ EntryAction.convertMotionPhotoToStillImage,
+ EntryAction.viewMotionPhotoVideo,
+ ];
+}
diff --git a/plugins/aves_model/lib/src/actions/entry_set.dart b/plugins/aves_model/lib/src/actions/entry_set.dart
new file mode 100644
index 0000000..90bc1df
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/entry_set.dart
@@ -0,0 +1,129 @@
+enum EntrySetAction {
+ // general
+ configureView,
+ select,
+ selectAll,
+ selectNone,
+ // browsing
+ searchCollection,
+ toggleTitleSearch,
+ addDynamicAlbum,
+ addShortcut,
+ setHome,
+ emptyBin,
+ // browsing or selecting
+ map,
+ slideshow,
+ stats,
+ rescan,
+ // selecting
+ share,
+ delete,
+ restore,
+ copy,
+ move,
+ rename,
+ convert,
+ toggleFavourite,
+ rotateCCW,
+ rotateCW,
+ flip,
+ editDate,
+ editLocation,
+ editTitleDescription,
+ editRating,
+ editTags,
+ removeMetadata,
+}
+
+class EntrySetActions {
+ static const general = [
+ EntrySetAction.configureView,
+ EntrySetAction.select,
+ EntrySetAction.selectAll,
+ EntrySetAction.selectNone,
+ ];
+
+ // `null` items are converted to dividers
+ static const pageBrowsing = [
+ EntrySetAction.searchCollection,
+ EntrySetAction.toggleTitleSearch,
+ EntrySetAction.addDynamicAlbum,
+ EntrySetAction.addShortcut,
+ EntrySetAction.setHome,
+ null,
+ EntrySetAction.map,
+ EntrySetAction.slideshow,
+ EntrySetAction.stats,
+ null,
+ EntrySetAction.rescan,
+ EntrySetAction.emptyBin,
+ ];
+
+ // exclude bin related actions
+ static const collectionEditorBrowsing = [
+ EntrySetAction.searchCollection,
+ EntrySetAction.toggleTitleSearch,
+ EntrySetAction.map,
+ EntrySetAction.slideshow,
+ EntrySetAction.stats,
+ // only available as a quick action
+ EntrySetAction.selectAll,
+ ];
+
+ // `null` items are converted to dividers
+ static const pageSelection = [
+ EntrySetAction.share,
+ EntrySetAction.delete,
+ EntrySetAction.restore,
+ EntrySetAction.copy,
+ EntrySetAction.move,
+ EntrySetAction.rename,
+ EntrySetAction.convert,
+ EntrySetAction.toggleFavourite,
+ null,
+ EntrySetAction.map,
+ EntrySetAction.slideshow,
+ EntrySetAction.stats,
+ null,
+ EntrySetAction.rescan,
+ // editing actions are in their subsection
+ ];
+
+ // exclude bin related actions
+ static const collectionEditorSelectionRegular = [
+ EntrySetAction.share,
+ EntrySetAction.delete,
+ EntrySetAction.copy,
+ EntrySetAction.move,
+ EntrySetAction.rename,
+ EntrySetAction.convert,
+ EntrySetAction.toggleFavourite,
+ EntrySetAction.map,
+ EntrySetAction.slideshow,
+ EntrySetAction.stats,
+ EntrySetAction.selectAll,
+ // editing actions are in their subsection
+ ];
+
+ static const collectionEditorSelectionEdit = [
+ EntrySetAction.rotateCCW,
+ EntrySetAction.rotateCW,
+ EntrySetAction.flip,
+ EntrySetAction.editDate,
+ EntrySetAction.editLocation,
+ EntrySetAction.editTitleDescription,
+ EntrySetAction.editRating,
+ EntrySetAction.editTags,
+ EntrySetAction.removeMetadata,
+ ];
+
+ static const edit = [
+ EntrySetAction.editDate,
+ EntrySetAction.editLocation,
+ EntrySetAction.editTitleDescription,
+ EntrySetAction.editRating,
+ EntrySetAction.editTags,
+ EntrySetAction.removeMetadata,
+ ];
+}
diff --git a/plugins/aves_model/lib/src/actions/explorer.dart b/plugins/aves_model/lib/src/actions/explorer.dart
new file mode 100644
index 0000000..58d595b
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/explorer.dart
@@ -0,0 +1,6 @@
+enum ExplorerAction {
+ addShortcut,
+ setHome,
+ hide,
+ stats,
+}
diff --git a/plugins/aves_model/lib/src/actions/map.dart b/plugins/aves_model/lib/src/actions/map.dart
new file mode 100644
index 0000000..1c71363
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/map.dart
@@ -0,0 +1,9 @@
+enum MapAction {
+ // any map panel
+ selectStyle,
+ openMapApp,
+ zoomIn,
+ zoomOut,
+ // full page only
+ addShortcut,
+}
diff --git a/plugins/aves_model/lib/src/actions/map_cluster.dart b/plugins/aves_model/lib/src/actions/map_cluster.dart
new file mode 100644
index 0000000..d022934
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/map_cluster.dart
@@ -0,0 +1,4 @@
+enum MapClusterAction {
+ editLocation,
+ removeLocation,
+}
diff --git a/plugins/aves_model/lib/src/actions/move_type.dart b/plugins/aves_model/lib/src/actions/move_type.dart
new file mode 100644
index 0000000..7c362b0
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/move_type.dart
@@ -0,0 +1,7 @@
+enum MoveType {
+ copy,
+ move,
+ export,
+ toBin,
+ fromBin,
+}
diff --git a/plugins/aves_model/lib/src/actions/settings.dart b/plugins/aves_model/lib/src/actions/settings.dart
new file mode 100644
index 0000000..77e5a55
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/settings.dart
@@ -0,0 +1,4 @@
+enum SettingsAction {
+ export,
+ import,
+}
diff --git a/plugins/aves_model/lib/src/actions/share.dart b/plugins/aves_model/lib/src/actions/share.dart
new file mode 100644
index 0000000..3be6fb6
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/share.dart
@@ -0,0 +1,4 @@
+enum ShareAction {
+ imageOnly,
+ videoOnly,
+}
diff --git a/plugins/aves_model/lib/src/actions/slideshow.dart b/plugins/aves_model/lib/src/actions/slideshow.dart
new file mode 100644
index 0000000..a4f7825
--- /dev/null
+++ b/plugins/aves_model/lib/src/actions/slideshow.dart
@@ -0,0 +1,6 @@
+enum SlideshowAction {
+ resume,
+ showInCollection,
+ cast,
+ settings,
+}