Browse Source

Update RemotePost component, fix missing like button on comments

Daniel Supernault 5 years ago
parent
commit
7ef9056537

+ 1 - 1
app/Http/Controllers/InternalApiController.php

@@ -437,7 +437,7 @@ class InternalApiController extends Controller
 
 
         $status = Status::whereProfileId($user->id)
         $status = Status::whereProfileId($user->id)
                         ->whereNull('reblog_of_id')
                         ->whereNull('reblog_of_id')
-                        ->whereVisibility('public')
+                        ->whereIn('visibility', ['public', 'unlisted'])
                         ->findOrFail($statusId);
                         ->findOrFail($statusId);
         $template = $status->in_reply_to_id ? 'status.reply' : 'status.remote';
         $template = $status->in_reply_to_id ? 'status.reply' : 'status.remote';
         return view($template, compact('user', 'status'));
         return view($template, compact('user', 'status'));

+ 1 - 0
resources/assets/js/components/RemotePost.vue

@@ -166,6 +166,7 @@
                                   <span class="text-break " v-html="reply.content"></span>
                                   <span class="text-break " v-html="reply.content"></span>
                                 </span>
                                 </span>
                                 <span class="pl-2">
                                 <span class="pl-2">
+                                    <span v-on:click="likeReply(reply, $event)"><i v-bind:class="[reply.favourited ? 'fas fa-heart fa-sm text-danger':'far fa-heart fa-sm text-lighter']"></i></span>
                                     <post-menu :status="reply" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block px-2" v-on:deletePost="deleteComment(reply.id, index)"></post-menu>
                                     <post-menu :status="reply" :profile="user" :size="'sm'" :modal="'true'" class="d-inline-block px-2" v-on:deletePost="deleteComment(reply.id, index)"></post-menu>
                                 </span>
                                 </span>
                               </p>
                               </p>