From 544adbbf0bc4108fe3ff02e3de09ccbd335ca176 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Jan 2021 15:26:52 +0300 Subject: [PATCH] Web: Files: rename download panel --- .../Client/src/components/pages/Home/index.js | 24 +++++------ .../components/panels/SharingPanel/index.js | 8 ++-- .../src/components/panels/StyledPanels.js | 8 ++-- .../{DownloadPanel => UploadPanel}/FileRow.js | 8 ++-- .../LoadingButton.js | 0 .../{DownloadPanel => UploadPanel}/index.js | 42 +++++++++---------- .../locales/en/translation.json | 0 .../locales/ru/translation.json | 0 .../Client/src/components/panels/index.js | 4 +- .../Client/src/store/files/actions.js | 8 ++-- .../Client/src/store/files/reducers.js | 8 ++-- .../Client/src/store/files/selectors.js | 4 +- 12 files changed, 56 insertions(+), 58 deletions(-) rename products/ASC.Files/Client/src/components/panels/{DownloadPanel => UploadPanel}/FileRow.js (96%) rename products/ASC.Files/Client/src/components/panels/{DownloadPanel => UploadPanel}/LoadingButton.js (100%) rename products/ASC.Files/Client/src/components/panels/{DownloadPanel => UploadPanel}/index.js (85%) rename products/ASC.Files/Client/src/components/panels/{DownloadPanel => UploadPanel}/locales/en/translation.json (100%) rename products/ASC.Files/Client/src/components/panels/{DownloadPanel => UploadPanel}/locales/ru/translation.json (100%) diff --git a/products/ASC.Files/Client/src/components/pages/Home/index.js b/products/ASC.Files/Client/src/components/pages/Home/index.js index 8561e15418..1bb1d2ad87 100644 --- a/products/ASC.Files/Client/src/components/pages/Home/index.js +++ b/products/ASC.Files/Client/src/components/pages/Home/index.js @@ -24,7 +24,7 @@ import { setFirstLoad, startUpload, setSelections, - setDownloadPanelVisible, + setUploadPanelVisible, } from "../../../store/files/actions"; import { getConvertDialogVisible, @@ -38,7 +38,7 @@ import { getIsLoading, getDragging, getSharePanelVisible, - getDownloadPanelVisible, + getUploadPanelVisible, getFirstLoad, isSecondaryProgressFinished, getSelectionLength, @@ -47,7 +47,7 @@ import { } from "../../../store/files/selectors"; import { ConvertDialog } from "../../dialogs"; -import { SharingPanel, DownloadPanel, ChangeOwnerPanel } from "../../panels"; +import { SharingPanel, UploadPanel, ChangeOwnerPanel } from "../../panels"; import { createI18N } from "../../../helpers/i18n"; import { getFilterByLocation } from "../../../helpers/converters"; const i18n = createI18N({ @@ -198,8 +198,8 @@ class PureHome extends React.Component { } }; - showDownloadPanel = () => { - this.props.setDownloadPanelVisible(!this.props.downloadPanelVisible); + showUploadPanel = () => { + this.props.setUploadPanelVisible(!this.props.uploadPanelVisible); }; componentDidUpdate(prevProps) { const { @@ -240,7 +240,7 @@ class PureHome extends React.Component { fileActionId, firstLoad, showOwnerChangePanel, - downloadPanelVisible, + uploadPanelVisible, } = this.props; return ( @@ -252,7 +252,7 @@ class PureHome extends React.Component { {showOwnerChangePanel && } {sharingPanelVisible && } - {downloadPanelVisible && } + {uploadPanelVisible && } @@ -350,7 +350,7 @@ function mapStateToProps(state) { selectionLength: getSelectionLength(state), selectionTitle: getSelectionTitle(state), showOwnerChangePanel: getShowOwnerChangePanel(state), - downloadPanelVisible: getDownloadPanelVisible(state), + uploadPanelVisible: getUploadPanelVisible(state), }; } @@ -363,8 +363,8 @@ const mapDispatchToProps = (dispatch) => { setFirstLoad: (firstLoad) => dispatch(setFirstLoad(firstLoad)), fetchFiles: (folderId, filter) => dispatch(fetchFiles(folderId, filter)), setSelections: (items) => dispatch(setSelections(items)), - setDownloadPanelVisible: (downloadPanelVisible) => - dispatch(setDownloadPanelVisible(downloadPanelVisible)), + setUploadPanelVisible: (uploadPanelVisible) => + dispatch(setUploadPanelVisible(uploadPanelVisible)), }; }; 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 baaa147f7e..cd1502ca2e 100644 --- a/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js +++ b/products/ASC.Files/Client/src/components/panels/SharingPanel/index.js @@ -32,7 +32,7 @@ import { getFiles, getFolders, getIsPrivacyFolder, - getDownloadPanelVisible, + getUploadPanelVisible, } from "../../../store/files/selectors"; import { StyledAsidePanel, @@ -416,7 +416,7 @@ class SharingPanelComponent extends React.Component { groupsCaption, canShareOwnerChange, isLoading, - downloadPanelVisible, + uploadPanelVisible, } = this.props; const { showActionPanel, @@ -449,7 +449,7 @@ class SharingPanelComponent extends React.Component {