mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-19 17:46:33 +00:00
badge style
This commit is contained in:
parent
071f071484
commit
0ae6ed872d
@ -10,9 +10,8 @@ export default function Badge(props): JSX.Element | null {
|
||||
const hexAddress = Key.toNostrHexAddress(props.pub);
|
||||
if (hexAddress === myPub) {
|
||||
return (
|
||||
<span class="badge first tooltip">
|
||||
<span class="mx-2 text-iris-blue tooltip" data-tip={t('you')}>
|
||||
{Icons.checkmark}
|
||||
<span class="tooltiptext right">{t('you')}</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
@ -22,21 +21,17 @@ export default function Badge(props): JSX.Element | null {
|
||||
const following = SocialNetwork.followedByUser.get(myPub)?.has(hexAddress);
|
||||
if (following) {
|
||||
return (
|
||||
<span class="badge first tooltip">
|
||||
<span class="mx-2 text-iris-blue tooltip" data-tip={t('following')}>
|
||||
{Icons.checkmark}
|
||||
<span class="tooltiptext right">{t('following')}</span>
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
const count = SocialNetwork.followedByFriendsCount(hexAddress);
|
||||
if (count > 0) {
|
||||
const className = count > 10 ? 'second' : 'third';
|
||||
const className = count > 10 ? 'text-iris-orange' : '';
|
||||
return (
|
||||
<span class={`badge ${className} tooltip`}>
|
||||
<span class={`${className} tooltip mx-2`} data-tip={`${count} ${t('friends_following')}`}>
|
||||
{Icons.checkmark}
|
||||
<span class="tooltiptext right">
|
||||
{count} {t('friends_following')}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
} else {
|
||||
|
@ -213,7 +213,9 @@ class Profile extends View {
|
||||
<${Name} pub=${this.state.hexPub} />
|
||||
</span>
|
||||
${this.state.nip05
|
||||
? html`<br /><small class="positive">${this.state.nip05.replace(/^_@/, '')}</small>`
|
||||
? html`<br /><small class="text-iris-green"
|
||||
>${this.state.nip05.replace(/^_@/, '')}</small
|
||||
>`
|
||||
: ''}
|
||||
</div>
|
||||
<div class="profile-about">
|
||||
|
Loading…
Reference in New Issue
Block a user