|
@@ -24,7 +24,7 @@ import ExpandOrContractButton from './ExpandOrContractButton';
|
|
|
|
|
|
|
|
const PageAccessoriesModal = (props) => {
|
|
const PageAccessoriesModal = (props) => {
|
|
|
const {
|
|
const {
|
|
|
- t, pageAccessoriesContainer, onClose, isGuestUser, isSharedUser,
|
|
|
|
|
|
|
+ t, pageAccessoriesContainer, onClose, isGuestUser, isSharedUser, isPageExist,
|
|
|
} = props;
|
|
} = props;
|
|
|
const { switchActiveTab } = pageAccessoriesContainer;
|
|
const { switchActiveTab } = pageAccessoriesContainer;
|
|
|
const { activeTab, activeComponents } = pageAccessoriesContainer.state;
|
|
const { activeTab, activeComponents } = pageAccessoriesContainer.state;
|
|
@@ -48,18 +48,19 @@ const PageAccessoriesModal = (props) => {
|
|
|
Icon: HistoryIcon,
|
|
Icon: HistoryIcon,
|
|
|
i18n: t('History'),
|
|
i18n: t('History'),
|
|
|
index: 2,
|
|
index: 2,
|
|
|
- isLinkEnabled: v => !isGuestUser && !isSharedUser,
|
|
|
|
|
|
|
+ isLinkEnabled: v => !isGuestUser && !isSharedUser && isPageExist,
|
|
|
},
|
|
},
|
|
|
attachment: {
|
|
attachment: {
|
|
|
Icon: AttachmentIcon,
|
|
Icon: AttachmentIcon,
|
|
|
i18n: t('attachment_data'),
|
|
i18n: t('attachment_data'),
|
|
|
index: 3,
|
|
index: 3,
|
|
|
|
|
+ isLinkEnabled: v => isPageExist,
|
|
|
},
|
|
},
|
|
|
shareLink: {
|
|
shareLink: {
|
|
|
Icon: ShareLinkIcon,
|
|
Icon: ShareLinkIcon,
|
|
|
i18n: t('share_links.share_link_management'),
|
|
i18n: t('share_links.share_link_management'),
|
|
|
index: 4,
|
|
index: 4,
|
|
|
- isLinkEnabled: v => !isGuestUser && !isSharedUser,
|
|
|
|
|
|
|
+ isLinkEnabled: v => !isGuestUser && !isSharedUser && isPageExist,
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
}, [t, isGuestUser, isSharedUser]);
|
|
}, [t, isGuestUser, isSharedUser]);
|
|
@@ -149,6 +150,7 @@ PageAccessoriesModal.propTypes = {
|
|
|
pageAccessoriesContainer: PropTypes.instanceOf(PageAccessoriesContainer).isRequired,
|
|
pageAccessoriesContainer: PropTypes.instanceOf(PageAccessoriesContainer).isRequired,
|
|
|
isGuestUser: PropTypes.bool.isRequired,
|
|
isGuestUser: PropTypes.bool.isRequired,
|
|
|
isSharedUser: PropTypes.bool.isRequired,
|
|
isSharedUser: PropTypes.bool.isRequired,
|
|
|
|
|
+ isPageExist: PropTypes.bool.isRequired,
|
|
|
isOpen: PropTypes.bool.isRequired,
|
|
isOpen: PropTypes.bool.isRequired,
|
|
|
onClose: PropTypes.func,
|
|
onClose: PropTypes.func,
|
|
|
};
|
|
};
|