Client:Hiding badges__quickButtons.

This commit is contained in:
Vlada Gazizova 2024-08-01 14:50:00 +03:00
parent 948add3bf4
commit b93441d1f2
5 changed files with 51 additions and 34 deletions

View File

@ -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}

View File

@ -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);
}

View File

@ -213,7 +213,7 @@ const RecentRowDataComponent = (props) => {
) : (
<div />
)}
{quickButtonsColumnIsEnabled ? (
{/* {quickButtonsColumnIsEnabled ? (
<TableCell
style={
!quickButtonsColumnIsEnabled
@ -232,7 +232,7 @@ const RecentRowDataComponent = (props) => {
</TableCell>
) : (
<div />
)}
)} */}
</>
);
};

View File

@ -63,6 +63,10 @@ const RowDataComponent = (props) => {
const lastColumn = getLastColumn(tableStorageName);
console.log("lastColumn", lastColumn);
console.log("quickButtonsComponent", quickButtonsComponent);
console.log("sizeColumnIsEnabled", sizeColumnIsEnabled);
return (
<>
<TableCell
@ -84,6 +88,7 @@ const RowDataComponent = (props) => {
<StyledBadgesContainer showHotkeyBorder={showHotkeyBorder}>
{badgesComponent}
</StyledBadgesContainer>
{/* {lastColumn === "Name" ? quickButtonsComponent : <></>} */}
</TableCell>
{authorColumnIsEnabled ? (
@ -101,6 +106,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
{/* {lastColumn === "Author" ? quickButtonsComponent : <></>} */}
</TableCell>
) : (
<div />
@ -124,6 +130,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
{/* {lastColumn === "Created" ? quickButtonsComponent : <></>} */}
</TableCell>
) : (
<div />
@ -144,6 +151,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
{/* {lastColumn === "Modified" ? quickButtonsComponent : <></>} */}
</TableCell>
) : (
<div />
@ -164,6 +172,7 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
{/* {lastColumn === "Size" ? quickButtonsComponent : <></>} */}
</TableCell>
) : (
<div />
@ -186,11 +195,12 @@ const RowDataComponent = (props) => {
sideColor={theme.filesSection.tableView.row.sideColor}
{...props}
/>
{/* {lastColumn === "Type" ? quickButtonsComponent : <></>} */}
</TableCell>
) : (
<div />
)}
{quickButtonsColumnIsEnabled ? (
{/* {quickButtonsColumnIsEnabled ? (
<TableCell
style={
!quickButtonsColumnIsEnabled
@ -209,7 +219,7 @@ const RowDataComponent = (props) => {
</TableCell>
) : (
<div />
)}
)} */}
</>
);
};

View File

@ -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}
>
<div className="table-container_header-item">