1
0
forked from mirror/misskey
This commit is contained in:
syuilo 2018-03-05 13:46:54 +09:00
parent 47c1139a49
commit 5c6dfe5bb6
4 changed files with 32 additions and 4 deletions

View File

@ -49,6 +49,9 @@
</div>
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.latitude},${p.geo.longitude}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="repost" v-if="p.repost">
<mk-post-preview :post="p.repost"/>
</div>
</div>
<footer>
<mk-reactions-viewer :post="p"/>
@ -104,7 +107,10 @@ export default Vue.extend({
},
computed: {
isRepost(): boolean {
return this.post.repost != null;
return (this.post.repost &&
this.post.text == null &&
this.post.media_ids == null &&
this.post.poll == null);
},
p(): any {
return this.isRepost ? this.post.repost : this.post;
@ -325,6 +331,14 @@ export default Vue.extend({
> .body
padding 8px 0
> .repost
margin 8px 0
> .mk-post-preview
padding 16px
border dashed 1px #c0dac6
border-radius 8px
> .location
margin 4px 0
font-size 12px

View File

@ -51,7 +51,7 @@
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.latitude},${p.geo.longitude}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="repost" v-if="p.repost">
<mk-post-preview class="repost" :post="p.repost"/>
<mk-post-preview :post="p.repost"/>
</div>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
</div>

View File

@ -49,6 +49,9 @@
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
<a class="location" v-if="p.geo" :href="`http://maps.google.com/maps?q=${p.geo.latitude},${p.geo.longitude}`" target="_blank">%fa:map-marker-alt% 位置情報</a>
<div class="map" v-if="p.geo" ref="map"></div>
<div class="repost" v-if="p.repost">
<mk-post-preview :post="p.repost"/>
</div>
</div>
<router-link class="time" :to="`/${p.user.username}/${p.id}`">
<mk-time :time="p.created_at" mode="detail"/>
@ -103,7 +106,10 @@ export default Vue.extend({
},
computed: {
isRepost(): boolean {
return this.post.repost != null;
return (this.post.repost &&
this.post.text == null &&
this.post.media_ids == null &&
this.post.poll == null);
},
p(): any {
return this.isRepost ? this.post.repost : this.post;
@ -326,6 +332,14 @@ export default Vue.extend({
> .body
padding 8px 0
> .repost
margin 8px 0
> .mk-post-preview
padding 16px
border dashed 1px #c0dac6
border-radius 8px
> .location
margin 4px 0
font-size 12px

View File

@ -52,7 +52,7 @@
<div class="map" v-if="p.geo" ref="map"></div>
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
<div class="repost" v-if="p.repost">
<mk-post-preview class="repost" :post="p.repost"/>
<mk-post-preview :post="p.repost"/>
</div>
</div>
<footer>