+ name: "ToggleTrashAction",
+ execute: (dispatch, resources: ContextMenuResource[]) => {
+ resources.forEach(resource => dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)));
+ },
+ },
+ ],
+];
+
+export const collectionAdminActionSet: ContextMenuActionSet = [
+ [
+ ...collectionActionSet.reduce((prev, next) => prev.concat(next), []),
+ {
+ component: TogglePublicFavoriteAction,
+ name: "TogglePublicFavoriteAction",
+ execute: (dispatch, resources) => {
+ resources.forEach(resource =>
+ dispatch<any>(togglePublicFavorite(resource)).then(() => {
+ dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
+ })
+ );
+ },
+ },
+ ],
+];
+
+export const oldCollectionVersionActionSet: ContextMenuActionSet = [
+ [
+ ...commonActionSet.reduce((prev, next) => prev.concat(next), []),
+ {
+ icon: RestoreVersionIcon,
+ name: "Restore version",
+ execute: (dispatch, resources) => {
+ resources.forEach(({ uuid }) => dispatch<any>(openRestoreCollectionVersionDialog(uuid)));
+ },