Add verified badge to Notes to Self
This commit is contained in:
parent
371c73377c
commit
c571305d8a
9 changed files with 40 additions and 19 deletions
|
@ -143,4 +143,23 @@
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__official-badge {
|
||||||
|
background: url('../images/icons/v2/official-20.svg') no-repeat center;
|
||||||
|
display: inline-block;
|
||||||
|
height: 18px;
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-bottom: -4px;
|
||||||
|
width: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__official-badge__large {
|
||||||
|
background: url('../images/icons/v2/official-20.svg') no-repeat center;
|
||||||
|
display: inline-block;
|
||||||
|
height: 18px;
|
||||||
|
margin-left: 9px;
|
||||||
|
margin-bottom: -2px;
|
||||||
|
width: 18px;
|
||||||
|
scale: 1.3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,12 +180,4 @@
|
||||||
width: 12px;
|
width: 12px;
|
||||||
@include color-svg('../images/icons/v2/chevron-right-20.svg', $color-white);
|
@include color-svg('../images/icons/v2/chevron-right-20.svg', $color-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__signal-official {
|
|
||||||
background: url('../images/icons/v2/official-20.svg') no-repeat center;
|
|
||||||
display: inline-block;
|
|
||||||
height: 16px;
|
|
||||||
margin-left: 6px;
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ export type PropsType = {
|
||||||
contactNameColor?: ContactNameColorType;
|
contactNameColor?: ContactNameColorType;
|
||||||
firstName?: string;
|
firstName?: string;
|
||||||
isSignalConversation?: boolean;
|
isSignalConversation?: boolean;
|
||||||
|
isMe?: boolean;
|
||||||
module?: string;
|
module?: string;
|
||||||
preferFirstName?: boolean;
|
preferFirstName?: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
|
@ -21,6 +22,7 @@ export function ContactName({
|
||||||
contactNameColor,
|
contactNameColor,
|
||||||
firstName,
|
firstName,
|
||||||
isSignalConversation,
|
isSignalConversation,
|
||||||
|
isMe,
|
||||||
module,
|
module,
|
||||||
preferFirstName,
|
preferFirstName,
|
||||||
title,
|
title,
|
||||||
|
@ -43,8 +45,8 @@ export function ContactName({
|
||||||
dir="auto"
|
dir="auto"
|
||||||
>
|
>
|
||||||
<Emojify text={text} />
|
<Emojify text={text} />
|
||||||
{isSignalConversation && (
|
{(isSignalConversation || isMe) && (
|
||||||
<span className="StoryListItem__signal-official" />
|
<span className="ContactModal__official-badge" />
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
@ -177,6 +177,7 @@ export class ConversationHeader extends React.Component<PropsType, StateType> {
|
||||||
return (
|
return (
|
||||||
<div className="module-ConversationHeader__header__info__title">
|
<div className="module-ConversationHeader__header__info__title">
|
||||||
{i18n('noteToSelf')}
|
{i18n('noteToSelf')}
|
||||||
|
<span className="ContactModal__official-badge" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,6 +195,7 @@ export function ConversationHero({
|
||||||
title={title}
|
title={title}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{isMe && (<span className="ContactModal__official-badge__large" />)}
|
||||||
</h1>
|
</h1>
|
||||||
{about && !isMe && (
|
{about && !isMe && (
|
||||||
<div className="module-about__container">
|
<div className="module-about__container">
|
||||||
|
|
|
@ -107,6 +107,7 @@ export function ConversationDetailsHeader({
|
||||||
<div>
|
<div>
|
||||||
<div className={bem('title')}>
|
<div className={bem('title')}>
|
||||||
<Emojify text={isMe ? i18n('noteToSelf') : conversation.title} />
|
<Emojify text={isMe ? i18n('noteToSelf') : conversation.title} />
|
||||||
|
{isMe && (<span className="ContactModal__official-badge__large" />)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -76,9 +76,10 @@ export const ContactCheckbox: FunctionComponent<PropsType> = React.memo(
|
||||||
const disabled = Boolean(disabledReason);
|
const disabled = Boolean(disabledReason);
|
||||||
|
|
||||||
const headerName = isMe ? (
|
const headerName = isMe ? (
|
||||||
<span className={HEADER_CONTACT_NAME_CLASS_NAME}>
|
<ContactName module={HEADER_CONTACT_NAME_CLASS_NAME}
|
||||||
{i18n('noteToSelf')}
|
title={i18n('noteToSelf')}
|
||||||
</span>
|
isMe={isMe}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ContactName module={HEADER_CONTACT_NAME_CLASS_NAME} title={title} />
|
<ContactName module={HEADER_CONTACT_NAME_CLASS_NAME} title={title} />
|
||||||
);
|
);
|
||||||
|
|
|
@ -68,9 +68,11 @@ export const ContactListItem: FunctionComponent<PropsType> = React.memo(
|
||||||
uuid,
|
uuid,
|
||||||
}) {
|
}) {
|
||||||
const headerName = isMe ? (
|
const headerName = isMe ? (
|
||||||
<span className={HEADER_CONTACT_NAME_CLASS_NAME}>
|
<ContactName
|
||||||
{i18n('noteToSelf')}
|
isMe={isMe}
|
||||||
</span>
|
module={HEADER_CONTACT_NAME_CLASS_NAME}
|
||||||
|
title={i18n('noteToSelf')}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ContactName
|
<ContactName
|
||||||
isSignalConversation={isSignalConversation({ id, uuid })}
|
isSignalConversation={isSignalConversation({ id, uuid })}
|
||||||
|
|
|
@ -106,9 +106,11 @@ export const ConversationListItem: FunctionComponent<Props> = React.memo(
|
||||||
const headerName = (
|
const headerName = (
|
||||||
<>
|
<>
|
||||||
{isMe ? (
|
{isMe ? (
|
||||||
<span className={HEADER_CONTACT_NAME_CLASS_NAME}>
|
<ContactName
|
||||||
{i18n('noteToSelf')}
|
module={HEADER_CONTACT_NAME_CLASS_NAME}
|
||||||
</span>
|
isMe={isMe}
|
||||||
|
title={i18n('noteToSelf')}
|
||||||
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ContactName
|
<ContactName
|
||||||
module={HEADER_CONTACT_NAME_CLASS_NAME}
|
module={HEADER_CONTACT_NAME_CLASS_NAME}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue