Follow-up

This commit is contained in:
Alexander Zinchuk 2024-12-20 17:59:59 +01:00
parent 62c5884fbd
commit fd582054d7
2 changed files with 3 additions and 7 deletions

View File

@ -93,7 +93,7 @@
position: relative; position: relative;
&_interactive { &_interactive {
cursor: pointer; cursor: var(--custom-cursor, pointer);
transition: opacity 0.15s; transition: opacity 0.15s;
&:hover { &:hover {

View File

@ -84,7 +84,7 @@ const WebPage: FC<OwnProps> = ({
onCancelMediaTransfer, onCancelMediaTransfer,
isEditing, isEditing,
}) => { }) => {
const { openTelegramLink } = getActions(); const { openUrl, openTelegramLink } = getActions();
const webPage = getMessageWebPage(message); const webPage = getMessageWebPage(message);
const { isMobile } = useAppLayout(); const { isMobile } = useAppLayout();
// eslint-disable-next-line no-null/no-null // eslint-disable-next-line no-null/no-null
@ -150,10 +150,6 @@ const WebPage: FC<OwnProps> = ({
} }
const isMediaInteractive = (photo || video) && onMediaClick && !isSquarePhoto; const isMediaInteractive = (photo || video) && onMediaClick && !isSquarePhoto;
function handleTextClick() {
window.open(url, '_blank', 'noopener');
}
const className = buildClassName( const className = buildClassName(
'WebPage', 'WebPage',
inPreview && 'in-preview', inPreview && 'in-preview',
@ -200,7 +196,7 @@ const WebPage: FC<OwnProps> = ({
{isArticle && ( {isArticle && (
<div <div
className={buildClassName('WebPage-text', !inPreview && 'WebPage-text_interactive')} className={buildClassName('WebPage-text', !inPreview && 'WebPage-text_interactive')}
onClick={!inPreview ? handleTextClick : undefined} onClick={!inPreview ? () => openUrl({ url, shouldSkipModal: true }) : undefined}
> >
<SafeLink className="site-name" url={url} text={siteName || displayUrl} /> <SafeLink className="site-name" url={url} text={siteName || displayUrl} />
{!inPreview && title && ( {!inPreview && title && (