diff --git a/products/ASC.Files/Client/src/components/panels/SharingPanel/i18n.js b/products/ASC.Files/Client/src/components/panels/SharingPanel/i18n.js index c112d1db47..781c791d15 100644 --- a/products/ASC.Files/Client/src/components/panels/SharingPanel/i18n.js +++ b/products/ASC.Files/Client/src/components/panels/SharingPanel/i18n.js @@ -24,7 +24,7 @@ newInstance.use(Backend).init({ loadPath: loadLanguagePath(config.homepage), }, - ns: ["SharingPanel", "Common", "Translations", "Home"], + ns: ["SharingPanel", "Common", "Translations", "Home", "ChangeOwnerPanel"], defaultNS: "SharingPanel", react: { diff --git a/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js b/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js index 81ff113b54..a2669cabbb 100644 --- a/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js +++ b/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js @@ -499,7 +499,9 @@ class SharingPanelComponent extends React.Component { } = this.state; const visible = sharingPanelVisible; + const zIndex = 310; + const onPlusClickProp = !isLoading ? { onClick: this.onPlusClick } : {}; const isEncrypted = @@ -508,6 +510,31 @@ class SharingPanelComponent extends React.Component { const internalLink = selection.length === 1 && !isEncrypted && this.getInternalLink(); + const filteredShareDataItems = []; + const shareGroups = []; + const shareUsers = []; + + shareDataItems.forEach((item, index) => { + if (item?.sharedTo?.shareLink || item?.isOwner) { + return filteredShareDataItems.push(item); + } + + if (item?.sharedTo?.userName) { + shareUsers.push(item); + } else { + shareGroups.push(item); + } + }); + + if (shareGroups[shareGroups.length - 1]) { + shareGroups[shareGroups.length - 1].isEndOfBlock = true; + } + if (shareUsers[shareUsers.length - 1]) { + shareUsers[shareUsers.length - 1].isEndOfBlock = true; + } + + filteredShareDataItems.push(...shareGroups, ...shareUsers); + return ( {!isLoading ? ( - shareDataItems.map((item, index) => ( + filteredShareDataItems.map((item, index) => ( { const { replaceFileStream, setEncryptionAccess } = auth; const { personal, customNames, isDesktopClient } = auth.settingsStore; + const { user } = auth.userStore; const { id, access } = selectedFolderStore; @@ -721,9 +748,13 @@ const SharingPanel = inject( } )( observer( - withTranslation(["SharingPanel", "Common", "Translations", "Home"])( - withLoader(SharingPanelComponent)() - ) + withTranslation([ + "SharingPanel", + "Common", + "Translations", + "Home", + "ChangeOwnerPanel", + ])(withLoader(SharingPanelComponent)()) ) ); @@ -734,6 +765,7 @@ class Panel extends React.Component { "Common", "Translations", "Home", + "ChangeOwnerPanel", ]); const { FullAccess,