Web:Files:Components: add new locale for sharing panel
This commit is contained in:
parent
1a59645ed0
commit
7ffdd090d7
@ -24,7 +24,7 @@ newInstance.use(Backend).init({
|
|||||||
loadPath: loadLanguagePath(config.homepage),
|
loadPath: loadLanguagePath(config.homepage),
|
||||||
},
|
},
|
||||||
|
|
||||||
ns: ["SharingPanel", "Common", "Translations", "Home"],
|
ns: ["SharingPanel", "Common", "Translations", "Home", "ChangeOwnerPanel"],
|
||||||
defaultNS: "SharingPanel",
|
defaultNS: "SharingPanel",
|
||||||
|
|
||||||
react: {
|
react: {
|
||||||
|
@ -499,7 +499,9 @@ class SharingPanelComponent extends React.Component {
|
|||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const visible = sharingPanelVisible;
|
const visible = sharingPanelVisible;
|
||||||
|
|
||||||
const zIndex = 310;
|
const zIndex = 310;
|
||||||
|
|
||||||
const onPlusClickProp = !isLoading ? { onClick: this.onPlusClick } : {};
|
const onPlusClickProp = !isLoading ? { onClick: this.onPlusClick } : {};
|
||||||
|
|
||||||
const isEncrypted =
|
const isEncrypted =
|
||||||
@ -508,6 +510,31 @@ class SharingPanelComponent extends React.Component {
|
|||||||
const internalLink =
|
const internalLink =
|
||||||
selection.length === 1 && !isEncrypted && this.getInternalLink();
|
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 (
|
return (
|
||||||
<StyledAsidePanel visible={visible}>
|
<StyledAsidePanel visible={visible}>
|
||||||
<Backdrop
|
<Backdrop
|
||||||
@ -538,10 +565,9 @@ class SharingPanelComponent extends React.Component {
|
|||||||
<StyledBodyContent>
|
<StyledBodyContent>
|
||||||
<Scrollbar ref={this.scrollRef} stype="mediumBlack">
|
<Scrollbar ref={this.scrollRef} stype="mediumBlack">
|
||||||
{!isLoading ? (
|
{!isLoading ? (
|
||||||
shareDataItems.map((item, index) => (
|
filteredShareDataItems.map((item, index) => (
|
||||||
<SharingRow
|
<SharingRow
|
||||||
t={t}
|
t={t}
|
||||||
theme={theme}
|
|
||||||
isPersonal={isPersonal}
|
isPersonal={isPersonal}
|
||||||
index={index}
|
index={index}
|
||||||
key={`${item.sharedTo.id}_${index}`}
|
key={`${item.sharedTo.id}_${index}`}
|
||||||
@ -650,6 +676,7 @@ const SharingPanel = inject(
|
|||||||
) => {
|
) => {
|
||||||
const { replaceFileStream, setEncryptionAccess } = auth;
|
const { replaceFileStream, setEncryptionAccess } = auth;
|
||||||
const { personal, customNames, isDesktopClient } = auth.settingsStore;
|
const { personal, customNames, isDesktopClient } = auth.settingsStore;
|
||||||
|
const { user } = auth.userStore;
|
||||||
|
|
||||||
const { id, access } = selectedFolderStore;
|
const { id, access } = selectedFolderStore;
|
||||||
|
|
||||||
@ -721,9 +748,13 @@ const SharingPanel = inject(
|
|||||||
}
|
}
|
||||||
)(
|
)(
|
||||||
observer(
|
observer(
|
||||||
withTranslation(["SharingPanel", "Common", "Translations", "Home"])(
|
withTranslation([
|
||||||
withLoader(SharingPanelComponent)(<Loaders.DialogAsideLoader isPanel />)
|
"SharingPanel",
|
||||||
)
|
"Common",
|
||||||
|
"Translations",
|
||||||
|
"Home",
|
||||||
|
"ChangeOwnerPanel",
|
||||||
|
])(withLoader(SharingPanelComponent)(<Loaders.DialogAsideLoader isPanel />))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -734,6 +765,7 @@ class Panel extends React.Component {
|
|||||||
"Common",
|
"Common",
|
||||||
"Translations",
|
"Translations",
|
||||||
"Home",
|
"Home",
|
||||||
|
"ChangeOwnerPanel",
|
||||||
]);
|
]);
|
||||||
const {
|
const {
|
||||||
FullAccess,
|
FullAccess,
|
||||||
|
Loading…
Reference in New Issue
Block a user