2018-02-14 17:32:13 +02:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
2018-06-20 13:55:34 +03:00
|
|
|
<div class="zwwan0di1v4356rmdbjmwnn32tptpdp2" v-if="!fetching">
|
|
|
|
<div class="main">
|
|
|
|
<x-header :user="user"/>
|
|
|
|
<mk-note-detail v-if="user.pinnedNote" :note="user.pinnedNote" :compact="true"/>
|
|
|
|
<x-timeline class="timeline" ref="tl" :user="user"/>
|
|
|
|
</div>
|
|
|
|
<div class="side">
|
|
|
|
<x-profile :user="user"/>
|
|
|
|
<mk-calendar @chosen="warp" :start="new Date(user.createdAt)"/>
|
|
|
|
<mk-activity :user="user"/>
|
|
|
|
<x-photos :user="user"/>
|
|
|
|
<x-friends :user="user"/>
|
|
|
|
<x-followers-you-know v-if="$store.getters.isSignedIn && $store.state.i.id != user.id" :user="user"/>
|
|
|
|
<div class="nav"><mk-nav/></div>
|
|
|
|
<p v-if="user.host === null">%i18n:@last-used-at%: <b><mk-time :time="user.lastUsedAt"/></b></p>
|
|
|
|
</div>
|
2018-02-14 17:32:13 +02:00
|
|
|
</div>
|
|
|
|
</mk-ui>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-04-02 07:44:32 +03:00
|
|
|
import parseAcct from '../../../../../../acct/parse';
|
2018-04-05 19:36:34 +03:00
|
|
|
import getUserName from '../../../../../../renderers/get-user-name';
|
2018-02-19 07:29:42 +02:00
|
|
|
import Progress from '../../../../common/scripts/loading';
|
2018-02-20 18:39:51 +02:00
|
|
|
import XHeader from './user.header.vue';
|
2018-06-20 13:55:34 +03:00
|
|
|
import XTimeline from './user.timeline.vue';
|
|
|
|
import XProfile from './user.profile.vue';
|
|
|
|
import XPhotos from './user.photos.vue';
|
|
|
|
import XFollowersYouKnow from './user.followers-you-know.vue';
|
|
|
|
import XFriends from './user.friends.vue';
|
2018-02-14 17:32:13 +02:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-02-19 07:29:42 +02:00
|
|
|
components: {
|
2018-02-20 18:39:51 +02:00
|
|
|
XHeader,
|
2018-06-20 13:55:34 +03:00
|
|
|
XTimeline,
|
|
|
|
XProfile,
|
|
|
|
XPhotos,
|
|
|
|
XFollowersYouKnow,
|
|
|
|
XFriends
|
2018-02-14 17:32:13 +02:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
fetching: true,
|
|
|
|
user: null
|
|
|
|
};
|
|
|
|
},
|
2018-02-20 15:53:34 +02:00
|
|
|
watch: {
|
|
|
|
$route: 'fetch'
|
|
|
|
},
|
2018-02-22 14:15:24 +02:00
|
|
|
created() {
|
|
|
|
this.fetch();
|
|
|
|
},
|
2018-02-20 15:53:34 +02:00
|
|
|
methods: {
|
|
|
|
fetch() {
|
|
|
|
this.fetching = true;
|
|
|
|
Progress.start();
|
2018-03-27 10:51:12 +03:00
|
|
|
(this as any).api('users/show', parseAcct(this.$route.params.user)).then(user => {
|
2018-02-20 15:53:34 +02:00
|
|
|
this.user = user;
|
|
|
|
this.fetching = false;
|
|
|
|
Progress.done();
|
2018-04-09 12:52:29 +03:00
|
|
|
document.title = getUserName(this.user) + ' | Misskey';
|
2018-02-20 15:53:34 +02:00
|
|
|
});
|
2018-06-20 13:55:34 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
warp(date) {
|
|
|
|
(this.$refs.tl as any).warp(date);
|
2018-02-20 15:53:34 +02:00
|
|
|
}
|
2018-02-14 17:32:13 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2018-06-20 13:55:34 +03:00
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.zwwan0di1v4356rmdbjmwnn32tptpdp2
|
|
|
|
display flex
|
|
|
|
justify-content center
|
|
|
|
width 980px
|
|
|
|
padding 16px
|
|
|
|
margin 0 auto
|
|
|
|
|
|
|
|
> .main
|
|
|
|
> .side
|
|
|
|
> *:not(:last-child)
|
|
|
|
margin-bottom 16px
|
|
|
|
|
|
|
|
> .main
|
|
|
|
flex 1
|
|
|
|
margin-right 16px
|
|
|
|
|
|
|
|
> .timeline
|
|
|
|
border 1px solid rgba(#000, 0.075)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> .side
|
|
|
|
width 275px
|
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
margin 0
|
|
|
|
padding 0 12px
|
|
|
|
text-align center
|
|
|
|
font-size 0.8em
|
|
|
|
color #aaa
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
padding 16px
|
|
|
|
font-size 12px
|
|
|
|
color #aaa
|
|
|
|
background #fff
|
|
|
|
border solid 1px rgba(#000, 0.075)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
a
|
|
|
|
color #999
|
|
|
|
|
|
|
|
i
|
|
|
|
color #ccc
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|