Update admin user view, improve previews

pull/4544/head
Daniel Supernault 2023-07-16 04:23:41 -06:00
rodzic 3590adbd87
commit ff2c16fe74
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -140,10 +140,15 @@
<p class="title h4 font-weight-bold mt-2 py-2">Recent Posts</p>
<hr>
<div class="row">
@foreach($profile->statuses()->whereHas('media')->latest()->take(9)->get() as $item)
<div class="col-12 col-md-4 col-sm-6 px-0" style="margin-bottom: 1px;">
@foreach($profile->statuses()->whereHas('media')->latest()->take(16)->get() as $item)
@php($post = \App\Services\StatusService::get($item->id, false))
<div class="col-12 col-md-3 col-sm-6 mb-3 px-0">
<a href="{{$item->url()}}">
<img src="{{$item->thumb(true)}}" width="200px" height="200px">
@if($post)
<img src="{{$post['media_attachments'][0]['url']}}" width="200px" height="200px" style="object-fit: cover;" onerror="this.src='/storage/no-preview.png';this.onerror=null;">
@else
<img src="/storage/no-preview.png" width="200px" height="200px">
@endif
</a>
</div>
@endforeach