mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Forgot to add this part
This commit is contained in:
parent
21f0149e22
commit
1d0067e6e5
2 changed files with 22 additions and 4 deletions
|
@ -517,10 +517,20 @@
|
|||
color: $color-gray-60;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.module-message__metadata__public {
|
||||
font-size: 11px;
|
||||
line-height: 16px;
|
||||
letter-spacing: 0.3px;
|
||||
color: $color-gray-60;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.module-message__metadata__date--incoming,
|
||||
.module-message__metadata__p2p--incoming {
|
||||
color: $color-white-08;
|
||||
}
|
||||
.module-message__metadata__public--incoming {
|
||||
color: $color-white-08;
|
||||
}
|
||||
.module-message__metadata__date--with-image-no-caption {
|
||||
color: $color-white;
|
||||
}
|
||||
|
@ -528,6 +538,9 @@
|
|||
.module-message__metadata__p2p {
|
||||
font-weight: bold;
|
||||
}
|
||||
.module-message__metadata__public {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.module-message__metadata__spacer {
|
||||
flex-grow: 1;
|
||||
|
|
|
@ -86,6 +86,7 @@ export interface Props {
|
|||
expirationLength?: number;
|
||||
expirationTimestamp?: number;
|
||||
isP2p?: boolean;
|
||||
isPublic?: boolean;
|
||||
|
||||
onClickAttachment?: (attachment: AttachmentType) => void;
|
||||
onClickLinkPreview?: (url: string) => void;
|
||||
|
@ -203,6 +204,7 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
textPending,
|
||||
timestamp,
|
||||
isP2p,
|
||||
isPublic,
|
||||
} = this.props;
|
||||
|
||||
if (collapseMetadata) {
|
||||
|
@ -212,6 +214,9 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
const isShowingImage = this.isShowingImage();
|
||||
const withImageNoCaption = Boolean(!text && isShowingImage);
|
||||
const showError = status === 'error' && direction === 'outgoing';
|
||||
const hasBadge = isP2p || isPublic;
|
||||
const badgeText = isPublic ? 'Public' : isP2p ? 'P2p' : '';
|
||||
const badgeType = badgeText.toLowerCase();
|
||||
|
||||
return (
|
||||
<div
|
||||
|
@ -244,14 +249,14 @@ export class Message extends React.PureComponent<Props, State> {
|
|||
module="module-message__metadata__date"
|
||||
/>
|
||||
)}
|
||||
{isP2p ? (
|
||||
{hasBadge ? (
|
||||
<span
|
||||
className={classNames(
|
||||
'module-message__metadata__p2p',
|
||||
`module-message__metadata__p2p--${direction}`
|
||||
`module-message__metadata__${badgeType}`,
|
||||
`module-message__metadata__${badgeType}--${direction}`
|
||||
)}
|
||||
>
|
||||
• P2P
|
||||
• ${badgeText}
|
||||
</span>
|
||||
) : null}
|
||||
{expirationLength && expirationTimestamp ? (
|
||||
|
|
Loading…
Reference in a new issue