From 44b15949b7664d89d394a363fe533fcacb8c12f7 Mon Sep 17 00:00:00 2001 From: Aleksandr Lushkin Date: Wed, 17 Apr 2024 14:42:31 +0200 Subject: [PATCH 1/2] Fix Bug 67466 - Accounts: Groups. Return empty screen --- .../AccountsBody/InsideGroup/TableView/TableContainer.js | 6 +++++- packages/client/src/store/GroupsStore.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableContainer.js b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableContainer.js index 2cbb48e4b6..53519efb12 100644 --- a/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableContainer.js +++ b/packages/client/src/pages/Home/Section/AccountsBody/InsideGroup/TableView/TableContainer.js @@ -168,7 +168,11 @@ const Table = ({ const columnStorageName = `${COLUMNS_SIZE}=${userId}`; const columnInfoPanelStorageName = `${INFO_PANEL_COLUMNS_SIZE}=${userId}`; - return ( + const isEmptyPage = !insideGroupIsLoading && peopleList.length === 0; + + return isEmptyPage ? ( + + ) : ( { + this.insideGroupIsLoading = value; + }; + setInsideGroupBackUrl = (url: string) => { this.insideGroupBackUrl = url; }; @@ -277,6 +281,8 @@ class GroupsStore { updateFilter = false, withFilterLocalStorage = false, ) => { + this.setInsideGroupLoading(true); + const filterData = filter ? filter.clone() : AccountsFilter.getDefault(); filterData.group = groupId; @@ -316,6 +322,8 @@ class GroupsStore { this.setInsideGroupFilterParams(filterData); } + this.setInsideGroupLoading(false); + return Promise.resolve(filteredMembersRes.items); }; From 92a8848d0fc5f642b78306f64f7e2e606c6cd2d0 Mon Sep 17 00:00:00 2001 From: gopienkonikita Date: Wed, 17 Apr 2024 16:37:10 +0300 Subject: [PATCH 2/2] Web: Files: Selection-area: fixed tile selection --- packages/client/src/store/FilesStore.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/client/src/store/FilesStore.js b/packages/client/src/store/FilesStore.js index 469dc5964a..2d9d04920c 100644 --- a/packages/client/src/store/FilesStore.js +++ b/packages/client/src/store/FilesStore.js @@ -3962,11 +3962,21 @@ class FilesStore { const tileGap = isDesktopView ? 16 : 14; const minTileWidth = 216 + tileGap; const body = document.getElementById("section"); - const tileContainer = document.getElementById("tileContainer"); - const sectionPadding = - body?.offsetWidth - tileContainer?.clientWidth - tileGap + 1; + const elem = document.getElementsByClassName("section-wrapper-content")[0]; + let containerWidth = 0; + if (elem) { + const elemPadding = window + .getComputedStyle(elem) + ?.getPropertyValue("padding"); + containerWidth = + elem?.clientWidth - + elemPadding.split("px")[1] - + elemPadding.split("px")[3]; + } + + const sectionPadding = body?.offsetWidth - containerWidth - tileGap + 1; const sectionWidth = body ? body.offsetWidth - sectionPadding : 0; return Math.floor(sectionWidth / minTileWidth);