Message: Replace "Forwarded message" text with icons
This commit is contained in:
parent
85ee6f2031
commit
fe0aa60bf9
@ -674,8 +674,11 @@
|
|||||||
--border-top-right-radius: 0;
|
--border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-forwarded .content-inner .message-title {
|
&.is-forwarded {
|
||||||
margin-bottom: 0.25rem;
|
.message-title .icon {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-right: 0.1875rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,9 @@ import type {
|
|||||||
ApiMessageOutgoingStatus,
|
ApiMessageOutgoingStatus,
|
||||||
ApiReaction,
|
ApiReaction,
|
||||||
ApiStickerSet,
|
ApiStickerSet,
|
||||||
ApiTypeStory,
|
|
||||||
ApiThreadInfo,
|
ApiThreadInfo,
|
||||||
ApiTopic,
|
ApiTopic,
|
||||||
|
ApiTypeStory,
|
||||||
ApiUser,
|
ApiUser,
|
||||||
ApiUsername,
|
ApiUsername,
|
||||||
} from '../../../api/types';
|
} from '../../../api/types';
|
||||||
@ -57,7 +57,6 @@ import {
|
|||||||
selectMessageIdsByGroupId,
|
selectMessageIdsByGroupId,
|
||||||
selectOutgoingStatus,
|
selectOutgoingStatus,
|
||||||
selectPerformanceSettingsValue,
|
selectPerformanceSettingsValue,
|
||||||
selectUserStory,
|
|
||||||
selectReplySender,
|
selectReplySender,
|
||||||
selectRequestedChatTranslationLanguage,
|
selectRequestedChatTranslationLanguage,
|
||||||
selectRequestedMessageTranslationLanguage,
|
selectRequestedMessageTranslationLanguage,
|
||||||
@ -71,6 +70,7 @@ import {
|
|||||||
selectTopicFromMessage,
|
selectTopicFromMessage,
|
||||||
selectUploadProgress,
|
selectUploadProgress,
|
||||||
selectUser,
|
selectUser,
|
||||||
|
selectUserStory,
|
||||||
} from '../../../global/selectors';
|
} from '../../../global/selectors';
|
||||||
import {
|
import {
|
||||||
areReactionsEmpty,
|
areReactionsEmpty,
|
||||||
@ -936,7 +936,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={className} onDoubleClick={handleContentDoubleClick} dir="auto">
|
<div className={className} onDoubleClick={handleContentDoubleClick} dir="auto">
|
||||||
{renderSenderName()}
|
{!asForwarded && renderSenderName()}
|
||||||
{hasSubheader && (
|
{hasSubheader && (
|
||||||
<div className="message-subheader">
|
<div className="message-subheader">
|
||||||
{hasTopicChip && (
|
{hasTopicChip && (
|
||||||
@ -1229,13 +1229,20 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="message-title" dir="ltr">
|
<div className="message-title" dir="ltr">
|
||||||
{senderTitle ? (
|
{(senderTitle || asForwarded) ? (
|
||||||
<span
|
<span
|
||||||
className={buildClassName('message-title-name interactive', senderColor)}
|
className={buildClassName(
|
||||||
|
'message-title-name',
|
||||||
|
forwardInfo?.hiddenUserName ? 'sender-hidden' : 'interactive',
|
||||||
|
senderColor,
|
||||||
|
)}
|
||||||
onClick={handleSenderClick}
|
onClick={handleSenderClick}
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
>
|
>
|
||||||
{renderText(senderTitle)}
|
{asForwarded && (
|
||||||
|
<i className={`icon ${forwardInfo?.hiddenUserName ? 'icon-forward' : 'icon-share-filled'}`} />
|
||||||
|
)}
|
||||||
|
{senderTitle ? renderText(senderTitle) : (asForwarded ? NBSP : undefined)}
|
||||||
{!asForwarded && senderEmojiStatus && (
|
{!asForwarded && senderEmojiStatus && (
|
||||||
<CustomEmoji
|
<CustomEmoji
|
||||||
documentId={senderEmojiStatus.documentId}
|
documentId={senderEmojiStatus.documentId}
|
||||||
@ -1331,10 +1338,10 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
{asForwarded && !isInDocumentGroupNotFirst && (
|
{asForwarded && !isInDocumentGroupNotFirst && (
|
||||||
<div className="message-title">
|
<>
|
||||||
{lang(storyData ? 'ForwardedStory' : 'ForwardedMessage')}
|
{renderSenderName()}
|
||||||
{forwardAuthor && <span className="admin-title" dir="auto">{forwardAuthor}</span>}
|
{forwardAuthor && <span className="admin-title" dir="auto">{forwardAuthor}</span>}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
{renderContent()}
|
{renderContent()}
|
||||||
{!isInDocumentGroupNotLast && metaPosition === 'standalone' && !isStoryMention && renderReactionsAndMeta()}
|
{!isInDocumentGroupNotLast && metaPosition === 'standalone' && !isStoryMention && renderReactionsAndMeta()}
|
||||||
|
|||||||
@ -276,6 +276,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sender-hidden {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
@for $i from 1 through 8 {
|
@for $i from 1 through 8 {
|
||||||
& > .color-#{$i} {
|
& > .color-#{$i} {
|
||||||
color: var(--color-user-#{$i});
|
color: var(--color-user-#{$i});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user