Merge branch 'release/rc-v1.2.0' into feature/dialog-create-file

This commit is contained in:
Alexey Safronov 2023-01-09 15:47:19 +03:00
commit cf2cb21fa1
4 changed files with 16 additions and 5 deletions

View File

@ -389,6 +389,7 @@ const PeopleTableRow = (props) => {
color={sideInfoColor}
onClick={onEmailClick}
isTextOverflow
enableUserSelect
>
{email}
</Link>

View File

@ -329,9 +329,9 @@ class FilesStore {
this.files[foundIndex].fileStatus & ~FileStatus.IsEditing
);
if (typeof id == "string") {
this.getFileInfo(id);
} else {
this.getFileInfo(id);
if (typeof id !== "string") {
this.createThumbnail(id);
}
});

View File

@ -3,7 +3,13 @@ import PropTypes from "prop-types";
import StyledText from "./styled-link";
// eslint-disable-next-line react/display-name
const Link = ({ isTextOverflow, children, noHover, ...rest }) => {
const Link = ({
isTextOverflow,
children,
noHover,
enableUserSelect,
...rest
}) => {
// console.log("Link render", rest);
return (
@ -12,6 +18,7 @@ const Link = ({ isTextOverflow, children, noHover, ...rest }) => {
isTextOverflow={isTextOverflow}
noHover={noHover}
truncate={isTextOverflow}
enableUserSelect={enableUserSelect}
{...rest}
>
{children}
@ -57,6 +64,8 @@ Link.propTypes = {
title: PropTypes.string,
/** Type of link */
type: PropTypes.oneOf(["action", "page"]),
enableUserSelect: PropTypes.bool,
};
Link.defaultProps = {
@ -71,6 +80,7 @@ Link.defaultProps = {
rel: "noopener noreferrer",
tabIndex: -1,
type: "page",
enableUserSelect: false,
};
export default Link;

View File

@ -22,7 +22,7 @@ const PureText = ({ type, color, ...props }) => <Text {...props} />;
const StyledText = styled(PureText)`
text-decoration: ${(props) => props.theme.link.textDecoration};
${NoUserSelect}
${(props) => !props.enableUserSelect && NoUserSelect}
cursor: ${(props) => props.theme.link.cursor};
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);