From b93441d1f2638c288fd7c61311c44982950f5f27 Mon Sep 17 00:00:00 2001 From: Vlada Gazizova <94864088+gazizova-vlada@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:50:00 +0300 Subject: [PATCH] Client:Hiding badges__quickButtons. --- .../Section/Body/TableView/TableContainer.js | 7 +++ .../Section/Body/TableView/TableHeader.js | 56 +++++++++---------- .../TableView/sub-components/RecentRowData.js | 4 +- .../Body/TableView/sub-components/RowData.js | 14 ++++- .../table/sub-components/TableHeaderCell.tsx | 4 +- 5 files changed, 51 insertions(+), 34 deletions(-) diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js index 6dbf73b5e7..e040836ea5 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/TableContainer.js @@ -50,6 +50,13 @@ const contextCss = css` `; const StyledTableContainer = styled(TableContainer)` + .badges__quickButtons { + padding-left: 16px; + display: flex; + flex-grow: 2; + justify-content: flex-end; + } + .table-row-selected { .table-container_file-name-cell { ${fileNameCss} diff --git a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js index 76b188ceb9..8a21277f30 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/TableHeader.js @@ -109,13 +109,13 @@ class FilesTableHeader extends React.Component { onChange: this.onColumnChange, onClick: this.onRoomsFilter, }, - { - key: "QuickButtons", - title: "", - enable: this.props.roomColumnQuickButtonsIsEnabled, - defaultSize: 52, - resizable: false, - }, + // { + // key: "QuickButtons", + // title: "", + // enable: this.props.roomColumnQuickButtonsIsEnabled, + // defaultSize: 52, + // resizable: false, + // }, ]; showStorageInfo && @@ -199,13 +199,13 @@ class FilesTableHeader extends React.Component { // onClick: this.onFilter, onChange: this.onColumnChange, }, - { - key: "QuickButtons", - title: "", - enable: this.props.quickButtonsColumnIsEnabled, - defaultSize: 52, - resizable: false, - }, + // { + // key: "QuickButtons", + // title: "", + // enable: this.props.quickButtonsColumnIsEnabled, + // defaultSize: 52, + // resizable: false, + // }, ]; defaultColumns.push(...columns); } else if (isRecentTab) { @@ -278,13 +278,13 @@ class FilesTableHeader extends React.Component { // onClick: this.onFilter, onChange: this.onColumnChange, }, - { - key: "QuickButtons", - title: "", - enable: this.props.quickButtonsColumnIsEnabled, - defaultSize: 52, - resizable: false, - }, + // { + // key: "QuickButtons", + // title: "", + // enable: this.props.quickButtonsColumnIsEnabled, + // defaultSize: 52, + // resizable: false, + // }, ]; defaultColumns.push(...columns); } else { @@ -348,13 +348,13 @@ class FilesTableHeader extends React.Component { // onClick: this.onFilter, onChange: this.onColumnChange, }, - { - key: "QuickButtons", - title: "", - enable: this.props.quickButtonsColumnIsEnabled, - defaultSize: 52, - resizable: false, - }, + // { + // key: "QuickButtons", + // title: "", + // enable: this.props.quickButtonsColumnIsEnabled, + // defaultSize: 52, + // resizable: false, + // }, ]; defaultColumns.push(...columns); } diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js index b8af6e6856..945c285056 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RecentRowData.js @@ -213,7 +213,7 @@ const RecentRowDataComponent = (props) => { ) : (
)} - {quickButtonsColumnIsEnabled ? ( + {/* {quickButtonsColumnIsEnabled ? ( { ) : (
- )} + )} */} ); }; diff --git a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js index 65d6583162..60b94bfbe1 100644 --- a/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js +++ b/packages/client/src/pages/Home/Section/Body/TableView/sub-components/RowData.js @@ -63,6 +63,10 @@ const RowDataComponent = (props) => { const lastColumn = getLastColumn(tableStorageName); + console.log("lastColumn", lastColumn); + console.log("quickButtonsComponent", quickButtonsComponent); + console.log("sizeColumnIsEnabled", sizeColumnIsEnabled); + return ( <> { {badgesComponent} + {/* {lastColumn === "Name" ? quickButtonsComponent : <>} */} {authorColumnIsEnabled ? ( @@ -101,6 +106,7 @@ const RowDataComponent = (props) => { sideColor={theme.filesSection.tableView.row.sideColor} {...props} /> + {/* {lastColumn === "Author" ? quickButtonsComponent : <>} */} ) : (
@@ -124,6 +130,7 @@ const RowDataComponent = (props) => { sideColor={theme.filesSection.tableView.row.sideColor} {...props} /> + {/* {lastColumn === "Created" ? quickButtonsComponent : <>} */} ) : (
@@ -144,6 +151,7 @@ const RowDataComponent = (props) => { sideColor={theme.filesSection.tableView.row.sideColor} {...props} /> + {/* {lastColumn === "Modified" ? quickButtonsComponent : <>} */} ) : (
@@ -164,6 +172,7 @@ const RowDataComponent = (props) => { sideColor={theme.filesSection.tableView.row.sideColor} {...props} /> + {/* {lastColumn === "Size" ? quickButtonsComponent : <>} */} ) : (
@@ -186,11 +195,12 @@ const RowDataComponent = (props) => { sideColor={theme.filesSection.tableView.row.sideColor} {...props} /> + {/* {lastColumn === "Type" ? quickButtonsComponent : <>} */} ) : (
)} - {quickButtonsColumnIsEnabled ? ( + {/* {quickButtonsColumnIsEnabled ? ( { ) : (
- )} + )} */} ); }; diff --git a/packages/shared/components/table/sub-components/TableHeaderCell.tsx b/packages/shared/components/table/sub-components/TableHeaderCell.tsx index a22a18ed3c..bfae281ca4 100644 --- a/packages/shared/components/table/sub-components/TableHeaderCell.tsx +++ b/packages/shared/components/table/sub-components/TableHeaderCell.tsx @@ -82,7 +82,7 @@ const TableHeaderCell = ({ data-default={isDefault} data-enable={enable} data-min-width={minWidth} - data-default-size={defaultSize} + // data-default-size={defaultSize} sortingVisible={sortingVisible} ref={tagRef} > @@ -121,7 +121,7 @@ const TableHeaderCell = ({ data-enable={enable} data-default={isDefault} data-min-width={minWidth} - data-default-size={defaultSize} + // data-default-size={defaultSize} sortingVisible={sortingVisible} >