- },
- {
- icon: DetailsIcon,
- name: "View details",
- execute: dispatch => {
- dispatch<any>(toggleDetailsPanel());
- }
- },
- {
- icon: AdvancedIcon,
- name: "Advanced",
- execute: (dispatch, resource) => {
- dispatch<any>(openAdvancedTabDialog(resource.uuid));
- }
- },
-]];
+const commonActionSet: ContextMenuActionSet = [
+ [
+ {
+ icon: OpenIcon,
+ name: 'Open in new tab',
+ execute: (dispatch, resource) => {
+ dispatch<any>(openInNewTabAction(resource));
+ },
+ },
+ {
+ icon: Link,
+ name: 'Copy to clipboard',
+ execute: (dispatch, resource) => {
+ dispatch<any>(copyToClipboardAction(resource));
+ },
+ },
+ {
+ icon: CopyIcon,
+ name: 'Make a copy',
+ execute: (dispatch, resource) => {
+ dispatch<any>(openCollectionCopyDialog(resource));
+ },
+ },
+ {
+ icon: DetailsIcon,
+ name: 'View details',
+ execute: (dispatch) => {
+ dispatch<any>(toggleDetailsPanel());
+ },
+ },
+ {
+ icon: AdvancedIcon,
+ name: 'API Details',
+ execute: (dispatch, resource) => {
+ dispatch<any>(openAdvancedTabDialog(resource.uuid));
+ },
+ },
+ ],
+];
+
+export const readOnlyCollectionActionSet: ContextMenuActionSet = [
+ [
+ ...commonActionSet.reduce((prev, next) => prev.concat(next), []),
+ toggleFavoriteAction,
+ {
+ icon: FolderSharedIcon,
+ name: 'Open with 3rd party client',
+ execute: (dispatch, resource) => {
+ dispatch<any>(openWebDavS3InfoDialog(resource.uuid));
+ },
+ },
+ ],
+];