Web: Client: Files: Fixed share option for not edited items
This commit is contained in:
parent
5f16720aba
commit
7501e91ae3
@ -196,6 +196,8 @@ export default function withFileActions(WrappedFileItem) {
|
||||
checked,
|
||||
dragging,
|
||||
isFolder,
|
||||
personal,
|
||||
canWebEdit,
|
||||
} = this.props;
|
||||
const { fileExst, access, contentLength, id, shared } = item;
|
||||
|
||||
@ -218,7 +220,12 @@ export default function withFileActions(WrappedFileItem) {
|
||||
: "96px";
|
||||
|
||||
const sharedButton =
|
||||
!canShare || (isPrivacy && !fileExst) || isEdit || id <= 0 || isMobile
|
||||
!canShare ||
|
||||
(isPrivacy && !fileExst) ||
|
||||
(personal && !canWebEdit) ||
|
||||
isEdit ||
|
||||
id <= 0 ||
|
||||
isMobile
|
||||
? null
|
||||
: this.getSharedButton(shared);
|
||||
|
||||
@ -252,6 +259,7 @@ export default function withFileActions(WrappedFileItem) {
|
||||
return inject(
|
||||
(
|
||||
{
|
||||
auth,
|
||||
filesActionsStore,
|
||||
dialogsStore,
|
||||
treeFoldersStore,
|
||||
@ -351,6 +359,7 @@ export default function withFileActions(WrappedFileItem) {
|
||||
setMediaViewerData,
|
||||
getFolderInfo,
|
||||
markAsRead,
|
||||
personal: auth.settingsStore.personal,
|
||||
};
|
||||
}
|
||||
)(observer(WithFileActions));
|
||||
|
@ -324,6 +324,7 @@ class SectionHeaderContent extends React.Component {
|
||||
isFavoritesFolder,
|
||||
isRecentFolder,
|
||||
isShareFolder,
|
||||
personal,
|
||||
} = this.props;
|
||||
|
||||
let menu = [
|
||||
@ -443,6 +444,10 @@ class SectionHeaderContent extends React.Component {
|
||||
menu.splice(4, 1);
|
||||
}
|
||||
|
||||
if ((personal && !isWebEditSelected) || selectionCount > 1) {
|
||||
menu.splice(1, 1);
|
||||
}
|
||||
|
||||
return menu;
|
||||
};
|
||||
|
||||
|
@ -462,6 +462,10 @@ class FilesStore {
|
||||
"mark-read",
|
||||
"unsubscribe",
|
||||
]);
|
||||
|
||||
if (!this.isWebEditSelected) {
|
||||
fileOptions = this.removeOptions(fileOptions, ["sharing-settings"]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.isWebEditSelected) {
|
||||
@ -684,8 +688,10 @@ class FilesStore {
|
||||
|
||||
if (personal) {
|
||||
folderOptions = this.removeOptions(folderOptions, [
|
||||
"sharing-settings",
|
||||
"owner-change",
|
||||
"link-for-portal-users",
|
||||
"separator1",
|
||||
"docu-sign",
|
||||
"mark-read",
|
||||
"unsubscribe",
|
||||
|
Loading…
Reference in New Issue
Block a user