mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-29 20:43:38 +03:00
Add "verified" state for profile fields
This commit is contained in:
parent
d08848fff3
commit
db25770a31
1 changed files with 23 additions and 12 deletions
|
@ -7,6 +7,7 @@ import shortenNumber from '../utils/shorten-number';
|
|||
import store from '../utils/store';
|
||||
|
||||
import Avatar from './avatar';
|
||||
import Icon from './icon';
|
||||
import NameText from './name-text';
|
||||
|
||||
function Account({ account }) {
|
||||
|
@ -129,18 +130,28 @@ function Account({ account }) {
|
|||
__html: enhanceContent(note, { emojis }),
|
||||
}}
|
||||
/>
|
||||
<div class="profile-metadata">
|
||||
{fields.map(({ name, value }) => (
|
||||
<div class="profile-field" key={name}>
|
||||
<b>{name}</b>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: value,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
{fields?.length > 0 && (
|
||||
<div class="profile-metadata">
|
||||
{fields.map(({ name, value, verifiedAt }) => (
|
||||
<div
|
||||
class={`profile-field ${
|
||||
verifiedAt ? 'profile-verified' : ''
|
||||
}`}
|
||||
key={name}
|
||||
>
|
||||
<b>
|
||||
{name}{' '}
|
||||
{!!verifiedAt && <Icon icon="check-circle" size="s" />}
|
||||
</b>
|
||||
<p
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: value,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<p class="stats">
|
||||
<span>
|
||||
<b title={statusesCount}>{shortenNumber(statusesCount)}</b> Posts
|
||||
|
|
Loading…
Add table
Reference in a new issue