Merge branch 'develop' into refactoring/global-colors

This commit is contained in:
Viktor Fomin 2024-06-25 16:36:22 +03:00
commit d6a674d930
5 changed files with 57 additions and 25 deletions

View File

@ -23,9 +23,10 @@
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
import { useMemo } from "react";
import { inject } from "mobx-react";
import { withTranslation } from "react-i18next";
import { decode } from "he";
import { Avatar } from "@docspace/shared/components/avatar";
import { Text } from "@docspace/shared/components/text";
@ -39,7 +40,10 @@ const ChangeRoomOwner = ({
onOwnerChange,
currentColorScheme,
}) => {
const userName = roomOwner.displayName ?? roomOwner.label;
const userName = useMemo(
() => decode(roomOwner.displayName ?? roomOwner.label),
[roomOwner.displayName, roomOwner.label],
);
return (
<Styled.ChangeRoomOwner>

View File

@ -75,6 +75,10 @@ const StyledTableRow = styled(TableRow)`
margin-left: 8px;
`}
}
.remove-cell {
justify-content: flex-end;
}
`;
StyledTableRow.defaultProps = { theme: Base };
@ -138,15 +142,13 @@ const SessionsTableRow = (props) => {
</TableCell>
{showRemoveIcon && (
<TableCell>
<Box style={{ marginLeft: "8px" }}>
<IconButton
size={20}
iconName={RemoveSessionSvgUrl}
isClickable
onClick={onRemoveClick}
/>
</Box>
<TableCell className="remove-cell">
<IconButton
size={20}
iconName={RemoveSessionSvgUrl}
isClickable
onClick={onRemoveClick}
/>
</TableCell>
)}
</StyledTableRow>

View File

@ -280,16 +280,27 @@ const VersionRow = (props) => {
>
{versionDate}
</Link>
<Link
onClick={onUserClick}
fontWeight={600}
fontSize="14px"
title={title}
isTextOverflow={true}
className="version-link-file"
>
{title}
</Link>
{info.updatedBy?.isAnonim ? (
<Text
fontWeight={600}
color={theme.filesVersionHistory.color}
fontSize="14px"
title={title}
>
{title}
</Text>
) : (
<Link
onClick={onUserClick}
fontWeight={600}
fontSize="14px"
title={title}
isTextOverflow={true}
className="version-link-file"
>
{title}
</Link>
)}
</Box>
{/*<Text

View File

@ -338,6 +338,9 @@ class TableHeader extends React.Component<
const storageSize =
!resetColumnsSize && localStorage.getItem(columnStorageName);
const storageInfoSize =
!resetColumnsSize && localStorage.getItem(columnInfoPanelStorageName);
// TODO: If defaultSize(75px) is less than defaultMinColumnSize(110px) the calculations work correctly
const defaultSize =
columns.find((col) => col.defaultSize && col.enable)?.defaultSize || 0;
@ -368,6 +371,10 @@ class TableHeader extends React.Component<
? storageSize.split(" ")
: containerGridTemplateColumns;
const tableInfoContainer = storageInfoSize
? storageInfoSize.split(" ")
: containerGridTemplateColumns;
const { hideColumns } = this.state;
if (
@ -397,9 +404,17 @@ class TableHeader extends React.Component<
.map((column) => getSubstring(column))
.reduce((x, y) => x + y);
const defaultInfoWidth = tableInfoContainer
.map((column) => getSubstring(column))
.reduce((x, y) => x + y);
const oldWidth = defaultWidth - defaultSize - settingsSize;
if (Math.round(defaultWidth) !== Math.round(containerWidth) && !isResized) {
const isDifferentWindowSize = infoPanelVisible
? Math.round(defaultInfoWidth) !== Math.round(containerWidth)
: Math.round(defaultWidth) !== Math.round(containerWidth);
if (isDifferentWindowSize && !isResized) {
if (infoPanelVisible) localStorage.removeItem(columnInfoPanelStorageName);
else localStorage.removeItem(columnStorageName);
this.onResize(true);

View File

@ -584,9 +584,9 @@ const Dark: TTheme = {
},
scrollbar: {
bgColor: "rgba(20, 20, 20, 0.4)",
hoverBgColor: "rgba(20, 20, 20, 0.64)",
pressBgColor: "rgba(20, 20, 20, 0.8)",
bgColor: "rgba(136, 136, 136, 0.4)",
hoverBgColor: "rgba(136, 136, 136, 0.64)",
pressBgColor: "rgba(136, 136, 136, 0.8)",
paddingInlineEnd: "17px !important",
paddingInlineEndMobile: "8px !important",
},