From 035d4605eaa92a5a07bfdfd9353e60db398e8b00 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 13:21:47 +0300 Subject: [PATCH 1/9] Web: Files: fix version history panel style --- .../src/components/panels/StyledPanels.js | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/StyledPanels.js b/products/ASC.Files/Client/src/components/panels/StyledPanels.js index 1964a85a3b..904142eddb 100644 --- a/products/ASC.Files/Client/src/components/panels/StyledPanels.js +++ b/products/ASC.Files/Client/src/components/panels/StyledPanels.js @@ -117,14 +117,34 @@ StyledAsidePanel.defaultProps = { theme: Base }; const StyledVersionHistoryPanel = styled.div` ${PanelStyles} + .version-history-modal-dialog { - transform: translateX(${(props) => (props.visible ? "0" : "720px")}); - width: 500px; + transition: unset; + transform: translateX(${(props) => (props.visible ? "0" : "480px")}); + width: 480px; + max-width: 480px; + overflow-y: hidden; } + .version-history-aside-panel { - transform: translateX(${(props) => (props.visible ? "0" : "720px")}); - width: 500px; + transition: unset; + transform: translateX(${(props) => (props.visible ? "0" : "480px")}); + width: 480px; + max-width: 480px; + overflow-y: hidden; + + @media (max-width: 500px) { + position: fixed; + + top: 64px; + bottom: 0; + right: 0; + + width: 100%; + height: calc(100% - 64px); + } } + .version-history-panel-header { height: 53px; margin-left: 0px; @@ -134,6 +154,7 @@ const StyledVersionHistoryPanel = styled.div` margin-top: 12px; } } + .version-history-panel-body { padding-top: ${(props) => (props.isLoading ? "16px" : null)}; padding-bottom: ${(props) => (props.isLoading ? "0px" : null)}; @@ -146,6 +167,7 @@ const StyledVersionHistoryPanel = styled.div` .version-comment-wrapper { margin-left: 79px; } + .version_edit-comment { padding-left: 2px; } From 09f840d375612e8cc8b2e03a1967b59e673036b1 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 13:23:55 +0300 Subject: [PATCH 2/9] Web: Files: disable version history url --- products/ASC.Files/Client/src/Files.jsx | 2 +- products/ASC.Files/Client/src/HOCs/withBadges.js | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/products/ASC.Files/Client/src/Files.jsx b/products/ASC.Files/Client/src/Files.jsx index a5e3c80ce0..0612756bb3 100644 --- a/products/ASC.Files/Client/src/Files.jsx +++ b/products/ASC.Files/Client/src/Files.jsx @@ -87,7 +87,7 @@ const FilesSection = React.memo(() => { return ( - + {/**/} diff --git a/products/ASC.Files/Client/src/HOCs/withBadges.js b/products/ASC.Files/Client/src/HOCs/withBadges.js index e64874efa2..ca3d16e7a9 100644 --- a/products/ASC.Files/Client/src/HOCs/withBadges.js +++ b/products/ASC.Files/Client/src/HOCs/withBadges.js @@ -23,15 +23,8 @@ export default function withBadges(WrappedComponent) { isTrashFolder, } = this.props; if (isTrashFolder) return; - - if (!isTabletView) { - fetchFileVersions(item.id + ""); - setIsVerHistoryPanel(true); - } else { - history.push( - combineUrl(AppServerConfig.proxyURL, homepage, `/${item.id}/history`) - ); - } + fetchFileVersions(item.id + ""); + setIsVerHistoryPanel(true); }; onBadgeClick = () => { From afe9d12dbc72f390d9b7df5412f3dbd6ede4d92d Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Wed, 4 May 2022 13:26:12 +0300 Subject: [PATCH 3/9] Web: Files: added id to MainButton --- .../context-menu/sub-components/sub-menu.js | 1 + .../Client/src/components/Article/MainButton/index.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/packages/asc-web-components/context-menu/sub-components/sub-menu.js b/packages/asc-web-components/context-menu/sub-components/sub-menu.js index 5ff76695c5..9e4d38b79d 100644 --- a/packages/asc-web-components/context-menu/sub-components/sub-menu.js +++ b/packages/asc-web-components/context-menu/sub-components/sub-menu.js @@ -176,6 +176,7 @@ const SubMenu = (props) => { return (
  • { const folderUpload = !isMobile ? [ { + id: "main-button_upload-folders", className: "main-button_drop-down", icon: "images/actions.upload.react.svg", label: t("UploadFolder"), @@ -184,6 +185,7 @@ const ArticleMainButtonContent = (props) => { const actions = [ { + id: "main-button_new-document", className: "main-button_drop-down", icon: "images/actions.documents.react.svg", label: t("NewDocument"), @@ -192,6 +194,7 @@ const ArticleMainButtonContent = (props) => { key: "docx", }, { + id: "main-button_new-spreadsheet", className: "main-button_drop-down", icon: "images/spreadsheet.react.svg", label: t("NewSpreadsheet"), @@ -200,6 +203,7 @@ const ArticleMainButtonContent = (props) => { key: "xlsx", }, { + id: "main-button_new-presentation", className: "main-button_drop-down", icon: "images/actions.presentation.react.svg", label: t("NewPresentation"), @@ -209,6 +213,7 @@ const ArticleMainButtonContent = (props) => { }, ...formActions, { + id: "main-button_new-folder", className: "main-button_drop-down", icon: "images/catalog.folder.react.svg", label: t("NewFolder"), @@ -219,6 +224,7 @@ const ArticleMainButtonContent = (props) => { const uploadActions = [ { + id: "main-button_upload-files", className: "main-button_drop-down", icon: "images/actions.upload.react.svg", label: t("UploadFiles"), @@ -272,6 +278,7 @@ const ArticleMainButtonContent = (props) => { ) : ( Date: Wed, 4 May 2022 13:34:07 +0300 Subject: [PATCH 4/9] Web: People: fixed InviteAgainLbl translation --- .../ASC.People/Client/src/pages/Profile/Section/Header/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.People/Client/src/pages/Profile/Section/Header/index.js b/products/ASC.People/Client/src/pages/Profile/Section/Header/index.js index 3e64e0a70b..03f68e4aec 100644 --- a/products/ASC.People/Client/src/pages/Profile/Section/Header/index.js +++ b/products/ASC.People/Client/src/pages/Profile/Section/Header/index.js @@ -395,7 +395,7 @@ class SectionHeaderContent extends React.PureComponent { { key: "invite-again", className: "header-context-menu_invite-again", - label: t("InviteAgainLbl"), + label: t("Profile:InviteAgainLbl"), onClick: this.onInviteAgainClick, }, !isMe && From 9a744adb8281ca7ea6101e1bf50a720a9f7c28a9 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 14:03:36 +0300 Subject: [PATCH 5/9] Web: Files: VersionHistory: fix margin --- .../pages/VersionHistory/Section/Body/StyledVersionHistory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionHistory.js b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionHistory.js index ad63164a2e..79a420b0b2 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionHistory.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/StyledVersionHistory.js @@ -214,7 +214,7 @@ const StyledVersionRow = styled(Row)` @media ${tablet} { display: inline-block; - margin-left: 1px; + margin-left: -7px; margin-top: 5px; } } From 0304671347388710663edacf5349fe9bdac4eb2e Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 14:16:19 +0300 Subject: [PATCH 6/9] Web: Common: AdvancedSelector: fix undefined error --- .../components/AdvancedSelector/sub-components/Selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/asc-web-common/components/AdvancedSelector/sub-components/Selector.js b/packages/asc-web-common/components/AdvancedSelector/sub-components/Selector.js index 1a778cbaf2..160530b98f 100644 --- a/packages/asc-web-common/components/AdvancedSelector/sub-components/Selector.js +++ b/packages/asc-web-common/components/AdvancedSelector/sub-components/Selector.js @@ -114,7 +114,7 @@ const Selector = (props) => { if (groups.length === 1) return setGroupHeader(newGroupList[0]); selectedOptions.forEach((option) => { - option.groups.forEach((group) => { + option?.groups?.forEach((group) => { const groupIndex = newGroupList.findIndex( (newGroup) => group === newGroup.id ); From d360137acf7fec06891afa4b0dc109d939a38371 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 14:26:54 +0300 Subject: [PATCH 7/9] Web: Components: Row: delete useless --- packages/asc-web-components/row/styled-row.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/asc-web-components/row/styled-row.js b/packages/asc-web-components/row/styled-row.js index 22eef2621b..02c9eb3db6 100644 --- a/packages/asc-web-components/row/styled-row.js +++ b/packages/asc-web-components/row/styled-row.js @@ -51,14 +51,6 @@ StyledContent.defaultProps = { theme: Base }; const StyledCheckbox = styled.div` flex: 0 0 16px; - - .checkbox { - padding: 7px 0; - - @media ${tablet} { - padding: 10px 0; - } - } `; const StyledElement = styled.div` From 3955ed1da6e378d72a1f1e3900c9df63b644798f Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Wed, 4 May 2022 14:42:27 +0300 Subject: [PATCH 8/9] Web: Components: fixed Navigation z-index --- .../components/Navigation/sub-components/control-btn.js | 2 ++ packages/asc-web-components/context-menu-button/index.js | 2 ++ packages/asc-web-components/drop-down/styled-drop-down.js | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/asc-web-common/components/Navigation/sub-components/control-btn.js b/packages/asc-web-common/components/Navigation/sub-components/control-btn.js index 12ec6a99a4..64260cca03 100644 --- a/packages/asc-web-common/components/Navigation/sub-components/control-btn.js +++ b/packages/asc-web-common/components/Navigation/sub-components/control-btn.js @@ -105,6 +105,7 @@ const ControlButtons = ({ <> {!isMobile && ( {!isMobile && ( {this.state.data.map( (item, index) => diff --git a/packages/asc-web-components/drop-down/styled-drop-down.js b/packages/asc-web-components/drop-down/styled-drop-down.js index 886e60a652..10d20d470d 100644 --- a/packages/asc-web-components/drop-down/styled-drop-down.js +++ b/packages/asc-web-components/drop-down/styled-drop-down.js @@ -35,7 +35,8 @@ const StyledDropdown = styled.div` css` left: ${(props) => (props.manualX ? props.manualX : "0px")}; `} - z-index: ${(props) => props.theme.dropDown.zIndex}; + z-index: ${(props) => + props.zIndex ? props.zIndex : props.theme.dropDown.zIndex}; display: ${(props) => props.open ? (props.columnCount ? "block" : "table") : "none"}; background: ${(props) => props.theme.dropDown.background}; From 7078bc3d3ae2dc3da223a5f21bf90deff885337e Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 4 May 2022 14:52:52 +0300 Subject: [PATCH 9/9] Web: Files: Settings: delete tab, fix title for personal --- .../src/pages/Settings/Section/Body/index.js | 4 +- .../Client/src/pages/Settings/index.js | 44 +++++++++++-------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Settings/Section/Body/index.js b/products/ASC.Files/Client/src/pages/Settings/Section/Body/index.js index bc6a8836b8..ba502239db 100644 --- a/products/ASC.Files/Client/src/pages/Settings/Section/Body/index.js +++ b/products/ASC.Files/Client/src/pages/Settings/Section/Body/index.js @@ -94,7 +94,7 @@ const SectionBodyContent = ({ ) : isErrorSettings ? ( - ) : ( + ) : !isPersonal ? (
    + ) : ( +
    {elements[0].content}
    ); }; diff --git a/products/ASC.Files/Client/src/pages/Settings/index.js b/products/ASC.Files/Client/src/pages/Settings/index.js index 6294af8541..32e1a26be8 100644 --- a/products/ASC.Files/Client/src/pages/Settings/index.js +++ b/products/ASC.Files/Client/src/pages/Settings/index.js @@ -19,6 +19,7 @@ const PureSettings = ({ setFirstLoad, capabilities, tReady, + isPersonal, }) => { const [title, setTitle] = useState(""); const { setting } = match.params; @@ -28,7 +29,9 @@ const PureSettings = ({ }, [setFirstLoad]); useEffect(() => { - setTitle(t("Common:Settings")); + isPersonal + ? setTitle(t("ThirdPartySettings")) + : setTitle(t("Common:Settings")); }, [t, tReady]); useEffect(() => { @@ -80,22 +83,25 @@ const PureSettings = ({ const Settings = withTranslation(["Settings", "Common"])(PureSettings); -export default inject(({ filesStore, settingsStore, treeFoldersStore }) => { - const { setFirstLoad, isLoading } = filesStore; - const { setSelectedNode } = treeFoldersStore; - const { - getFilesSettings, - isLoadedSettingsTree, - thirdPartyStore, - } = settingsStore; - const { capabilities } = thirdPartyStore; +export default inject( + ({ auth, filesStore, settingsStore, treeFoldersStore }) => { + const { setFirstLoad, isLoading } = filesStore; + const { setSelectedNode } = treeFoldersStore; + const { + getFilesSettings, + isLoadedSettingsTree, + thirdPartyStore, + } = settingsStore; + const { capabilities } = thirdPartyStore; - return { - isLoading, - isLoadedSettingsTree, - setFirstLoad, - setSelectedNode, - getFilesSettings, - capabilities, - }; -})(withRouter(observer(Settings))); + return { + isLoading, + isLoadedSettingsTree, + setFirstLoad, + setSelectedNode, + getFilesSettings, + capabilities, + isPersonal: auth.settingsStore.personal, + }; + } +)(withRouter(observer(Settings)));