2018-02-11 16:52:37 +09:00
|
|
|
<template>
|
|
|
|
<div class="mk-sub-post-content">
|
|
|
|
<div class="body">
|
|
|
|
<a class="reply" v-if="post.reply_id">%fa:reply%</a>
|
2018-02-18 12:35:18 +09:00
|
|
|
<mk-post-html :ast="post.ast" :i="os.i"/>
|
2018-02-28 00:38:00 +09:00
|
|
|
<a class="rp" v-if="post.repost_id" :href="`/post:${post.repost_id}`">RP: ...</a>
|
2018-02-13 08:11:10 +09:00
|
|
|
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
|
2018-02-11 16:52:37 +09:00
|
|
|
</div>
|
|
|
|
<details v-if="post.media">
|
|
|
|
<summary>({{ post.media.length }}つのメディア)</summary>
|
|
|
|
<mk-images :images="post.media"/>
|
|
|
|
</details>
|
|
|
|
<details v-if="post.poll">
|
|
|
|
<summary>投票</summary>
|
|
|
|
<mk-poll :post="post"/>
|
|
|
|
</details>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2018-02-13 08:11:10 +09:00
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: ['post'],
|
|
|
|
computed: {
|
|
|
|
urls(): string[] {
|
|
|
|
if (this.post.ast) {
|
|
|
|
return this.post.ast
|
|
|
|
.filter(t => (t.type == 'url' || t.type == 'link') && !t.silent)
|
|
|
|
.map(t => t.url);
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
2018-02-11 16:52:37 +09:00
|
|
|
}
|
2018-02-13 08:11:10 +09:00
|
|
|
}
|
|
|
|
});
|
2018-02-11 16:52:37 +09:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mk-sub-post-content
|
|
|
|
overflow-wrap break-word
|
|
|
|
|
|
|
|
> .body
|
|
|
|
> .reply
|
|
|
|
margin-right 6px
|
|
|
|
color #717171
|
|
|
|
|
2018-02-28 00:38:00 +09:00
|
|
|
> .rp
|
2018-02-11 16:52:37 +09:00
|
|
|
margin-left 4px
|
|
|
|
font-style oblique
|
|
|
|
color #a0bf46
|
|
|
|
|
|
|
|
mk-poll
|
|
|
|
font-size 80%
|
|
|
|
|
|
|
|
</style>
|