summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-14 20:22:25 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-14 20:22:25 +0900
commit0fdfbdf62aae244532cd3b843d21f80cd732917b (patch)
tree7a31ca9dcca9e7e2d6f2bbb4154f57489a24ebd7 /src
parentFix design (diff)
downloadmisskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.tar.gz
misskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.tar.bz2
misskey-0fdfbdf62aae244532cd3b843d21f80cd732917b.zip
Show pinned post in user page
Diffstat (limited to 'src')
-rw-r--r--src/web/app/desktop/tags/pages/post.tag1
-rw-r--r--src/web/app/desktop/tags/post-detail.tag20
-rw-r--r--src/web/app/desktop/tags/user.tag1
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>