mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 06:51:27 +00:00
d49a054c38
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
47 lines
1.9 KiB
PHP
47 lines
1.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container notification-page" style="min-height: 60vh;">
|
|
<div class="col-12 col-md-8 offset-2">
|
|
<ul class="list-group">
|
|
|
|
@foreach($notifications as $notification)
|
|
<li class="list-group-item notification">
|
|
@switch($notification->action)
|
|
|
|
@case('like')
|
|
<span class="notification-icon pr-3">
|
|
<img src="{{$notification->actor->avatarUrl()}}" width="32px" class="rounded-circle">
|
|
</span>
|
|
<span class="notification-text">
|
|
{!! $notification->rendered !!}
|
|
<span class="text-muted notification-timestamp pl-1">{{$notification->created_at->diffForHumans(null, true, true, true)}}</span>
|
|
</span>
|
|
<span class="float-right notification-action">
|
|
</span>
|
|
@break
|
|
@case('follow')
|
|
<span class="notification-icon pr-3">
|
|
<img src="{{$notification->actor->avatarUrl()}}" width="32px" class="rounded-circle">
|
|
</span>
|
|
<span class="notification-text">
|
|
{!! $notification->rendered !!}
|
|
<span class="text-muted notification-timestamp pl-1">{{$notification->created_at->diffForHumans(null, true, true, true)}}</span>
|
|
</span>
|
|
@if($notification->actor->followedBy(Auth::user()->profile) == false)
|
|
<span class="float-right notification-action">
|
|
<form class="follow-form" method="post" action="/i/follow" style="display: inline;" data-id="{{$notification->actor->id}}" data-action="follow">
|
|
@csrf
|
|
<input type="hidden" name="item" value="{{$notification->actor->id}}">
|
|
<button class="btn btn-primary font-weight-bold px-4 py-0" type="submit">Follow</button>
|
|
</form>
|
|
</span>
|
|
@endif
|
|
@break
|
|
@endswitch
|
|
</li>
|
|
@endforeach
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
@endsection
|