forked from blisstown/campfire
hook up profile lock/bot icons
This commit is contained in:
parent
77665702b7
commit
d8efaccb30
3 changed files with 30 additions and 6 deletions
|
@ -85,17 +85,16 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
"profile": {
|
"profile": {
|
||||||
|
"locked": "This is a private account.",
|
||||||
|
"bot": "This is an automated account.",
|
||||||
|
"followers": "Followers",
|
||||||
|
"following": "Following",
|
||||||
"follow": "Follow",
|
"follow": "Follow",
|
||||||
"home_instance": "View on home instance",
|
"home_instance": "View on home instance",
|
||||||
"more": "More",
|
"more": "More",
|
||||||
|
|
||||||
"followers": "Followers",
|
|
||||||
"following": "Following",
|
|
||||||
|
|
||||||
"posts": "Posts",
|
"posts": "Posts",
|
||||||
"replies": "Replies",
|
"replies": "Replies",
|
||||||
"media": "Media",
|
"media": "Media",
|
||||||
|
|
||||||
"loading": "loading profile..."
|
"loading": "loading profile..."
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@ export function parseAccount(data) {
|
||||||
account.following_count = data.following_count;
|
account.following_count = data.following_count;
|
||||||
account.posts_count = data.statuses_count;
|
account.posts_count = data.statuses_count;
|
||||||
account.bio = data.note;
|
account.bio = data.note;
|
||||||
|
account.bot = data.bot;
|
||||||
|
account.locked = data.locked;
|
||||||
|
|
||||||
if (data.acct.includes('@'))
|
if (data.acct.includes('@'))
|
||||||
account.host = data.acct.split('@')[1];
|
account.host = data.acct.split('@')[1];
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
import Button from '@cf/ui/Button.svelte';
|
import Button from '@cf/ui/Button.svelte';
|
||||||
import HomeIcon from '@cf/icons/unlisted.svg';
|
import HomeIcon from '@cf/icons/unlisted.svg';
|
||||||
import MoreIcon from '@cf/icons/more.svg';
|
import MoreIcon from '@cf/icons/more.svg';
|
||||||
|
import LockIcon from '@cf/icons/lock.svg';
|
||||||
|
import BotIcon from '@cf/icons/bot.svg';
|
||||||
import Lang from '$lib/lang';
|
import Lang from '$lib/lang';
|
||||||
import * as api from '$lib/api.js';
|
import * as api from '$lib/api.js';
|
||||||
import { server, createServer } from '$lib/client/server.js';
|
import { server, createServer } from '$lib/client/server.js';
|
||||||
|
@ -64,7 +66,21 @@
|
||||||
<!-- svelte-ignore a11y-img-redundant-alt -->
|
<!-- svelte-ignore a11y-img-redundant-alt -->
|
||||||
<img src="{profile.avatar_url}" alt="">
|
<img src="{profile.avatar_url}" alt="">
|
||||||
<div class="profile-tag-names">
|
<div class="profile-tag-names">
|
||||||
<h1>{@html profile.rich_name}</h1>
|
<div class="profile-tag-display-name">
|
||||||
|
<h1>
|
||||||
|
{@html profile.rich_name}
|
||||||
|
{#if profile.locked}
|
||||||
|
<span title="{lang.string('profile.locked')}">
|
||||||
|
<LockIcon width="22px"/>
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
{#if profile.bot}
|
||||||
|
<span title="{lang.string('profile.bot')}">
|
||||||
|
<BotIcon width="22px"/>
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
<p>{profile.fqn}</p>
|
<p>{profile.fqn}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -152,6 +168,13 @@
|
||||||
font-size: 1.15rem
|
font-size: 1.15rem
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.profile-tag-names h1 :global(svg) {
|
||||||
|
height: 1.2em;
|
||||||
|
width: 1.2em;
|
||||||
|
margin: -1em -.1em 0 -.1em;
|
||||||
|
transform: translateY(.2em);
|
||||||
|
}
|
||||||
|
|
||||||
.profile-info {
|
.profile-info {
|
||||||
background-color: var(--bg-800);
|
background-color: var(--bg-800);
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue