summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-05 13:46:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-05 13:46:54 +0900
commit5c6dfe5bb68a3b0706fd8c292894df434730e2a4 (patch)
tree4c9504053029dfcb7bc4435dc23d3a15293d6ac8 /src/web/app
parentShow google maps when geo location attached (diff)
downloadsharkey-5c6dfe5bb68a3b0706fd8c292894df434730e2a4.tar.gz
sharkey-5c6dfe5bb68a3b0706fd8c292894df434730e2a4.tar.bz2
sharkey-5c6dfe5bb68a3b0706fd8c292894df434730e2a4.zip
Fix bug
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/desktop/views/components/post-detail.vue16
-rw-r--r--src/web/app/desktop/views/components/posts.post.vue2
-rw-r--r--src/web/app/mobile/views/components/post-detail.vue16
-rw-r--r--src/web/app/mobile/views/components/post.vue2
4 files changed, 32 insertions, 4 deletions
diff --git a/src/web/app/desktop/views/components/post-detail.vue b/src/web/app/desktop/views/components/post-detail.vue
index fdf97282b3..e33120c7c0 100644
--- a/src/web/app/desktop/views/components/post-detail.vue
+++ b/src/web/app/desktop/views/components/post-detail.vue
@@ -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
diff --git a/src/web/app/desktop/views/components/posts.post.vue b/src/web/app/desktop/views/components/posts.post.vue
index 11bf3c3b57..b88f016ad1 100644
--- a/src/web/app/desktop/views/components/posts.post.vue
+++ b/src/web/app/desktop/views/components/posts.post.vue
@@ -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>
diff --git a/src/web/app/mobile/views/components/post-detail.vue b/src/web/app/mobile/views/components/post-detail.vue
index 554cfa07a0..bf8ce4f6fa 100644
--- a/src/web/app/mobile/views/components/post-detail.vue
+++ b/src/web/app/mobile/views/components/post-detail.vue
@@ -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
diff --git a/src/web/app/mobile/views/components/post.vue b/src/web/app/mobile/views/components/post.vue
index 2026fe53b0..390c6396f2 100644
--- a/src/web/app/mobile/views/components/post.vue
+++ b/src/web/app/mobile/views/components/post.vue
@@ -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>