Newer
Older
<template slot="header" v-if="!fetching"><img :src="user.avatarUrl" alt="">{{ user | userName }}</template>
<div class="is-suspended" v-if="user.isSuspended"><p>%fa:exclamation-triangle% %i18n:@is-suspended%</p></div>
<div class="is-remote" v-if="user.host != null"><p>%fa:exclamation-triangle% %i18n:@is-remote%<a :href="user.url || user.uri" target="_blank">%i18n:@view-remote%</a></p></div>
<mk-mute-button v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/>
<mk-follow-button v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/>
<span class="username"><mk-acct :user="user" :detail="true" /></span>
<div class="description">
<misskey-flavored-markdown v-if="user.description" :text="user.description" :i="$store.state.i"/>
</div>
<p class="location" v-if="user.host === null && user.profile.location">
%fa:map-marker%{{ user.profile.location }}
<p class="birthday" v-if="user.host === null && user.profile.birthday">
%fa:birthday-cake%{{ user.profile.birthday.replace('-', '年').replace('-', '月') + '日' }} ({{ age }}歳)
</header>
<nav>
<div class="nav-container">
<a :data-active="page == 'home'" @click="page = 'home'">%fa:home% %i18n:@overview%</a>
<a :data-active="page == 'notes'" @click="page = 'notes'">%fa:R comment-alt% %i18n:@timeline%</a>
<a :data-active="page == 'media'" @click="page = 'media'">%fa:image% %i18n:@media%</a>
<mk-user-timeline v-if="page == 'notes'" :user="user" key="tl"/>
<mk-user-timeline v-if="page == 'media'" :user="user" :with-media="true" key="media"/>
},
style(): any {
if (this.user.bannerUrl == null) return {};
return {
backgroundColor: this.user.bannerColor && this.user.bannerColor.length == 3 ? `rgb(${ this.user.bannerColor.join(',') })` : null,
(this as any).api('users/show', parseAcct(this.$route.params.user)).then(user => {
document.title = `${Vue.filter('userName')(this.user)} | ${(this as any).os.instanceName}`;
&.is-suspended
color #570808
background #ffdbdb
&.is-remote
color #573c08
background #fff0db
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
background-size cover
background-position center
> .body
padding 12px
margin 0 auto
max-width 600px
> .top
&:after
content ''
display block
clear both
> .avatar
display block
float left
width 25%
height 40px
> img
display block
position absolute
left -2px
bottom -2px
width 100%
border-radius 6px
@media (min-width 500px)
left -4px
bottom -4px
float right
> .title
margin 8px 0
> h1
margin 0
line-height 22px
font-size 20px
> .username
display inline-block
line-height 20px
font-size 16px
font-weight bold
color var(--mobileUserPageFollowedFg)
background var(--mobileUserPageFollowedBg)
> .info
margin 8px 0
> p
display inline
margin 0 16px 0 0
&:not(:last-child)
margin-right 16px
> b
margin-right 4px
font-size 16px
display flex
justify-content center
margin 0 auto
max-width 600px
> a
display block
flex 1 1
text-align center