1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 02:06:52 +00:00
pixelfed/resources/views/account/activity.blade.php

147 lines
6.1 KiB
PHP
Raw Normal View History

2018-05-27 03:25:04 +00:00
@extends('layouts.app')
@section('content')
<div class="container notification-page" style="min-height: 60vh;">
<div class="col-12 col-md-8 offset-md-2">
2018-08-10 02:00:04 +00:00
<div class="card mt-3">
<div class="card-body p-0">
2018-09-03 04:03:12 +00:00
<ul class="nav nav-pills d-flex text-center">
2018-08-10 02:00:04 +00:00
<li class="nav-item flex-fill">
2019-04-16 03:35:58 +00:00
<a class="nav-link font-weight-bold text-uppercase active" href="{{route('notifications')}}">Notifications</a>
2018-08-10 02:00:04 +00:00
</li>
2018-09-03 04:03:12 +00:00
<li class="nav-item flex-fill">
<a class="nav-link font-weight-bold text-uppercase" href="{{route('follow-requests')}}">Follow Requests</a>
</li>
2018-08-10 02:00:04 +00:00
</ul>
</div>
</div>
<div class="">
<div class="dropdown text-right mt-2">
<a class="btn btn-link btn-sm dropdown-toggle font-weight-bold text-dark" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Filter
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<a href="?a=comment" class="dropdown-item font-weight-bold" title="Commented on your post">
Comments only
</a>
<a href="?a=follow" class="dropdown-item font-weight-bold" title="Followed you">
New Followers only
</a>
<a href="?a=mention" class="dropdown-item font-weight-bold" title="Mentioned you">
Mentions only
</a>
<a href="{{route('notifications')}}" class="dropdown-item font-weight-bold text-dark">
View All
</a>
</div>
</div>
</div>
2018-05-27 03:25:04 +00:00
<ul class="list-group">
2018-06-06 04:17:14 +00:00
@if($notifications->count() > 0)
2018-05-27 03:25:04 +00:00
@foreach($notifications as $notification)
2018-08-10 02:00:04 +00:00
<li class="list-group-item notification border-0">
2018-05-27 03:25:04 +00:00
@switch($notification->action)
@case('like')
<span class="notification-icon pr-3">
2018-08-10 02:00:04 +00:00
<img src="{{optional($notification->actor, function($actor) {
return $actor->avatarUrl(); }) }}" width="32px" class="rounded-circle">
2018-05-27 03:25:04 +00:00
</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">
2018-06-09 23:36:27 +00:00
@if($notification->item_id && $notification->item_type == 'App\Status')
2018-06-04 08:16:33 +00:00
<a href="{{$notification->status->url()}}"><img src="{{$notification->status->thumb()}}" width="32px" height="32px"></a>
@endif
2018-05-27 03:25:04 +00:00
</span>
@break
2018-06-04 08:16:33 +00:00
@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
2018-06-04 08:16:33 +00:00
@case('comment')
<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">
2019-04-16 03:35:58 +00:00
@if(false == true && $notification->item_id && $notification->item_type == 'App\Status')
<a href="{{$notification->status->parent()->url()}}">
<div class="notification-image" style="background-image: url('{{$notification->status->parent()->thumb()}}')"></div>
</a>
2018-06-04 08:16:33 +00:00
@endif
</span>
@break
2018-06-09 03:33:57 +00:00
@case('mention')
<span class="notification-icon pr-3">
<img src="{{$notification->status->profile->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">
2018-06-09 23:36:27 +00:00
@if($notification->item_id && $notification->item_type === 'App\Status')
@if(is_null($notification->status->in_reply_to_id))
2018-06-09 03:33:57 +00:00
<a href="{{$notification->status->url()}}">
<div class="notification-image" style="background-image: url('{{$notification->status->thumb()}}')"></div>
</a>
2018-06-09 23:36:27 +00:00
@else
<a href="{{$notification->status->parent()->url()}}">
<div class="notification-image" style="background-image: url('{{$notification->status->parent()->thumb()}}')"></div>
</a>
@endif
2018-06-09 03:33:57 +00:00
@endif
</span>
@break
2018-05-27 03:25:04 +00:00
@endswitch
</li>
@endforeach
2018-06-09 23:36:27 +00:00
</ul>
<div class="d-flex justify-content-center my-4">
{{$notifications->links()}}
</div>
2018-06-06 04:17:14 +00:00
@else
<div class="mt-4">
<div class="alert alert-info font-weight-bold">No unread notifications found.</div>
</div>
@endif
2018-05-27 03:25:04 +00:00
</div>
</div>
@endsection
2018-06-09 23:36:27 +00:00
@push('scripts')
2019-04-16 03:35:58 +00:00
<script type="text/javascript" src="{{ mix('js/compose.js') }}"></script>
<script type="text/javascript">
new Vue({
el: '#content'
});
</script>
2018-06-09 23:36:27 +00:00
@endpush