From aafc615ade1ebc190ba48bbb97e9ec3a4eff6c80 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Sat, 16 Oct 2021 15:25:14 +0300 Subject: [PATCH 01/39] Web: Files: fix tile select on mobile --- .../Body/TilesView/sub-components/Tile.js | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index c796e91cd5..e4444a51f3 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -6,6 +6,7 @@ import { ReactSVG } from "react-svg"; import styled, { css } from "styled-components"; import ContextMenu from "@appserver/components/context-menu"; import { tablet } from "@appserver/components/utils/device"; +import { isDesktop } from "react-device-detect"; import Link from "@appserver/components/link"; @@ -116,7 +117,7 @@ const StyledTile = styled.div` margin-top: 3px; @media ${tablet} { - display: flex; + //display: flex; margin-top: 2px; } } @@ -136,10 +137,6 @@ const StyledTile = styled.div` height: 32px; width: 32px; } - - @media ${tablet} { - display: none; - } } .file-icon_container { @@ -147,12 +144,14 @@ const StyledTile = styled.div` @media ${tablet} { min-width: 28px; + margin-right: ${(props) => (props.isFolder ? "10px" : "12px")}; } } :hover { ${(props) => !props.dragging && + props.isDesktop && css` .checkbox { opacity: 1; @@ -292,6 +291,13 @@ class Tile extends React.PureComponent { onSelect && onSelect(e.target.checked, item); }; + onFileIconClick = () => { + if (isDesktop) return; + + const { onSelect, item } = this.props; + onSelect && onSelect(true, item); + }; + render() { const { checked, @@ -348,12 +354,18 @@ class Tile extends React.PureComponent { isRecycleBin={isRecycleBin} checked={checked} isActive={isActive} + isDesktop={isDesktop} > {isFolder || (!fileExst && id === -1) ? ( <> {renderElement && !(!fileExst && id === -1) && !isEdit && (
- {element} + + {element} + {id !== -1 && !isEdit && (
-
{element}
+
+ {element} +
Date: Sat, 16 Oct 2021 15:32:45 +0300 Subject: [PATCH 02/39] Web: Files: fix height selected tile --- .../Section/Body/TilesView/sub-components/Tile.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index e4444a51f3..77df1de75f 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -172,8 +172,10 @@ const StyledFileTileTop = styled.div` align-items: baseline; background-color: #f8f9f9; padding: 13px; - height: 157px; + height: ${(props) => (props.checked || props.isActive ? "156px" : "157px")}; position: relative; + border-bottom: ${(props) => + (props.checked || props.isActive) && "1px solid #D0D5DA"}; .thumbnail-image, .temporary-icon > .injected-svg { @@ -194,8 +196,6 @@ const StyledFileTileBottom = styled.div` padding-right: 0; min-height: 56px; box-sizing: border-box; - border-top: ${(props) => - (props.checked || props.isActive) && "1px solid #D0D5DA"}; `; const StyledContent = styled.div` @@ -398,8 +398,10 @@ class Tile extends React.PureComponent { ) : ( <> - {icon} - + + {icon} + + {id !== -1 && !isEdit && (
From 351939b56eb34f8b8b7ea552dc53b66f1539070a Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Sat, 16 Oct 2021 15:39:32 +0300 Subject: [PATCH 03/39] Fix bug 53150: folder duplicate by Enter --- products/ASC.Files/Client/src/HOCs/withContent.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/products/ASC.Files/Client/src/HOCs/withContent.js b/products/ASC.Files/Client/src/HOCs/withContent.js index 260d996461..2729329c3e 100644 --- a/products/ASC.Files/Client/src/HOCs/withContent.js +++ b/products/ASC.Files/Client/src/HOCs/withContent.js @@ -121,6 +121,7 @@ export default function withContent(WrappedContent) { createFile, item, setIsLoading, + isLoading, openDocEditor, isPrivacy, isDesktop, @@ -131,6 +132,8 @@ export default function withContent(WrappedContent) { } = this.props; const { itemTitle } = this.state; + if (isLoading) return; + setIsLoading(true); const itemId = e.currentTarget.dataset.itemid; @@ -315,6 +318,7 @@ export default function withContent(WrappedContent) { const { editCompleteAction } = filesActionsStore; const { setIsLoading, + isLoading, openDocEditor, updateFile, renameFolder, @@ -338,6 +342,7 @@ export default function withContent(WrappedContent) { return { setIsLoading, + isLoading, isTrashFolder: isRecycleBinFolder, openDocEditor, updateFile, From 49f9798907a6b6f6f5224dc9c9fcb7270888e3f9 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Mon, 18 Oct 2021 17:41:50 +0300 Subject: [PATCH 04/39] Web: Files: align checkbox on tile --- .../pages/Home/Section/Body/TilesView/sub-components/Tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index 77df1de75f..de04c354d7 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -115,9 +115,9 @@ const StyledTile = styled.div` flex: 0 0 16px; margin-right: ${(props) => (props.isFolder ? "8px" : "4px")}; margin-top: 3px; + justify-content: center; @media ${tablet} { - //display: flex; margin-top: 2px; } } From 691cbf1d06f5ba166b4256a5a8b0b8e334984372 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 12:08:53 +0300 Subject: [PATCH 05/39] Web: Files: fix checkbox and icon align --- .../Home/Section/Body/TilesView/sub-components/Tile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index de04c354d7..4f647a013c 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -101,9 +101,11 @@ const StyledTile = styled.div` } .checkbox { + display: flex; opacity: ${(props) => (props.checked ? 1 : 0)}; flex: 0 0 16px; margin-right: 4px; + justify-content: center; @media ${tablet} { opacity: 1; @@ -144,10 +146,13 @@ const StyledTile = styled.div` @media ${tablet} { min-width: 28px; - margin-right: ${(props) => (props.isFolder ? "10px" : "12px")}; } } + .styled-content { + padding-left: ${(props) => (props.isFolder ? "10px" : "12px")}; + } + :hover { ${(props) => !props.dragging && @@ -375,6 +380,7 @@ class Tile extends React.PureComponent {
)} {children} From 4e6593c08095fe05ebc48450bbfa5ac67b54a6e2 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 15:22:52 +0300 Subject: [PATCH 06/39] Web: Files: fix storage download --- products/ASC.Files/Client/src/store/UploadDataStore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/store/UploadDataStore.js b/products/ASC.Files/Client/src/store/UploadDataStore.js index d0edd095ce..9411f50bb5 100644 --- a/products/ASC.Files/Client/src/store/UploadDataStore.js +++ b/products/ASC.Files/Client/src/store/UploadDataStore.js @@ -875,12 +875,14 @@ class UploadDataStore { } let operationItem = null; + let url; - while (progress !== 100) { + while (progress !== 100 && url) { await this.getOperationProgress(data.id) .then((item) => { operationItem = item; progress = item ? item.progress : 100; + url = item.url; setSecondaryProgressBarData({ icon: pbData.icon, From 3ea9f1ff20cedda538cd3e440bb6de3d21429255 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 15:42:03 +0300 Subject: [PATCH 07/39] Web: Files: delete useless --- .../pages/Home/Section/Body/TilesView/sub-components/Tile.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index 4f647a013c..49230bdea2 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -143,10 +143,6 @@ const StyledTile = styled.div` .file-icon_container { min-width: 36px; - - @media ${tablet} { - min-width: 28px; - } } .styled-content { From 1c7d4a9714d07f8747d6a01aa29b0e129df222f8 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 17:55:05 +0300 Subject: [PATCH 08/39] Web: Files: fix condition --- products/ASC.Files/Client/src/store/UploadDataStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/store/UploadDataStore.js b/products/ASC.Files/Client/src/store/UploadDataStore.js index 9411f50bb5..15897c6eba 100644 --- a/products/ASC.Files/Client/src/store/UploadDataStore.js +++ b/products/ASC.Files/Client/src/store/UploadDataStore.js @@ -877,7 +877,7 @@ class UploadDataStore { let operationItem = null; let url; - while (progress !== 100 && url) { + while (progress !== 100 && !url) { await this.getOperationProgress(data.id) .then((item) => { operationItem = item; From 8ad7ebaba6f4c8f2390cdbb2e22535808b05d3ed Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 18:12:48 +0300 Subject: [PATCH 09/39] Web: Files: fix padding --- .../pages/Home/Section/Body/TilesView/sub-components/Tile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index 49230bdea2..fff2d442fd 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -146,7 +146,7 @@ const StyledTile = styled.div` } .styled-content { - padding-left: ${(props) => (props.isFolder ? "10px" : "12px")}; + padding-left: 8px; } :hover { From 8422e1a555d0e2f74346e9de99fd27a16ac1e6e3 Mon Sep 17 00:00:00 2001 From: Alexey Bannov Date: Tue, 19 Oct 2021 18:35:06 +0300 Subject: [PATCH 10/39] file api: get file operation status 100 only if Result field is not null --- .../FileOperations/FileDownloadOperation.cs | 58 +++++++++++++++++-- .../FileOperations/FileOperation.cs | 2 +- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileDownloadOperation.cs b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileDownloadOperation.cs index 545a528ba6..d38c6f4e74 100644 --- a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileDownloadOperation.cs +++ b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileDownloadOperation.cs @@ -36,6 +36,7 @@ using ASC.Common.Threading; using ASC.Common.Web; using ASC.Core.Tenants; using ASC.Files.Core; +using ASC.Files.Core.EF; using ASC.Files.Core.Resources; using ASC.MessagingSystem; using ASC.Web.Core.Files; @@ -116,11 +117,44 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations stream, MimeMapping.GetMimeMapping(path), "attachment; filename=\"" + fileName + "\""); - Result = string.Format("{0}?{1}=bulk&ext={2}", filesLinkUtility.FileHandlerPath, FilesLinkUtility.Action, archiveExtension); + Result = string.Format("{0}?{1}=bulk&ext={2}", filesLinkUtility.FileHandlerPath, FilesLinkUtility.Action, archiveExtension); + + TaskInfo.SetProperty(PROGRESS, 100); + TaskInfo.SetProperty(RESULT, Result); + TaskInfo.SetProperty(FINISHED, true); + } - FillDistributedTask(); TaskInfo.PublishChanges(); + } + + public override void PublishChanges(DistributedTask task) + { + var thirdpartyTask = ThirdPartyOperation.GetDistributedTask(); + var daoTask = DaoOperation.GetDistributedTask(); + + var error1 = thirdpartyTask.GetProperty(ERROR); + var error2 = daoTask.GetProperty(ERROR); + + if (!string.IsNullOrEmpty(error1)) + { + Error = error1; + } + else if (!string.IsNullOrEmpty(error2)) + { + Error = error2; + } + + successProcessed = thirdpartyTask.GetProperty(PROCESSED) + daoTask.GetProperty(PROCESSED); + + var progressSteps = ThirdPartyOperation.Total + DaoOperation.Total + 1; + + var progress = (int)(successProcessed / (double)progressSteps * 100); + + base.FillDistributedTask(); + + TaskInfo.SetProperty(PROGRESS, progress < 100 ? progress : progress); + TaskInfo.PublishChanges(); } } @@ -145,7 +179,8 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations { if (!Files.Any() && !Folders.Any()) return; - entriesPathId = GetEntriesPathId(scope); + entriesPathId = GetEntriesPathId(scope); + if (entriesPathId == null || entriesPathId.Count == 0) { if (Files.Count > 0) @@ -156,7 +191,11 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations throw new DirectoryNotFoundException(FilesCommonResource.ErrorMassage_FolderNotFound); } - ReplaceLongPath(entriesPathId); + ReplaceLongPath(entriesPathId); + + Total = entriesPathId.Count; + + TaskInfo.PublishChanges(); } private ItemNameValueCollection ExecPathFromFile(IServiceScope scope, File file, string path) @@ -236,7 +275,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations } return entriesPathId; } - + internal void CompressToZip(Stream stream, IServiceScope scope) { if (entriesPathId == null) return; @@ -345,6 +384,15 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations } compressTo.CloseEntry(); counter++; + + if (!Equals(entryId, default(T)) && file != null) + { + ProcessedFile(entryId); + } + else + { + ProcessedFolder(default(T)); + } } ProgressStep(); diff --git a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileOperation.cs b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileOperation.cs index 28a178df2e..982333dbba 100644 --- a/products/ASC.Files/Core/Services/WCFService/FileOperations/FileOperation.cs +++ b/products/ASC.Files/Core/Services/WCFService/FileOperations/FileOperation.cs @@ -149,7 +149,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations base.FillDistributedTask(); } - public void PublishChanges(DistributedTask task) + public virtual void PublishChanges(DistributedTask task) { var thirdpartyTask = ThirdPartyOperation.GetDistributedTask(); var daoTask = DaoOperation.GetDistributedTask(); From 3ed6a3d92a822e15d619fe7490991c98a9454214 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Tue, 19 Oct 2021 19:48:15 +0300 Subject: [PATCH 11/39] Fix bug 53211: next/prev media on swipe on desktop --- packages/asc-web-common/components/MediaViewer/MediaViewer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/asc-web-common/components/MediaViewer/MediaViewer.js b/packages/asc-web-common/components/MediaViewer/MediaViewer.js index da6c0a5b59..6af2caaffd 100644 --- a/packages/asc-web-common/components/MediaViewer/MediaViewer.js +++ b/packages/asc-web-common/components/MediaViewer/MediaViewer.js @@ -13,6 +13,7 @@ import equal from "fast-deep-equal/react"; import Hammer from "hammerjs"; import IconButton from "@appserver/components/icon-button"; import commonIconsStyles from "@appserver/components/utils/common-icons-style"; +import { isDesktop } from "react-device-detect"; const StyledVideoViewer = styled(VideoViewer)` z-index: 301; @@ -104,7 +105,7 @@ class MediaViewer extends React.Component { document.getElementsByClassName("videoViewerOverlay")[0] ); } - if (_this.hammer) { + if (_this.hammer && !isDesktop) { _this.hammer.on("swipeleft", _this.nextMedia); _this.hammer.on("swiperight", _this.prevMedia); } From aa69a522721b83827012fd0bf6fa16f870cdba8f Mon Sep 17 00:00:00 2001 From: pavelbannov Date: Tue, 19 Oct 2021 20:29:45 +0300 Subject: [PATCH 12/39] fix test --- products/ASC.Files/Tests/ASC.Files.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Tests/ASC.Files.Tests.csproj b/products/ASC.Files/Tests/ASC.Files.Tests.csproj index adc7d622a7..32135f6d34 100644 --- a/products/ASC.Files/Tests/ASC.Files.Tests.csproj +++ b/products/ASC.Files/Tests/ASC.Files.Tests.csproj @@ -11,7 +11,7 @@ - + From 191ddfabc48214f36bd5f128fd918bdb8450f085 Mon Sep 17 00:00:00 2001 From: Alexey Bannov Date: Tue, 19 Oct 2021 21:34:09 +0300 Subject: [PATCH 13/39] fixed bug 53122 --- products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs index 2bc734e491..06e0d9d483 100644 --- a/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs +++ b/products/ASC.Files/Core/Core/Dao/TeamlabDao/FolderDao.cs @@ -515,6 +515,7 @@ namespace ASC.Files.Core.Data var toInsert = FilesDbContext.Tree .Where(r => r.FolderId == toFolderId) + .OrderBy(r => r.Level) .ToList(); foreach (var subfolder in subfolders) @@ -525,7 +526,7 @@ namespace ASC.Files.Core.Data { FolderId = subfolder.Key, ParentId = f.ParentId, - Level = f.Level + 1 + Level = subfolder.Value + 1 + f.Level }; FilesDbContext.AddOrUpdate(r => r.Tree, newTree); } From 26183d14bf5abf23b6325c74e7711a3626f4d4d6 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 00:41:05 +0300 Subject: [PATCH 14/39] Web: add new pencil icon --- public/images/pencil.react.svg | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 public/images/pencil.react.svg diff --git a/public/images/pencil.react.svg b/public/images/pencil.react.svg new file mode 100644 index 0000000000..335ff09ebe --- /dev/null +++ b/public/images/pencil.react.svg @@ -0,0 +1,3 @@ + + + From cad7c309ceb7bc87ac3da02c2be1f6bdf1aefd3d Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 00:41:42 +0300 Subject: [PATCH 15/39] Web: Components: add avatar edit button --- .../avatar/avatar.stories.js | 1 - packages/asc-web-components/avatar/index.js | 38 +++++-------------- .../avatar/styled-avatar.js | 23 +++++------ packages/asc-web-components/themes/base.js | 17 +++------ packages/asc-web-components/themes/dark.js | 17 +++------ 5 files changed, 28 insertions(+), 68 deletions(-) diff --git a/packages/asc-web-components/avatar/avatar.stories.js b/packages/asc-web-components/avatar/avatar.stories.js index 39ee1197d3..c565f59acb 100644 --- a/packages/asc-web-components/avatar/avatar.stories.js +++ b/packages/asc-web-components/avatar/avatar.stories.js @@ -27,5 +27,4 @@ Default.args = { source: "", userName: "", editing: false, - editLabel: "Edit photo", }; diff --git a/packages/asc-web-components/avatar/index.js b/packages/asc-web-components/avatar/index.js index d89e4132cd..efd5051b78 100644 --- a/packages/asc-web-components/avatar/index.js +++ b/packages/asc-web-components/avatar/index.js @@ -4,7 +4,6 @@ import styled from "styled-components"; import { GuestIcon, AdministratorIcon, OwnerIcon } from "./svg"; import { - EditLink, EmptyIcon, EditContainer, AvatarWrapper, @@ -13,7 +12,7 @@ import { StyledImage, StyledAvatar, } from "./styled-avatar"; -import Link from "../link"; +import IconButton from "../icon-button"; import commonIconsStyles from "../utils/common-icons-style"; const whiteColor = "#FFFFFF"; @@ -57,15 +56,7 @@ Initials.propTypes = { // eslint-disable-next-line react/display-name const Avatar = (props) => { //console.log("Avatar render"); - const { - size, - source, - userName, - role, - editing, - editLabel, - editAction, - } = props; + const { size, source, userName, role, editing, editAction } = props; const avatarContent = source ? ( @@ -83,21 +74,13 @@ const Avatar = (props) => { {avatarContent} {editing && size === "max" && ( - - - - {editLabel} - - + + )} {roleIcon} @@ -112,8 +95,6 @@ Avatar.propTypes = { role: PropTypes.oneOf(["owner", "admin", "guest", "user"]), /** The address of the image for an image avatar */ source: PropTypes.string, - /** Displays avatar edit layer */ - editLabel: PropTypes.string, userName: PropTypes.string, editing: PropTypes.bool, /** Function called when the avatar change button is pressed */ @@ -130,7 +111,6 @@ Avatar.defaultProps = { size: "medium", role: "", source: "", - editLabel: "Edit photo", userName: "", editing: false, }; diff --git a/packages/asc-web-components/avatar/styled-avatar.js b/packages/asc-web-components/avatar/styled-avatar.js index e6edc02676..37468c520f 100644 --- a/packages/asc-web-components/avatar/styled-avatar.js +++ b/packages/asc-web-components/avatar/styled-avatar.js @@ -5,7 +5,6 @@ import NoUserSelect from "../utils/commonStyles"; import { CameraIcon } from "./svg"; import commonIconsStyles from "../utils/common-icons-style"; - const EditLink = styled.div` padding-left: ${(props) => props.theme.avatar.editLink.paddingLeft}; padding-right: ${(props) => props.theme.avatar.editLink.paddingRight}; @@ -29,21 +28,17 @@ const EmptyIcon = styled(CameraIcon)` EmptyIcon.defaultProps = { theme: Base }; const EditContainer = styled.div` - box-sizing: ${(props) => props.theme.avatar.editContainer.boxSizing}; position: absolute; - width: ${(props) => props.theme.avatar.editContainer.width}; - height: ${(props) => props.theme.avatar.editContainer.height}; - top: ${(props) => props.theme.avatar.editContainer.top}; - left: ${(props) => props.theme.avatar.editContainer.left}; - transform: ${(props) => props.theme.avatar.editContainer.transform}; - padding: ${(props) => props.theme.avatar.editContainer.padding}; - text-align: ${(props) => props.theme.avatar.editContainer.textAlign}; - line-height: ${(props) => props.theme.avatar.editContainer.lineHeight}; + display: flex; + right: ${(props) => props.theme.avatar.editContainer.right}; + bottom: ${(props) => props.theme.avatar.editContainer.bottom}; + background-color: ${(props) => + props.theme.avatar.editContainer.backgroundColor}; border-radius: ${(props) => props.theme.avatar.editContainer.borderRadius}; - background: ${(props) => - props.gradient - ? props.theme.avatar.editContainer.linearGradient - : props.theme.avatar.editContainer.transparent}; + height: ${(props) => props.theme.avatar.editContainer.height}; + width: ${(props) => props.theme.avatar.editContainer.width}; + align-items: center; + justify-content: center; `; EditContainer.defaultProps = { theme: Base }; diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index d3ccfbe5de..04ef3d299c 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -917,19 +917,12 @@ const Base = { }, editContainer: { - boxSizing: "border-box", - width: "100%", - height: "100%", - top: "50%", - left: "50%", - transform: "translate(-50%, -50%)", - padding: "75% 16px 5px", - textAlign: "center", - lineHeight: "19px", + right: "4px", + bottom: "4px", + backgroundColor: "#265a8f", borderRadius: "50%", - linearGradient: - "linear-gradient(180deg, rgba(6, 22, 38, 0) 24.48%, rgba(6, 22, 38, 0.75) 100%)", - transparent: "transparent", + height: "32px", + width: "32px", }, editLink: { diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index 394091912a..0b6b55d886 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -880,19 +880,12 @@ const Dark = { }, }, editContainer: { - boxSizing: "border-box", - width: "100%", - height: "100%", - top: "50%", - left: "50%", - transform: "translate(-50%, -50%)", - padding: "75% 16px 5px", - textAlign: "center", - lineHeight: "19px", + right: "4px", + bottom: "4px", + backgroundColor: "#265a8f", borderRadius: "50%", - linearGradient: - "linear-gradient(180deg, rgba(6, 22, 38, 0) 24.48%, rgba(6, 22, 38, 0.75) 100%)", - transparent: "transparent", + height: "32px", + width: "32px", }, editLink: { From ba5bcda89169cc84c42e8455ad4e06a3df3b5bd8 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 20 Oct 2021 10:57:30 +0300 Subject: [PATCH 16/39] Web: Files: TilesView: fixed font and icon size --- .../Section/Body/TilesView/FilesTileContent.js | 12 ++++-------- .../Body/TilesView/sub-components/Tile.js | 17 ++++++++--------- .../ASC.Files/Client/src/store/FilesStore.js | 2 +- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/FilesTileContent.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/FilesTileContent.js index 00e0393651..d35ade5f11 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/FilesTileContent.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/FilesTileContent.js @@ -54,7 +54,7 @@ const SimpleFilesTileContent = styled(TileContent)` } .title-link { - font-size: 14px; + font-size: 13px; } .favorite, @@ -83,18 +83,14 @@ const FilesTileContent = ({ return ( <> - + diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js index 49230bdea2..d8d159b91a 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/Tile.js @@ -115,7 +115,7 @@ const StyledTile = styled.div` .file-checkbox { display: ${(props) => (props.checked ? "flex" : "none")}; flex: 0 0 16px; - margin-right: ${(props) => (props.isFolder ? "8px" : "4px")}; + //margin-right: ${(props) => (props.isFolder ? "8px" : "4px")}; margin-top: 3px; justify-content: center; @@ -129,24 +129,23 @@ const StyledTile = styled.div` flex: 0 0 auto; margin-right: 4px; user-select: none; - margin-top: 3px; - margin-top: ${(props) => (props.isFolder ? "-6px" : "-4px")}; + margin-top: ${(props) => (props.isFolder ? "-8px" : "-6px")}; - height: 32px; - width: 32px; + height: 24px; + width: 24px; img { - height: 32px; - width: 32px; + height: 24px; + width: 24px; } } .file-icon_container { - min-width: 36px; + min-width: 28px; } .styled-content { - padding-left: ${(props) => (props.isFolder ? "10px" : "12px")}; + padding-left: 10px; } :hover { diff --git a/products/ASC.Files/Client/src/store/FilesStore.js b/products/ASC.Files/Client/src/store/FilesStore.js index 241b9575a2..7bc7b9be51 100644 --- a/products/ASC.Files/Client/src/store/FilesStore.js +++ b/products/ASC.Files/Client/src/store/FilesStore.js @@ -1134,7 +1134,7 @@ class FilesStore { const isThirdPartyFolder = providerKey && id === rootFolderId; //const isCanWebEdit = canWebEdit(item.fileExst); - const iconSize = this.viewAs === "tile" ? 32 : 24; + const iconSize = 24; // this.viewAs === "tile" ? 32 : 24; const icon = getIcon(iconSize, fileExst, providerKey, contentLength); let isFolder = false; From a75a49dc9aa40d4ffe83cac222d5ae053b59f954 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 11:10:51 +0300 Subject: [PATCH 17/39] Web: Components: delete useless --- .../asc-web-components/avatar/styled-avatar.js | 17 ----------------- packages/asc-web-components/themes/base.js | 9 --------- packages/asc-web-components/themes/dark.js | 8 -------- 3 files changed, 34 deletions(-) diff --git a/packages/asc-web-components/avatar/styled-avatar.js b/packages/asc-web-components/avatar/styled-avatar.js index 37468c520f..30115ac9d7 100644 --- a/packages/asc-web-components/avatar/styled-avatar.js +++ b/packages/asc-web-components/avatar/styled-avatar.js @@ -5,22 +5,6 @@ import NoUserSelect from "../utils/commonStyles"; import { CameraIcon } from "./svg"; import commonIconsStyles from "../utils/common-icons-style"; -const EditLink = styled.div` - padding-left: ${(props) => props.theme.avatar.editLink.paddingLeft}; - padding-right: ${(props) => props.theme.avatar.editLink.paddingRight}; - - a:hover { - border-bottom: ${(props) => props.theme.avatar.editLink.borderBottom}; - } - - span { - display: ${(props) => props.theme.avatar.editLink.display}; - max-width: ${(props) => props.theme.avatar.editLink.maxWidth}; - text-decoration: ${(props) => props.theme.avatar.editLink.textDecoration}; - } -`; -EditLink.defaultProps = { theme: Base }; - const EmptyIcon = styled(CameraIcon)` ${commonIconsStyles} border-radius: ${(props) => props.theme.avatar.image.borderRadius}; @@ -124,7 +108,6 @@ const StyledAvatar = styled.div` StyledAvatar.defaultProps = { theme: Base }; export { - EditLink, EmptyIcon, EditContainer, AvatarWrapper, diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index 04ef3d299c..7d01538b12 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -925,15 +925,6 @@ const Base = { width: "32px", }, - editLink: { - paddingLeft: "10px", - paddingRight: "10px", - borderBottom: "none", - display: "inline-block", - maxWidth: "100%", - textDecoration: "underline dashed", - }, - image: { width: "100%", height: "auto", diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index 0b6b55d886..8ea7374115 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -888,14 +888,6 @@ const Dark = { width: "32px", }, - editLink: { - paddingLeft: "10px", - paddingRight: "10px", - borderBottom: "none", - display: "inline-block", - maxWidth: "100%", - textDecoration: "underline dashed", - }, image: { width: "100%", height: "100%", From f35ea7d172c7659426f30d6e8df3cc56b2a5eff4 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 11:21:28 +0300 Subject: [PATCH 18/39] Web: People: delete useless --- .../pages/ProfileAction/Section/Body/FormFields/ContactField.js | 2 -- .../ProfileAction/Section/Body/FormFields/ContactsField.js | 2 -- .../pages/ProfileAction/Section/Body/FormFields/DateField.js | 2 -- .../ProfileAction/Section/Body/FormFields/DepartmentField.js | 2 -- .../pages/ProfileAction/Section/Body/FormFields/EmailField.js | 2 -- .../ProfileAction/Section/Body/FormFields/PasswordField.js | 2 -- .../pages/ProfileAction/Section/Body/FormFields/RadioField.js | 2 -- .../ProfileAction/Section/Body/FormFields/TextChangeField.js | 2 -- .../pages/ProfileAction/Section/Body/FormFields/TextField.js | 2 -- .../src/pages/ProfileAction/Section/Body/updateUserForm.js | 2 -- 10 files changed, 20 deletions(-) diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactField.js index 213ede6319..0dcab07946 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactField.js @@ -21,8 +21,6 @@ class ContactField extends React.Component { } render() { - console.log("ContactField render"); - const { isDisabled, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactsField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactsField.js index 5c6dfabcb5..7934d07d8e 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactsField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/ContactsField.js @@ -66,8 +66,6 @@ class ContactsField extends React.Component { } render() { - console.log("ContactsField render"); - const { pattern, contacts, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DateField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DateField.js index 7a9e78772e..c47a3ff323 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DateField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DateField.js @@ -9,8 +9,6 @@ class DateField extends React.Component { } render() { - console.log("DateField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DepartmentField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DepartmentField.js index 4187c70b0a..0f747d04f4 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DepartmentField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/DepartmentField.js @@ -16,8 +16,6 @@ class DepartmentField extends React.Component { }; render() { - console.log("DepartmentField render"); - const { isRequired, isDisabled, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/EmailField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/EmailField.js index 9254125500..39d1894c50 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/EmailField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/EmailField.js @@ -9,8 +9,6 @@ class EmailField extends React.Component { } render() { - console.log("EmailField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/PasswordField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/PasswordField.js index e8b3a494ab..af01550b52 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/PasswordField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/PasswordField.js @@ -11,8 +11,6 @@ class PasswordField extends React.Component { } render() { - console.log("PasswordField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/RadioField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/RadioField.js index 1e3b7bc29e..47dc5b9e4f 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/RadioField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/RadioField.js @@ -9,8 +9,6 @@ class RadioField extends React.Component { } render() { - //console.log("RadioField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextChangeField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextChangeField.js index e80c98d36a..39eaca95da 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextChangeField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextChangeField.js @@ -18,8 +18,6 @@ class TextChangeField extends React.Component { } render() { - console.log("TextChangeField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextField.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextField.js index 2050a968a4..9f690ac8a4 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextField.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/FormFields/TextField.js @@ -9,8 +9,6 @@ class TextField extends React.Component { } render() { - console.log("TextField render"); - const { isRequired, hasError, diff --git a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/updateUserForm.js b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/updateUserForm.js index 9556d50f78..c90638b5db 100644 --- a/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/updateUserForm.js +++ b/products/ASC.People/Client/src/pages/ProfileAction/Section/Body/updateUserForm.js @@ -499,7 +499,6 @@ class UpdateUserForm extends React.Component { this.setState({ isLoading: true }); const { profile, setAvatarMax, personal } = this.props; - console.log("profile", profile); if (isUpdate) { createThumbnailsAvatar(profile.id, { x: Math.round(result.x * avatar.defaultWidth - result.width / 2), @@ -727,7 +726,6 @@ class UpdateUserForm extends React.Component { source={this.props.avatarMax || profile.avatarMax} userName={profile.displayName} editing={true} - editLabel={t("Common:EditAvatar")} editAction={ isMobile ? this.openAvatarEditorPage : this.openAvatarEditor } From f895cde8130e652414d7fe4de730098df02627f3 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 12:09:01 +0300 Subject: [PATCH 19/39] Web: Components: fix avatar edit button position --- packages/asc-web-components/themes/base.js | 4 ++-- packages/asc-web-components/themes/dark.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index 7d01538b12..d4ccd35faf 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -917,8 +917,8 @@ const Base = { }, editContainer: { - right: "4px", - bottom: "4px", + right: "0px", + bottom: "0px", backgroundColor: "#265a8f", borderRadius: "50%", height: "32px", diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index 8ea7374115..ee89540de5 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -880,8 +880,8 @@ const Dark = { }, }, editContainer: { - right: "4px", - bottom: "4px", + right: "0px", + bottom: "0px", backgroundColor: "#265a8f", borderRadius: "50%", height: "32px", From 392122ae392dbf0fc82f6fb8ed68d0142c662999 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 12:41:34 +0300 Subject: [PATCH 20/39] Web: Files: fix files operation --- .../Client/src/store/UploadDataStore.js | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/products/ASC.Files/Client/src/store/UploadDataStore.js b/products/ASC.Files/Client/src/store/UploadDataStore.js index 15897c6eba..f9843676c3 100644 --- a/products/ASC.Files/Client/src/store/UploadDataStore.js +++ b/products/ASC.Files/Client/src/store/UploadDataStore.js @@ -874,27 +874,25 @@ class UploadDataStore { return; } - let operationItem = null; - let url; + let operationItem = data; + let finished = data.finished; - while (progress !== 100 && !url) { - await this.getOperationProgress(data.id) - .then((item) => { - operationItem = item; - progress = item ? item.progress : 100; - url = item.url; + while (!finished) { + const item = await this.getOperationProgress(data.id); + operationItem = item; + progress = item ? item.progress : 100; + finished = item.finished; - setSecondaryProgressBarData({ - icon: pbData.icon, - label: pbData.label || label, - percent: progress, - visible: true, - alert: false, - }); - }) - .catch((err) => Promise.reject(err)); + setSecondaryProgressBarData({ + icon: pbData.icon, + label: pbData.label || label, + percent: progress, + visible: true, + alert: false, + }); } - return Promise.resolve(operationItem); + + return operationItem; }; moveToCopyTo = (destFolderId, pbData, isCopy) => { From 26956a9ba169bf28778e524b280e14e6b9e537d9 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Wed, 20 Oct 2021 12:58:11 +0300 Subject: [PATCH 21/39] Web: Files: added file creation after focus loss --- products/ASC.Files/Client/src/HOCs/withContent.js | 14 ++++++++------ .../src/components/EditingWrapperComponent.js | 2 ++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/products/ASC.Files/Client/src/HOCs/withContent.js b/products/ASC.Files/Client/src/HOCs/withContent.js index 260d996461..a7da402a37 100644 --- a/products/ASC.Files/Client/src/HOCs/withContent.js +++ b/products/ASC.Files/Client/src/HOCs/withContent.js @@ -109,14 +109,14 @@ export default function withContent(WrappedContent) { return this.completeAction(e); }; - onClickUpdateItem = (e) => { + onClickUpdateItem = (e, open = true) => { const { fileActionType } = this.props; fileActionType === FileAction.Create - ? this.createItem(e) + ? this.createItem(e, open) : this.updateItem(e); }; - createItem = (e) => { + createItem = (e, open) => { const { createFile, item, @@ -141,7 +141,7 @@ export default function withContent(WrappedContent) { } let tab = - !isDesktop && item.fileExst + !isDesktop && item.fileExst && open ? window.open( combineUrl( AppServerConfig.proxyURL, @@ -170,10 +170,12 @@ export default function withContent(WrappedContent) { encryptedFile, true, false - ).then(() => openDocEditor(file.id, file.providerKey, tab)); + ).then( + () => open && openDocEditor(file.id, file.providerKey, tab) + ); }); } - return openDocEditor(file.id, file.providerKey, tab); + return open && openDocEditor(file.id, file.providerKey, tab); }) .then(() => this.completeAction(itemId)) .catch((e) => toastr.error(e)) diff --git a/products/ASC.Files/Client/src/components/EditingWrapperComponent.js b/products/ASC.Files/Client/src/components/EditingWrapperComponent.js index bf55db87c0..cf1b5c240e 100644 --- a/products/ASC.Files/Client/src/components/EditingWrapperComponent.js +++ b/products/ASC.Files/Client/src/components/EditingWrapperComponent.js @@ -149,6 +149,7 @@ const EditingWrapperComponent = (props) => { }; const onFocus = (e) => e.target.select(); + const onBlur = (e) => onClickUpdateItem(e, false); return ( @@ -164,6 +165,7 @@ const EditingWrapperComponent = (props) => { onKeyUp={onKeyUpUpdateItem} onKeyDown={onEscapeKeyPress} onFocus={onFocus} + onBlur={onBlur} isDisabled={isLoading} data-itemid={itemId} withBorder={!isTable} From 121a640bedf697bf4a64bef1ef9d34eca0b2c2a6 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 13:10:45 +0300 Subject: [PATCH 22/39] Web: Components: add hover effect for scrollbar --- packages/asc-web-components/scrollbar/styled-scrollbar.js | 5 +++++ packages/asc-web-components/themes/base.js | 3 ++- packages/asc-web-components/themes/dark.js | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/asc-web-components/scrollbar/styled-scrollbar.js b/packages/asc-web-components/scrollbar/styled-scrollbar.js index 4b3d2aea78..287aaed1fb 100644 --- a/packages/asc-web-components/scrollbar/styled-scrollbar.js +++ b/packages/asc-web-components/scrollbar/styled-scrollbar.js @@ -16,6 +16,11 @@ const StyledScrollbar = styled(Scrollbars)` ? props.color : props.theme.scrollbar.backgroundColorHorizontal}; } + + .nav-thumb-vertical:hover { + background-color: ${(props) => + props.theme.scrollbar.hoverBackgroundColorVertical}; + } `; StyledScrollbar.defaultProps = { diff --git a/packages/asc-web-components/themes/base.js b/packages/asc-web-components/themes/base.js index d3ccfbe5de..1071026a0c 100644 --- a/packages/asc-web-components/themes/base.js +++ b/packages/asc-web-components/themes/base.js @@ -478,8 +478,9 @@ const Base = { }, scrollbar: { - backgroundColorVertical: "#e5e5e5", + backgroundColorVertical: "rgba(208, 213, 218, 1)", backgroundColorHorizontal: "rgba(0, 0, 0, 0.1)", + hoverBackgroundColorVertical: "rgba(163, 169, 174, 1)", }, modalDialog: { diff --git a/packages/asc-web-components/themes/dark.js b/packages/asc-web-components/themes/dark.js index 394091912a..d7d428fba2 100644 --- a/packages/asc-web-components/themes/dark.js +++ b/packages/asc-web-components/themes/dark.js @@ -444,8 +444,9 @@ const Dark = { }, scrollbar: { - backgroundColorVertical: "rgba(255, 255, 255, 0.5)", + backgroundColorVertical: "rgba(208, 213, 218, 1)", backgroundColorHorizontal: "rgba(255, 255, 255, 0.5)", + hoverBackgroundColorVertical: "rgba(163, 169, 174, 1)", }, modalDialog: { From 23b30f5d8d75506a03007e80843a7f3dd629ce47 Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 20 Oct 2021 15:52:02 +0300 Subject: [PATCH 23/39] Web: Common: PageLayout: table style fix --- .../asc-web-common/components/PageLayout/index.js | 5 ++++- .../PageLayout/sub-components/section-body.js | 7 ++++++- .../PageLayout/sub-components/section-filter.js | 8 +++++++- .../PageLayout/sub-components/section-header.js | 7 ++++++- .../TilesView/sub-components/TileContainer.js | 15 --------------- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/packages/asc-web-common/components/PageLayout/index.js b/packages/asc-web-common/components/PageLayout/index.js index 693b008eae..32c09cf464 100644 --- a/packages/asc-web-common/components/PageLayout/index.js +++ b/packages/asc-web-common/components/PageLayout/index.js @@ -357,7 +357,10 @@ class PageLayout extends React.Component { paddingRight: "20px", }} >
- + {sectionFilterContent ? sectionFilterContent.props.children : null} diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js index e949687ecb..493514d957 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-body.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-body.js @@ -21,7 +21,12 @@ const commonStyles = css` flex: 1 0 auto; padding: 17px 7px 16px 24px; outline: none; - ${(props) => props.viewAs == "tile" && "padding-right:0;"} + ${(props) => + props.viewAs == "tile" && + css` + padding-right: 0; + padding-left: 20px; + `} @media ${tablet} { padding: 16px 0 16px 24px; diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-filter.js b/packages/asc-web-common/components/PageLayout/sub-components/section-filter.js index ef14360b06..7bc4d7696f 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-filter.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-filter.js @@ -1,11 +1,17 @@ import React from "react"; import styled from "styled-components"; import equal from "fast-deep-equal/react"; -import { tablet } from "@appserver/components/utils/device"; +import { tablet, desktop } from "@appserver/components/utils/device"; const StyledSectionFilter = styled.div` margin: 11px 24px 9px 0; + @media ${desktop} { + ${(props) => + (props.viewAs === "table" || props.viewAs === "tile") && + "margin-left: -4px"}; + } + @media ${tablet} { margin-left: -4px; } diff --git a/packages/asc-web-common/components/PageLayout/sub-components/section-header.js b/packages/asc-web-common/components/PageLayout/sub-components/section-header.js index c914d9f83c..ee90b531e5 100644 --- a/packages/asc-web-common/components/PageLayout/sub-components/section-header.js +++ b/packages/asc-web-common/components/PageLayout/sub-components/section-header.js @@ -25,7 +25,12 @@ const StyledSectionHeader = styled.div` } */ `} - + @media ${desktop} { + ${(props) => + (props.viewAs === "table" || props.viewAs === "tile") && + "margin-left: -4px"}; + } + @media ${tablet} { ${(props) => props.viewAs !== "tablet" && diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/TileContainer.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/TileContainer.js index c8ab28bd90..68cd37026f 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/TileContainer.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TilesView/sub-components/TileContainer.js @@ -7,7 +7,6 @@ import AutoSizer from "react-virtualized-auto-sizer"; import Heading from "@appserver/components/heading"; import ContextMenu from "@appserver/components/context-menu"; import CustomScrollbarsVirtualList from "@appserver/components/scrollbar"; -import { tablet } from "@appserver/components/utils/device"; const StyledGridWrapper = styled.div` display: grid; @@ -15,21 +14,7 @@ const StyledGridWrapper = styled.div` width: 100%; grid-gap: ${(props) => (props.isFolders ? "13px 14px" : "16px 18px")}; padding-bottom: 24px; - padding-right: 2px; box-sizing: border-box; - padding-left: 1px; - - @media ${tablet} { - margin-left: -6px !important; - } - - @media (min-width: 1024px) { - margin-left: -2px; - } - - @media (max-width: 1024px) { - margin-left: -2px; - } `; const StyledTileContainer = styled.div` From 17a31e85137a230b34e23bbf9b593cbe42e6b39f Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Wed, 20 Oct 2021 16:51:47 +0300 Subject: [PATCH 24/39] Web: Files: TableView: fixed position of image in row --- .../Client/src/components/EditingWrapperComponent.js | 2 ++ .../Client/src/pages/Home/Section/Body/TableView/TableRow.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/products/ASC.Files/Client/src/components/EditingWrapperComponent.js b/products/ASC.Files/Client/src/components/EditingWrapperComponent.js index bf55db87c0..a488544a1e 100644 --- a/products/ASC.Files/Client/src/components/EditingWrapperComponent.js +++ b/products/ASC.Files/Client/src/components/EditingWrapperComponent.js @@ -46,6 +46,8 @@ const EditingWrapper = styled.div` border-bottom: 1px solid #eceef1; padding-bottom: 4px; margin-top: 4px; + + margin-left: -4px; `} ${(props) => diff --git a/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableRow.js b/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableRow.js index 2132743882..9dbef05a37 100644 --- a/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableRow.js +++ b/products/ASC.Files/Client/src/pages/Home/Section/Body/TableView/TableRow.js @@ -63,6 +63,10 @@ const StyledTableRow = styled(TableRow)` "url(images/cursor.palm.svg), auto"}; } + .table-container_element { + margin-left: ${(props) => (props.item.isFolder ? "-3px" : "-4px")}; + } + &:hover { .table-container_row-checkbox-wrapper { ${(props) => props.dragging && rowCheckboxDraggingHoverStyle} From ec4125175e6ccbdd3799ab3adac8e863040ac308 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 18:43:48 +0300 Subject: [PATCH 25/39] Web: Components: export CustomScrollbar --- .../scrollbar/custom-scrollbars-virtual-list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/asc-web-components/scrollbar/custom-scrollbars-virtual-list.js b/packages/asc-web-components/scrollbar/custom-scrollbars-virtual-list.js index a90fdbe225..6e4043fce6 100644 --- a/packages/asc-web-components/scrollbar/custom-scrollbars-virtual-list.js +++ b/packages/asc-web-components/scrollbar/custom-scrollbars-virtual-list.js @@ -2,7 +2,7 @@ import React from "react"; import Scrollbar from "../scrollbar"; -class CustomScrollbars extends React.Component { +export class CustomScrollbars extends React.Component { refSetter = (scrollbarsRef, forwardedRef) => { if (scrollbarsRef) { forwardedRef(scrollbarsRef.view); From aadf41f44d22ca9137ae2b98200d0e48e5e51807 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Wed, 20 Oct 2021 18:44:14 +0300 Subject: [PATCH 26/39] Web: Files: fix scrollbar in upload panel --- .../Client/src/components/panels/UploadPanel/FileList.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js b/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js index 4328097ff1..ac8ed70f36 100644 --- a/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js +++ b/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js @@ -1,10 +1,14 @@ import React from "react"; -import CustomScrollbarsVirtualList from "@appserver/components/scrollbar/custom-scrollbars-virtual-list"; +import CustomScrollbars from "@appserver/components/scrollbar/custom-scrollbars-virtual-list"; import AutoSizer from "react-virtualized-auto-sizer"; import { FixedSizeList as List } from "react-window"; import RowWrapper from "./RowWrapper"; import { inject, observer } from "mobx-react"; +const CustomScrollbarsVirtualList = React.forwardRef((props, ref) => ( + +)); + const FileList = ({ uploadDataFiles }) => { //console.log("FileList render"); @@ -14,7 +18,7 @@ const FileList = ({ uploadDataFiles }) => { Date: Thu, 21 Oct 2021 10:10:49 +0300 Subject: [PATCH 27/39] Web: Files: VersionHistory: fixed width of VersionHistoryPanel --- .../ASC.Files/Client/src/components/panels/StyledPanels.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/StyledPanels.js b/products/ASC.Files/Client/src/components/panels/StyledPanels.js index 181d1f4658..3111ddab7e 100644 --- a/products/ASC.Files/Client/src/components/panels/StyledPanels.js +++ b/products/ASC.Files/Client/src/components/panels/StyledPanels.js @@ -92,11 +92,11 @@ const StyledVersionHistoryPanel = styled.div` ${PanelStyles} .version-history-modal-dialog { transform: translateX(${(props) => (props.visible ? "0" : "720px")}); - width: 720px; + width: 500px; } .version-history-aside-panel { transform: translateX(${(props) => (props.visible ? "0" : "720px")}); - width: 720px; + width: 500px; } .version-history-panel-header { height: 53px; From 85c96024cdfe76f6ce1f16b5afd7e39e60450b27 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Thu, 21 Oct 2021 11:30:40 +0300 Subject: [PATCH 28/39] Web: Files: fixed convert files upload --- products/ASC.Files/Client/src/store/UploadDataStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/products/ASC.Files/Client/src/store/UploadDataStore.js b/products/ASC.Files/Client/src/store/UploadDataStore.js index d0edd095ce..b4663d5688 100644 --- a/products/ASC.Files/Client/src/store/UploadDataStore.js +++ b/products/ASC.Files/Client/src/store/UploadDataStore.js @@ -389,7 +389,7 @@ class UploadDataStore { this.uploadToFolder = null; this.percent = 0; } - if (this.converted) { + if (this.uploaded && this.converted) { this.files = []; this.filesToConversion = []; } From 67f2311a9710be33a80689c507d04c8d0e33454f Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Thu, 21 Oct 2021 14:36:37 +0300 Subject: [PATCH 29/39] Web: Components: fix scrollbar in aside --- packages/asc-web-components/aside/aside.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/asc-web-components/aside/aside.js b/packages/asc-web-components/aside/aside.js index 3c7647b26d..69489fea15 100644 --- a/packages/asc-web-components/aside/aside.js +++ b/packages/asc-web-components/aside/aside.js @@ -23,7 +23,7 @@ const Aside = React.memo((props) => { contentPaddingBottom={contentPaddingBottom} className={`${className} not-selectable aside`} > - {children} + {children} ); }); From 256ad79e5fe276746aa8c83622e551c50f7d2547 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Thu, 21 Oct 2021 15:04:34 +0300 Subject: [PATCH 30/39] Web: Components: add withoutBodyScroll in aside --- packages/asc-web-components/aside/aside.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/asc-web-components/aside/aside.js b/packages/asc-web-components/aside/aside.js index 69489fea15..8ff72d7bf5 100644 --- a/packages/asc-web-components/aside/aside.js +++ b/packages/asc-web-components/aside/aside.js @@ -13,6 +13,7 @@ const Aside = React.memo((props) => { zIndex, className, contentPaddingBottom, + withoutBodyScroll, } = props; return ( @@ -23,7 +24,11 @@ const Aside = React.memo((props) => { contentPaddingBottom={contentPaddingBottom} className={`${className} not-selectable aside`} > - {children} + {withoutBodyScroll ? ( + children + ) : ( + {children} + )} ); }); @@ -40,10 +45,12 @@ Aside.propTypes = { PropTypes.arrayOf(PropTypes.node), PropTypes.node, ]), + withoutBodyScroll: PropTypes.bool, }; Aside.defaultProps = { scale: false, zIndex: 400, + withoutBodyScroll: false, }; export default Aside; From 25b59177d80410ccad6ab1b72693b79adde0a710 Mon Sep 17 00:00:00 2001 From: Viktor Fomin Date: Thu, 21 Oct 2021 15:05:13 +0300 Subject: [PATCH 31/39] Web: Files: disable aside scroll in Upload Panel --- .../Client/src/components/panels/UploadPanel/FileList.js | 2 +- .../Client/src/components/panels/UploadPanel/index.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js b/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js index ac8ed70f36..0416a1cfac 100644 --- a/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js +++ b/products/ASC.Files/Client/src/components/panels/UploadPanel/FileList.js @@ -18,7 +18,7 @@ const FileList = ({ uploadDataFiles }) => { -