2020-10-17 14:12:00 +03:00
|
|
|
<template>
|
2023-05-08 04:32:08 +03:00
|
|
|
<div class="_panel" :class="$style.root">
|
|
|
|
<div :class="$style.banner" :style="user.bannerUrl ? `background-image: url(${user.bannerUrl})` : ''"></div>
|
|
|
|
<MkAvatar :class="$style.avatar" :user="user" indicator/>
|
|
|
|
<div :class="$style.title">
|
|
|
|
<MkA :class="$style.name" :to="userPage(user)"><MkUserName :user="user" :nowrap="false"/></MkA>
|
|
|
|
<p :class="$style.username"><MkAcct :user="user"/></p>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
2023-05-08 04:32:08 +03:00
|
|
|
<span v-if="$i && $i.id !== user.id && user.isFollowed" :class="$style.followed">{{ i18n.ts.followsYou }}</span>
|
|
|
|
<div :class="$style.description">
|
2021-11-19 12:36:12 +02:00
|
|
|
<div v-if="user.description" class="mfm">
|
2022-12-29 03:14:44 +02:00
|
|
|
<Mfm :text="user.description" :author="user" :i="$i"/>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
2022-07-20 16:24:26 +03:00
|
|
|
<span v-else style="opacity: 0.7;">{{ i18n.ts.noAccountDescription }}</span>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
2023-05-08 04:32:08 +03:00
|
|
|
<div :class="$style.status">
|
|
|
|
<div :class="$style.statusItem">
|
|
|
|
<p :class="$style.statusItemLabel">{{ i18n.ts.notes }}</p><span :class="$style.statusItemValue">{{ user.notesCount }}</span>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
2023-05-08 04:32:08 +03:00
|
|
|
<div :class="$style.statusItem">
|
|
|
|
<p :class="$style.statusItemLabel">{{ i18n.ts.following }}</p><span :class="$style.statusItemValue">{{ user.followingCount }}</span>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
2023-05-08 04:32:08 +03:00
|
|
|
<div :class="$style.statusItem">
|
|
|
|
<p :class="$style.statusItemLabel">{{ i18n.ts.followers }}</p><span :class="$style.statusItemValue">{{ user.followersCount }}</span>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-05-08 04:32:08 +03:00
|
|
|
<MkFollowButton v-if="$i && user.id != $i.id" :class="$style.follow" :user="user" mini/>
|
2020-10-17 14:12:00 +03:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-07 08:02:25 +02:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import * as misskey from 'misskey-js';
|
2022-08-30 18:24:33 +03:00
|
|
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
2021-11-11 19:02:25 +02:00
|
|
|
import { userPage } from '@/filters/user';
|
2022-07-20 16:24:26 +03:00
|
|
|
import { i18n } from '@/i18n';
|
2023-04-01 07:52:07 +03:00
|
|
|
import { $i } from '@/account';
|
2020-10-17 14:12:00 +03:00
|
|
|
|
2022-01-07 08:02:25 +02:00
|
|
|
defineProps<{
|
|
|
|
user: misskey.entities.UserDetailed;
|
|
|
|
}>();
|
2020-10-17 14:12:00 +03:00
|
|
|
</script>
|
|
|
|
|
2023-05-08 04:32:08 +03:00
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
2020-10-17 14:12:00 +03:00
|
|
|
position: relative;
|
2023-05-08 04:32:08 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
.banner {
|
|
|
|
height: 84px;
|
|
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
|
|
background-size: cover;
|
|
|
|
background-position: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 62px;
|
|
|
|
left: 13px;
|
|
|
|
z-index: 2;
|
|
|
|
width: 58px;
|
|
|
|
height: 58px;
|
|
|
|
border: solid 4px var(--panel);
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
display: block;
|
|
|
|
padding: 10px 0 10px 88px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
font-weight: bold;
|
|
|
|
line-height: 16px;
|
|
|
|
word-break: break-all;
|
|
|
|
}
|
|
|
|
|
|
|
|
.username {
|
|
|
|
display: block;
|
|
|
|
margin: 0;
|
|
|
|
line-height: 16px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
color: var(--fg);
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
|
|
|
|
.followed {
|
|
|
|
position: absolute;
|
|
|
|
top: 12px;
|
|
|
|
left: 12px;
|
|
|
|
padding: 4px 8px;
|
|
|
|
color: #fff;
|
|
|
|
background: rgba(0, 0, 0, 0.7);
|
|
|
|
font-size: 0.7em;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.description {
|
|
|
|
padding: 16px;
|
|
|
|
font-size: 0.8em;
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
}
|
|
|
|
|
|
|
|
.mfm {
|
|
|
|
display: -webkit-box;
|
|
|
|
-webkit-line-clamp: 3;
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status {
|
|
|
|
padding: 10px 16px;
|
|
|
|
border-top: solid 0.5px var(--divider);
|
|
|
|
}
|
|
|
|
|
|
|
|
.statusItem {
|
|
|
|
display: inline-block;
|
|
|
|
width: 33%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.statusItemLabel {
|
|
|
|
margin: 0;
|
|
|
|
font-size: 0.7em;
|
|
|
|
color: var(--fg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.statusItemValue {
|
|
|
|
font-size: 1em;
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
2020-10-17 14:12:00 +03:00
|
|
|
|
2023-05-08 04:32:08 +03:00
|
|
|
.follow {
|
|
|
|
position: absolute;
|
|
|
|
top: 8px;
|
|
|
|
right: 8px;
|
2020-10-17 14:12:00 +03:00
|
|
|
}
|
|
|
|
</style>
|