Web: Files: added icons to context menu actions

This commit is contained in:
Nikita Gopienko 2020-08-13 09:59:05 +03:00
parent f0d2d42e97
commit ef15a36cf8

View File

@ -358,6 +358,7 @@ class SectionBodyContent extends React.Component {
{ {
key: "show-version-history", key: "show-version-history",
label: t("ShowVersionHistory"), label: t("ShowVersionHistory"),
icon: 'HistoryIcon',
onClick: this.showVersionHistory, onClick: this.showVersionHistory,
disabled: false, disabled: false,
"data-id": item.id "data-id": item.id
@ -365,6 +366,7 @@ class SectionBodyContent extends React.Component {
{ {
key: "finalize-version", key: "finalize-version",
label: t("FinalizeVersion"), label: t("FinalizeVersion"),
icon: 'HistoryFinalizedIcon',
onClick: this.finalizeVersion, onClick: this.finalizeVersion,
disabled: false, disabled: false,
"data-id": item.id, "data-id": item.id,
@ -373,6 +375,7 @@ class SectionBodyContent extends React.Component {
{ {
key: "block-unblock-version", key: "block-unblock-version",
label: t("UnblockVersion"), label: t("UnblockVersion"),
icon: 'LockIcon',
onClick: () => console.log(t("UnblockVersion")), onClick: () => console.log(t("UnblockVersion")),
disabled: false disabled: false
}, },
@ -387,6 +390,7 @@ class SectionBodyContent extends React.Component {
{ {
key: "sharing-settings", key: "sharing-settings",
label: t("SharingSettings"), label: t("SharingSettings"),
icon: 'CatalogSharedIcon',
onClick: this.onClickShare, onClick: this.onClickShare,
disabled: isSharable disabled: isSharable
}, },
@ -394,12 +398,14 @@ class SectionBodyContent extends React.Component {
? { ? {
key: "send-by-email", key: "send-by-email",
label: t("SendByEmail"), label: t("SendByEmail"),
icon: 'MailIcon',
disabled: true disabled: true
} }
: null, : null,
{ {
key: "link-for-portal-users", key: "link-for-portal-users",
label: t("LinkForPortalUsers"), label: t("LinkForPortalUsers"),
icon: 'InvitationLinkIcon',
onClick: this.onClickLinkForPortal, onClick: this.onClickLinkForPortal,
disabled: false disabled: false
}, },
@ -412,6 +418,7 @@ class SectionBodyContent extends React.Component {
? { ? {
key: "edit", key: "edit",
label: t("Edit"), label: t("Edit"),
icon: 'AccessEditIcon',
onClick: this.onClickLinkEdit, onClick: this.onClickLinkEdit,
disabled: false, disabled: false,
'data-id': item.id 'data-id': item.id
@ -421,6 +428,7 @@ class SectionBodyContent extends React.Component {
? { ? {
key: "preview", key: "preview",
label: t("Preview"), label: t("Preview"),
icon: 'EyeIcon',
onClick: this.onClickLinkEdit, onClick: this.onClickLinkEdit,
disabled: true, disabled: true,
'data-id': item.id 'data-id': item.id
@ -430,6 +438,7 @@ class SectionBodyContent extends React.Component {
? { ? {
key: "view", key: "view",
label: t("View"), label: t("View"),
icon: 'EyeIcon',
onClick: this.onMediaFileClick, onClick: this.onMediaFileClick,
disabled: false disabled: false
} }
@ -438,6 +447,7 @@ class SectionBodyContent extends React.Component {
? { ? {
key: "download", key: "download",
label: t("Download"), label: t("Download"),
icon: 'DownloadIcon',
onClick: this.onClickDownload, onClick: this.onClickDownload,
disabled: false disabled: false
} }
@ -445,30 +455,35 @@ class SectionBodyContent extends React.Component {
{ {
key: "move", key: "move",
label: t("MoveTo"), label: t("MoveTo"),
icon: 'DownloadAsIcon',
onClick: this.onMoveAction, onClick: this.onMoveAction,
disabled: false disabled: false
}, },
{ {
key: "copy", key: "copy",
label: t("Copy"), label: t("Copy"),
icon: 'CopyIcon',
onClick: this.onCopyAction, onClick: this.onCopyAction,
disabled: false disabled: false
}, },
isFile && { isFile && {
key: "duplicate", key: "duplicate",
label: t("Duplicate"), label: t("Duplicate"),
icon: 'CopyIcon',
onClick: this.onDuplicate, onClick: this.onDuplicate,
disabled: false disabled: false
}, },
{ {
key: "rename", key: "rename",
label: t("Rename"), label: t("Rename"),
icon: 'RenameIcon',
onClick: this.onClickRename, onClick: this.onClickRename,
disabled: false disabled: false
}, },
{ {
key: "delete", key: "delete",
label: t("Delete"), label: t("Delete"),
icon: 'CatalogTrashIcon',
onClick: this.onClickDelete, onClick: this.onClickDelete,
disabled: false disabled: false
}, },