2018-02-14 17:32:13 +02:00
|
|
|
<template>
|
|
|
|
<div class="mk-user-home">
|
|
|
|
<div>
|
|
|
|
<div ref="left">
|
|
|
|
<mk-user-profile :user="user"/>
|
|
|
|
<mk-user-photos :user="user"/>
|
2018-02-18 05:35:18 +02:00
|
|
|
<mk-user-followers-you-know v-if="os.isSignedIn && os.i.id != user.id" :user="user"/>
|
2018-02-14 17:32:13 +02:00
|
|
|
<p>%i18n:desktop.tags.mk-user.last-used-at%: <b><mk-time :time="user.last_used_at"/></b></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<main>
|
|
|
|
<mk-post-detail v-if="user.pinned_post" :post="user.pinned_post" compact/>
|
|
|
|
<mk-user-timeline ref="tl" :user="user"/>
|
|
|
|
</main>
|
|
|
|
<div>
|
|
|
|
<div ref="right">
|
2018-02-19 16:37:09 +02:00
|
|
|
<mk-calendar @chosen="warp" :start="new Date(user.created_at)"/>
|
|
|
|
<mk-activity :user="user"/>
|
2018-02-14 17:32:13 +02:00
|
|
|
<mk-user-friends :user="user"/>
|
2018-02-19 07:29:42 +02:00
|
|
|
<div class="nav"><mk-nav/></div>
|
2018-02-14 17:32:13 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
2018-02-19 16:37:09 +02:00
|
|
|
import MkUserTimeline from './user-timeline.vue';
|
|
|
|
import MkUserProfile from './user-profile.vue';
|
|
|
|
import MkUserPhotos from './user-photos.vue';
|
|
|
|
import MkUserFollowersYouKnow from './user-followers-you-know.vue';
|
|
|
|
import MkUserFriends from './user-friends.vue';
|
|
|
|
|
2018-02-14 17:32:13 +02:00
|
|
|
export default Vue.extend({
|
2018-02-19 16:37:09 +02:00
|
|
|
components: {
|
|
|
|
'mk-user-timeline': MkUserTimeline,
|
|
|
|
'mk-user-profile': MkUserProfile,
|
|
|
|
'mk-user-photos': MkUserPhotos,
|
|
|
|
'mk-user-followers-you-know': MkUserFollowersYouKnow,
|
|
|
|
'mk-user-friends': MkUserFriends
|
|
|
|
},
|
2018-02-14 17:32:13 +02:00
|
|
|
props: ['user'],
|
|
|
|
methods: {
|
|
|
|
warp(date) {
|
|
|
|
(this.$refs.tl as any).warp(date);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mk-user-home
|
|
|
|
display flex
|
|
|
|
justify-content center
|
|
|
|
margin 0 auto
|
|
|
|
max-width 1200px
|
|
|
|
|
|
|
|
> main
|
|
|
|
> div > div
|
|
|
|
> *:not(:last-child)
|
|
|
|
margin-bottom 16px
|
|
|
|
|
|
|
|
> main
|
|
|
|
padding 16px
|
|
|
|
width calc(100% - 275px * 2)
|
|
|
|
|
2018-02-16 20:01:00 +02:00
|
|
|
> .mk-user-timeline
|
2018-02-14 17:32:13 +02:00
|
|
|
border solid 1px rgba(0, 0, 0, 0.075)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> div
|
|
|
|
width 275px
|
|
|
|
margin 0
|
|
|
|
|
|
|
|
&:first-child > div
|
|
|
|
padding 16px 0 16px 16px
|
|
|
|
|
|
|
|
> p
|
|
|
|
display block
|
|
|
|
margin 0
|
|
|
|
padding 0 12px
|
|
|
|
text-align center
|
|
|
|
font-size 0.8em
|
|
|
|
color #aaa
|
|
|
|
|
|
|
|
&:last-child > div
|
|
|
|
padding 16px 16px 16px 0
|
|
|
|
|
|
|
|
> .nav
|
|
|
|
padding 16px
|
|
|
|
font-size 12px
|
|
|
|
color #aaa
|
|
|
|
background #fff
|
|
|
|
border solid 1px rgba(0, 0, 0, 0.075)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
a
|
|
|
|
color #999
|
|
|
|
|
|
|
|
i
|
|
|
|
color #ccc
|
|
|
|
|
|
|
|
</style>
|