Merge branch 'feature/files' into feature/empty-screen
This commit is contained in:
commit
da23f36f09
@ -12,6 +12,7 @@ import {
|
||||
setExpandSettingsTree,
|
||||
setIsErrorSettings,
|
||||
getFilesSettings,
|
||||
setSelectedFolder,
|
||||
} from "../../../store/files/actions";
|
||||
|
||||
const i18n = createI18N({
|
||||
@ -55,6 +56,7 @@ const PureTreeSettings = ({
|
||||
setExpandSettingsTree,
|
||||
setIsErrorSettings,
|
||||
getFilesSettings,
|
||||
setSelectedFolder,
|
||||
t,
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
@ -83,11 +85,13 @@ const PureTreeSettings = ({
|
||||
|
||||
if (path === "settings") {
|
||||
setSelectedNode(["common"]);
|
||||
setSelectedFolder({ id: "common" });
|
||||
setExpandSettingsTree(section);
|
||||
return history.push("/products/files/settings/common");
|
||||
}
|
||||
|
||||
setSelectedNode(section);
|
||||
setSelectedFolder({ id: section[0] });
|
||||
return history.push(`/products/files/settings/${path}`);
|
||||
};
|
||||
|
||||
@ -190,4 +194,5 @@ export default connect(mapStateToProps, {
|
||||
setExpandSettingsTree,
|
||||
setIsErrorSettings,
|
||||
getFilesSettings,
|
||||
setSelectedFolder,
|
||||
})(withRouter(TreeSettings));
|
||||
|
@ -60,7 +60,7 @@ class ArticleBodyContent extends React.Component {
|
||||
fetchFiles,
|
||||
} = this.props;
|
||||
|
||||
if (selectedTreeNode[0] !== data[0]) {
|
||||
if (!selectedTreeNode || selectedTreeNode[0] !== data[0]) {
|
||||
setSelectedNode(data);
|
||||
setIsLoading(true);
|
||||
const newFilter = filter.clone();
|
||||
|
@ -116,6 +116,7 @@ const filesReducer = (state = initialState, action) => {
|
||||
case SET_SELECTED_FOLDER:
|
||||
return Object.assign({}, state, {
|
||||
selectedFolder: action.selectedFolder,
|
||||
selectedTreeNode: [action.selectedFolder.id.toString()],
|
||||
});
|
||||
case SET_TREE_FOLDERS:
|
||||
return Object.assign({}, state, {
|
||||
|
@ -818,19 +818,20 @@ export const getFilesList = createSelector(
|
||||
(items, selection, currentFolderType, viewer) => {
|
||||
return items.map((item) => {
|
||||
const {
|
||||
id,
|
||||
fileExst,
|
||||
title,
|
||||
parentId,
|
||||
contentLength,
|
||||
updated,
|
||||
createdBy,
|
||||
filesCount,
|
||||
foldersCount,
|
||||
fileStatus,
|
||||
versionGroup,
|
||||
locked,
|
||||
access,
|
||||
contentLength,
|
||||
createdBy,
|
||||
fileExst,
|
||||
filesCount,
|
||||
fileStatus,
|
||||
folderId,
|
||||
foldersCount,
|
||||
id,
|
||||
locked,
|
||||
parentId,
|
||||
title,
|
||||
updated,
|
||||
versionGroup,
|
||||
} = item;
|
||||
|
||||
const contextOptions = getFilesContextOptions(item, viewer).filter(
|
||||
@ -851,24 +852,25 @@ export const getFilesList = createSelector(
|
||||
value += draggable ? "_draggable" : "";
|
||||
|
||||
return {
|
||||
id,
|
||||
fileExst,
|
||||
title,
|
||||
parentId,
|
||||
contentLength,
|
||||
updated,
|
||||
createdBy,
|
||||
filesCount,
|
||||
foldersCount,
|
||||
fileStatus,
|
||||
versionGroup,
|
||||
locked,
|
||||
checked,
|
||||
contextOptions,
|
||||
value,
|
||||
isFolder,
|
||||
selectedItem,
|
||||
access,
|
||||
checked,
|
||||
contentLength,
|
||||
contextOptions,
|
||||
createdBy,
|
||||
fileExst,
|
||||
filesCount,
|
||||
fileStatus,
|
||||
folderId,
|
||||
foldersCount,
|
||||
id,
|
||||
isFolder,
|
||||
locked,
|
||||
parentId,
|
||||
selectedItem,
|
||||
title,
|
||||
updated,
|
||||
value,
|
||||
versionGroup,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ class Confirm extends React.PureComponent {
|
||||
clipEmailResource={`${t('Email')}: `}
|
||||
clipPasswordResource={`${t('InvitePassword')}: `}
|
||||
tooltipPasswordTitle={`${t('ErrorPasswordMessage')}:`}
|
||||
tooltipPasswordLength={`${t('ErrorPasswordLength', { fromNumber: 6, toNumber: 30 })}:`}
|
||||
tooltipPasswordLength={`${t('ErrorPasswordLength', { fromNumber: settings.minLength, toNumber: 30 })}:`}
|
||||
tooltipPasswordDigits={t('ErrorPasswordNoDigits')}
|
||||
tooltipPasswordCapital={t('ErrorPasswordNoUpperCase')}
|
||||
tooltipPasswordSpecial={`${t('ErrorPasswordNoSpecialSymbols')} (!@#$%^&*)`}
|
||||
|
@ -161,7 +161,7 @@ class Form extends React.PureComponent {
|
||||
passwordSettings={settings}
|
||||
tooltipPasswordTitle="Password must contain:"
|
||||
tooltipPasswordLength={`${t("ErrorPasswordLength", {
|
||||
fromNumber: 6,
|
||||
fromNumber: settings.minLength,
|
||||
toNumber: 30
|
||||
})}:`}
|
||||
placeholder={t("PasswordCustomMode")}
|
||||
|
@ -293,7 +293,7 @@ class Confirm extends React.PureComponent {
|
||||
clipEmailResource={`${t('Email')}: `}
|
||||
clipPasswordResource={`${t('InvitePassword')}: `}
|
||||
tooltipPasswordTitle={`${t('ErrorPasswordMessage')}:`}
|
||||
tooltipPasswordLength={`${t('ErrorPasswordLength', { fromNumber: 6, toNumber: 30 })}:`}
|
||||
tooltipPasswordLength={`${t('ErrorPasswordLength', { fromNumber: settings.minLength, toNumber: 30 })}:`}
|
||||
tooltipPasswordDigits={t('ErrorPasswordNoDigits')}
|
||||
tooltipPasswordCapital={t('ErrorPasswordNoUpperCase')}
|
||||
tooltipPasswordSpecial={`${t('ErrorPasswordNoSpecialSymbols')} (!@#$%^&*)`}
|
||||
|
Loading…
Reference in New Issue
Block a user