Update CW

This commit is contained in:
Daniel Supernault 2018-06-09 20:34:52 -06:00
parent 39c2adb656
commit 25bf33e64a
5 changed files with 13 additions and 2 deletions

View file

@ -25,7 +25,7 @@ class Status extends Model
public function thumb()
{
if($this->media->count() == 0) {
if($this->media->count() == 0 || $this->is_nsfw) {
return "data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==";
}
return url(Storage::url($this->firstMedia()->thumbnail_path));

BIN
public/css/app.css vendored

Binary file not shown.

Binary file not shown.

View file

@ -16,7 +16,18 @@
</div>
</div>
<div class="col-12 col-md-8 status-photo px-0">
@if($status->is_nsfw)
<details class="details-animated">
<p>
<summary>NSFW / Hidden Image</summary>
<a class="max-hide-overflow" href="{{$status->url()}}">
<img class="card-img-top" src="{{$status->mediaUrl()}}">
</a>
</p>
</details>
@else
<img src="{{$status->mediaUrl()}}" width="100%">
@endif
</div>
<div class="col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0">
<div class="d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white">

View file

@ -29,7 +29,7 @@
</div>
</div>
@if($item->is_nsfw)
<details>
<details class="details-animated">
<p>
<summary>NSFW / Hidden Image</summary>
<a class="max-hide-overflow" href="{{$item->url()}}">