forked from mirror/pixelfed
Update status view
This commit is contained in:
parent
a298ed6178
commit
08a14877d4
|
@ -18,12 +18,13 @@
|
||||||
<div class="col-12 col-md-8 status-photo px-0">
|
<div class="col-12 col-md-8 status-photo px-0">
|
||||||
@if($status->is_nsfw && $status->media_count == 1)
|
@if($status->is_nsfw && $status->media_count == 1)
|
||||||
<details class="details-animated">
|
<details class="details-animated">
|
||||||
<p>
|
<summary>
|
||||||
<summary>NSFW / Hidden Image</summary>
|
<p class="mb-0 lead font-weight-bold">CW / NSFW / Hidden Media</p>
|
||||||
|
<p class="font-weight-light">(click to show)</p>
|
||||||
|
</summary>
|
||||||
<a class="max-hide-overflow {{$status->firstMedia()->filter_class}}" href="{{$status->url()}}">
|
<a class="max-hide-overflow {{$status->firstMedia()->filter_class}}" href="{{$status->url()}}">
|
||||||
<img class="card-img-top" src="{{$status->mediaUrl()}}">
|
<img class="card-img-top" src="{{$status->mediaUrl()}}">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
|
||||||
</details>
|
</details>
|
||||||
@elseif(!$status->is_nsfw && $status->media_count == 1)
|
@elseif(!$status->is_nsfw && $status->media_count == 1)
|
||||||
<div class="{{$status->firstMedia()->filter_class}}">
|
<div class="{{$status->firstMedia()->filter_class}}">
|
||||||
|
@ -68,19 +69,43 @@
|
||||||
<a href="{{$user->url()}}" class="username-link font-weight-bold text-dark">{{$user->username}}</a>
|
<a href="{{$user->url()}}" class="username-link font-weight-bold text-dark">{{$user->username}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="float-right">
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn btn-link text-dark no-caret dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Post options">
|
||||||
|
<span class="fas fa-ellipsis-v text-muted"></span>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
|
||||||
|
<a class="dropdown-item font-weight-bold" href="{{$status->reportUrl()}}">Report</a>
|
||||||
|
{{-- <a class="dropdown-item" href="#">Embed</a> --}}
|
||||||
|
@if(Auth::check())
|
||||||
|
@if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true)
|
||||||
|
{{-- <a class="dropdown-item" href="{{$status->editUrl()}}">Edit</a> --}}
|
||||||
|
<form method="post" action="/i/delete">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="type" value="post">
|
||||||
|
<input type="hidden" name="item" value="{{$status->id}}">
|
||||||
|
<button type="submit" class="dropdown-item btn btn-link font-weight-bold">Delete</button>
|
||||||
|
</form>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex flex-md-column flex-column-reverse h-100">
|
<div class="d-flex flex-md-column flex-column-reverse h-100">
|
||||||
<div class="card-body status-comments">
|
<div class="card-body status-comments">
|
||||||
<div class="status-comment">
|
<div class="status-comment">
|
||||||
<p class="mb-1">
|
<p class="mb-1">
|
||||||
<span class="font-weight-bold pr-1">{{$status->profile->username}}</span>
|
<span class="font-weight-bold pr-1">{{$status->profile->username}}</span>
|
||||||
<span class="comment-text">{!! $status->rendered ?? e($status->caption) !!}</span>
|
<span class="comment-text" v-pre>{!! $status->rendered ?? e($status->caption) !!}</span>
|
||||||
</p>
|
</p>
|
||||||
|
<p class="mb-1"><a href="{{$status->url()}}/c" class="text-muted">View all comments</a></p>
|
||||||
<div class="comments">
|
<div class="comments">
|
||||||
@foreach($status->comments->reverse()->take(10) as $item)
|
@foreach($replies as $item)
|
||||||
<p class="mb-0">
|
<p class="mb-1">
|
||||||
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$item->profile->url()}}">{{$item->profile->username}}</a></bdi></span>
|
<span class="font-weight-bold pr-1"><bdi><a class="text-dark" href="{{$item->profile->url()}}">{{ str_limit($item->profile->username, 15)}}</a></bdi></span>
|
||||||
<span class="comment-text">{!! $item->rendered ?? e($item->caption) !!} <a href="{{$item->url()}}" class="text-dark small font-weight-bold float-right">{{$item->created_at->diffForHumans(null, true, true ,true)}}</a></span>
|
<span class="comment-text" v-pre>{!! $item->rendered ?? e($item->caption) !!} <a href="{{$item->url()}}" class="text-dark small font-weight-bold float-right pl-2">{{$item->created_at->diffForHumans(null, true, true ,true)}}</a></span>
|
||||||
</p>
|
</p>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,32 +113,30 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body flex-grow-0 py-1">
|
<div class="card-body flex-grow-0 py-1">
|
||||||
<div class="reactions my-1">
|
<div class="reactions my-1">
|
||||||
<form class="d-inline-flex like-form pr-3" method="post" action="/i/like" style="display: inline;" data-id="{{$status->id}}" data-action="like">
|
@if(Auth::check())
|
||||||
|
<form class="d-inline-flex pr-3" method="post" action="/i/like" style="display: inline;" data-id="{{$status->id}}" data-action="like">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="item" value="{{$status->id}}">
|
<input type="hidden" name="item" value="{{$status->id}}">
|
||||||
<button class="btn btn-link text-dark p-0 border-0" type="submit" title="Like!">
|
<button class="btn btn-link text-dark p-0 border-0" type="submit" title="Like!">
|
||||||
<h3 class="far fa-heart m-0"></h3>
|
<h3 class="m-0 {{$status->liked() ? 'fas fa-heart text-danger':'far fa-heart text-dark'}}"></h3>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<h3 class="far fa-comment pr-3 m-0" title="Comment"></h3>
|
<h3 class="far fa-comment pr-3 m-0" title="Comment"></h3>
|
||||||
@if(Auth::check())
|
<form class="d-inline-flex share-form pr-3" method="post" action="/i/share" style="display: inline;" data-id="{{$status->id}}" data-action="share" data-count="{{$status->shares_count}}">
|
||||||
@if(Auth::user()->profile->id === $status->profile->id || Auth::user()->is_admin == true)
|
|
||||||
<form method="post" action="/i/delete" class="d-inline-flex">
|
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="type" value="post">
|
|
||||||
<input type="hidden" name="item" value="{{$status->id}}">
|
<input type="hidden" name="item" value="{{$status->id}}">
|
||||||
<button type="submit" class="btn btn-link text-dark p-0 border-0" title="Remove">
|
<button class="btn btn-link text-dark p-0" type="submit" title="Share">
|
||||||
<h3 class="far fa-trash-alt m-0"></h3>
|
<h3 class="m-0 {{$status->shared() ? 'fas fa-share-square text-primary':'far fa-share-square '}}"></h3>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@endif
|
|
||||||
@endif
|
@endif
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<form class="d-inline-flex bookmark-form" method="post" action="/i/bookmark" style="display: inline;" data-id="{{$status->id}}" data-action="bookmark">
|
<form class="d-inline-flex " method="post" action="/i/bookmark" style="display: inline;" data-id="{{$status->id}}" data-action="bookmark">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="item" value="{{$status->id}}">
|
<input type="hidden" name="item" value="{{$status->id}}">
|
||||||
<button class="btn btn-link text-dark p-0 border-0" type="submit" title="Save">
|
<button class="btn btn-link text-dark p-0 border-0" type="submit" title="Save">
|
||||||
<h3 class="far fa-bookmark m-0"></h3>
|
<h3 class="m-0 {{$status->bookmarked() ? 'fas fa-bookmark text-warning':'far fa-bookmark'}}"></h3>
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</span>
|
</span>
|
||||||
|
@ -132,7 +155,8 @@
|
||||||
<form class="comment-form" method="post" action="/i/comment" data-id="{{$status->id}}" data-truncate="false">
|
<form class="comment-form" method="post" action="/i/comment" data-id="{{$status->id}}" data-truncate="false">
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="item" value="{{$status->id}}">
|
<input type="hidden" name="item" value="{{$status->id}}">
|
||||||
<input class="form-control" name="comment" placeholder="Add a comment...">
|
|
||||||
|
<input class="form-control" name="comment" placeholder="Add a comment..." autocomplete="off">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,5 +168,5 @@
|
||||||
|
|
||||||
@push('meta')
|
@push('meta')
|
||||||
<meta property="og:description" content="{{ $status->caption }}">
|
<meta property="og:description" content="{{ $status->caption }}">
|
||||||
<meta property="og:image" content="{{$status->mediaUrl()}}">
|
<meta property="og:image" content="{{$status->mediaUrl()}}">
|
||||||
@endpush
|
@endpush
|
||||||
|
|
Loading…
Reference in New Issue