diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-14 20:22:25 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-14 20:22:25 +0900 |
| commit | 0fdfbdf62aae244532cd3b843d21f80cd732917b (patch) | |
| tree | 7a31ca9dcca9e7e2d6f2bbb4154f57489a24ebd7 /src/web | |
| parent | Fix design (diff) | |
| download | misskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.tar.gz misskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.tar.bz2 misskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.zip | |
Show pinned post in user page
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/desktop/tags/pages/post.tag | 1 | ||||
| -rw-r--r-- | src/web/app/desktop/tags/post-detail.tag | 20 | ||||
| -rw-r--r-- | src/web/app/desktop/tags/user.tag | 1 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/web/app/desktop/tags/pages/post.tag b/src/web/app/desktop/tags/pages/post.tag index f270b43ac2..4a9672c1ef 100644 --- a/src/web/app/desktop/tags/pages/post.tag +++ b/src/web/app/desktop/tags/pages/post.tag @@ -28,6 +28,7 @@ > mk-post-detail margin 0 auto + width 640px </style> <script> diff --git a/src/web/app/desktop/tags/post-detail.tag b/src/web/app/desktop/tags/post-detail.tag index 1a0eefe13e..585b1b8280 100644 --- a/src/web/app/desktop/tags/post-detail.tag +++ b/src/web/app/desktop/tags/post-detail.tag @@ -57,7 +57,7 @@ </button> </footer> </article> - <div class="replies"> + <div class="replies" if={ !compact }> <virtual each={ post in replies }> <mk-post-detail-sub post={ post }/> </virtual> @@ -68,7 +68,6 @@ display block margin 0 padding 0 - width 640px overflow hidden text-align left background #fff @@ -259,6 +258,7 @@ this.mixin('api'); this.mixin('user-preview'); + this.compact = this.opts.compact; this.contextFetching = false; this.context = null; this.post = this.opts.post; @@ -288,14 +288,16 @@ } // Get replies - this.api('posts/replies', { - post_id: this.p.id, - limit: 8 - }).then(replies => { - this.update({ - replies: replies + if (!this.compact) { + this.api('posts/replies', { + post_id: this.p.id, + limit: 8 + }).then(replies => { + this.update({ + replies: replies + }); }); - }); + } }); this.reply = () => { diff --git a/src/web/app/desktop/tags/user.tag b/src/web/app/desktop/tags/user.tag index ac60f61735..85cab94d48 100644 --- a/src/web/app/desktop/tags/user.tag +++ b/src/web/app/desktop/tags/user.tag @@ -399,6 +399,7 @@ <mk-user-photos user={ user }/> </div> <main> + <mk-post-detail if={ user.pinned_post } post={ user.pinned_post } compact={ true }/> <mk-user-timeline ref="tl" user={ user }/> </main> <div> |