From e2c435d3a6a5d48a9ad9b027e384d7be5949692c Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Tue, 19 Oct 2021 13:43:34 +0300 Subject: [PATCH] Web: Files: Fixed styles for version history panel. --- .../pages/VersionHistory/Section/Body/StyledVersionRow.js | 1 + .../src/pages/VersionHistory/Section/Body/VersionRow.js | 7 ++++--- .../Client/src/pages/VersionHistory/Section/Body/index.js | 4 +++- .../ASC.Files/Client/src/pages/VersionHistory/index.js | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionRow.js b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionRow.js index 8a39b98f720..3a5e7119a17 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionRow.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionRow.js @@ -12,6 +12,7 @@ const StyledVersionRow = styled(Row)` .row_content { position: relative; padding-top: 14px; + ${(props) => !props.isTabletView && "padding-right:16px"} } .version_badge { diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/VersionRow.js b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/VersionRow.js index 05881e6cc4f..ea8066a06f2 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/VersionRow.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/VersionRow.js @@ -33,6 +33,7 @@ const VersionRow = (props) => { updateCommentVersion, onSetRestoreProcess, isRestoreProcess, + isTabletView, } = props; const [showEditPanel, setShowEditPanel] = useState(false); const [commentValue, setCommentValue] = useState(info.comment); @@ -67,7 +68,6 @@ const VersionRow = (props) => { const onOpenFile = () => window.open(info.webUrl); const onRestoreClick = () => { - onSetRestoreProcess(true); restoreVersion(info.id, info.version) .catch((err) => toastr.error(err)) @@ -104,6 +104,7 @@ const VersionRow = (props) => { canEdit={canEdit} isRestoreProcess={isRestoreProcess} isVersion={isVersion} + isTabletView={isTabletView} > <> @@ -249,7 +250,7 @@ const VersionRow = (props) => { export default inject(({ auth, versionHistoryStore }) => { const { user } = auth.userStore; - const { culture } = auth.settingsStore; + const { culture, isTabletView } = auth.settingsStore; const language = (user && user.cultureName) || culture || "en-US"; const { @@ -260,7 +261,7 @@ export default inject(({ auth, versionHistoryStore }) => { return { culture: language, - + isTabletView, markAsVersion, restoreVersion, updateCommentVersion, diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js index fdff2f5535f..dd8803c26ea 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js @@ -68,7 +68,9 @@ class SectionBodyContent extends React.Component { ) : ( - +
+ +
); } } diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/index.js b/products/ASC.Files/Client/src/pages/VersionHistory/index.js index 9a27c830cf8..331b3a85ba1 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/index.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/index.js @@ -51,6 +51,7 @@ class PureVersionHistory extends React.Component { secondaryProgressBarIcon="file" showSecondaryButtonAlert={false} withBodyScroll={false} + isLoadingContent={isLoading} >