2018-03-31 23:51:18 +00:00
|
|
|
<div class="account-profile-avatar">
|
2018-05-02 00:05:36 +00:00
|
|
|
<Avatar {account} size="big" />
|
2018-03-31 23:51:18 +00:00
|
|
|
</div>
|
|
|
|
<div class="account-profile-name">
|
2018-08-24 01:41:43 +00:00
|
|
|
<ExternalLink
|
|
|
|
className="account-profile-name-link"
|
|
|
|
href={account.url}
|
|
|
|
showIcon="true"
|
|
|
|
normalIconColor="true"
|
|
|
|
ariaLabel="{accessibleName} (opens in new window)">
|
2018-08-19 22:23:40 +00:00
|
|
|
<AccountDisplayName {account} />
|
2018-03-31 23:51:18 +00:00
|
|
|
</ExternalLink>
|
|
|
|
</div>
|
2018-08-24 01:41:43 +00:00
|
|
|
{#if label}
|
|
|
|
<Label {label} className="account-profile-label" />
|
|
|
|
{/if}
|
2018-03-31 23:51:18 +00:00
|
|
|
<div class="account-profile-username">
|
2018-05-02 00:05:36 +00:00
|
|
|
{'@' + account.acct}
|
2018-03-31 23:51:18 +00:00
|
|
|
</div>
|
|
|
|
<div class="account-profile-followed-by">
|
2018-05-02 00:05:36 +00:00
|
|
|
{#if relationship && relationship.blocking}
|
2018-04-15 01:47:55 +00:00
|
|
|
<span class="account-profile-followed-by-span">Blocked</span>
|
2018-05-02 00:05:36 +00:00
|
|
|
{:elseif relationship && relationship.followed_by}
|
2018-03-31 23:51:18 +00:00
|
|
|
<span class="account-profile-followed-by-span">Follows you</span>
|
2018-05-02 00:05:36 +00:00
|
|
|
{/if}
|
2018-03-31 23:51:18 +00:00
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.account-profile-followed-by {
|
|
|
|
grid-area: followed-by;
|
|
|
|
align-self: center;
|
|
|
|
text-transform: uppercase;
|
|
|
|
color: var(--deemphasized-text-color);
|
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
|
|
|
.account-profile-followed-by-span {
|
|
|
|
background: rgba(30, 30, 30, 0.2);
|
|
|
|
border-radius: 4px;
|
|
|
|
padding: 3px 5px;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
.account-profile-avatar {
|
|
|
|
grid-area: avatar;
|
|
|
|
}
|
|
|
|
|
|
|
|
.account-profile-username {
|
|
|
|
grid-area: username;
|
|
|
|
color: var(--deemphasized-text-color);
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.account-profile-name {
|
|
|
|
grid-area: name;
|
|
|
|
font-size: 1.5em;
|
|
|
|
align-self: center;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
min-width: 0;
|
|
|
|
}
|
2018-08-24 01:41:43 +00:00
|
|
|
|
|
|
|
:global(.account-profile-name-link) {
|
2018-03-31 23:51:18 +00:00
|
|
|
color: var(--body-text-color);
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2018-08-24 01:41:43 +00:00
|
|
|
|
|
|
|
:global(.account-profile-name-link:hover) {
|
2018-03-31 23:51:18 +00:00
|
|
|
color: var(--body-text-color);
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
|
2018-08-24 01:41:43 +00:00
|
|
|
:global(.account-profile-label) {
|
|
|
|
grid-area: label;
|
|
|
|
justify-content: left !important;
|
|
|
|
}
|
|
|
|
|
2018-03-31 23:51:18 +00:00
|
|
|
@media (max-width: 767px) {
|
|
|
|
.account-profile-name {
|
|
|
|
font-size: 1.3em;
|
|
|
|
}
|
|
|
|
.account-profile-username {
|
|
|
|
font-size: 1.1em;
|
|
|
|
}
|
|
|
|
.account-profile-name, .account-profile-username {
|
|
|
|
align-self: flex-start;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
import Avatar from '../Avatar.html'
|
|
|
|
import ExternalLink from '../ExternalLink.html'
|
2018-08-19 22:23:40 +00:00
|
|
|
import AccountDisplayName from '../profile/AccountDisplayName.html'
|
2018-08-20 02:31:54 +00:00
|
|
|
import { removeEmoji } from '../../_utils/removeEmoji'
|
|
|
|
import { store } from '../../_store/store'
|
2018-08-24 01:41:43 +00:00
|
|
|
import Label from '../Label.html'
|
2018-03-31 23:51:18 +00:00
|
|
|
|
|
|
|
export default {
|
2018-08-20 02:31:54 +00:00
|
|
|
store: () => store,
|
|
|
|
computed: {
|
|
|
|
emojis: ({ account }) => (account.emojis || []),
|
|
|
|
displayName: ({ account }) => account.display_name || account.username,
|
|
|
|
accessibleName: ({ displayName, emojis, $omitEmojiInDisplayNames }) => {
|
|
|
|
if ($omitEmojiInDisplayNames) {
|
|
|
|
return removeEmoji(displayName, emojis) || displayName
|
|
|
|
}
|
|
|
|
return displayName
|
2018-08-24 01:41:43 +00:00
|
|
|
},
|
|
|
|
bot: ({ account }) => !!account.bot,
|
|
|
|
label: ({ bot }) => bot ? 'bot' : ''
|
2018-08-20 02:31:54 +00:00
|
|
|
},
|
2018-03-31 23:51:18 +00:00
|
|
|
components: {
|
|
|
|
Avatar,
|
2018-08-19 22:23:40 +00:00
|
|
|
ExternalLink,
|
2018-08-24 01:41:43 +00:00
|
|
|
AccountDisplayName,
|
|
|
|
Label
|
2018-03-31 23:51:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|