forked from FoundKeyGang/FoundKey
Show pinned post in user page
This commit is contained in:
parent
7b6e10f5f2
commit
0fdfbdf62a
3 changed files with 13 additions and 9 deletions
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
> mk-post-detail
|
> mk-post-detail
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
|
width 640px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</button>
|
</button>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
<div class="replies">
|
<div class="replies" if={ !compact }>
|
||||||
<virtual each={ post in replies }>
|
<virtual each={ post in replies }>
|
||||||
<mk-post-detail-sub post={ post }/>
|
<mk-post-detail-sub post={ post }/>
|
||||||
</virtual>
|
</virtual>
|
||||||
|
@ -68,7 +68,6 @@
|
||||||
display block
|
display block
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
width 640px
|
|
||||||
overflow hidden
|
overflow hidden
|
||||||
text-align left
|
text-align left
|
||||||
background #fff
|
background #fff
|
||||||
|
@ -259,6 +258,7 @@
|
||||||
this.mixin('api');
|
this.mixin('api');
|
||||||
this.mixin('user-preview');
|
this.mixin('user-preview');
|
||||||
|
|
||||||
|
this.compact = this.opts.compact;
|
||||||
this.contextFetching = false;
|
this.contextFetching = false;
|
||||||
this.context = null;
|
this.context = null;
|
||||||
this.post = this.opts.post;
|
this.post = this.opts.post;
|
||||||
|
@ -288,6 +288,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get replies
|
// Get replies
|
||||||
|
if (!this.compact) {
|
||||||
this.api('posts/replies', {
|
this.api('posts/replies', {
|
||||||
post_id: this.p.id,
|
post_id: this.p.id,
|
||||||
limit: 8
|
limit: 8
|
||||||
|
@ -296,6 +297,7 @@
|
||||||
replies: replies
|
replies: replies
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.reply = () => {
|
this.reply = () => {
|
||||||
|
|
|
@ -399,6 +399,7 @@
|
||||||
<mk-user-photos user={ user }/>
|
<mk-user-photos user={ user }/>
|
||||||
</div>
|
</div>
|
||||||
<main>
|
<main>
|
||||||
|
<mk-post-detail if={ user.pinned_post } post={ user.pinned_post } compact={ true }/>
|
||||||
<mk-user-timeline ref="tl" user={ user }/>
|
<mk-user-timeline ref="tl" user={ user }/>
|
||||||
</main>
|
</main>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in a new issue