mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
91 lines
3.4 KiB
PHP
91 lines
3.4 KiB
PHP
|
@extends('admin.partial.template-full')
|
||
|
|
||
|
@section('section')
|
||
|
<div class="d-flex justify-content-between title mb-3">
|
||
|
<div>
|
||
|
<p class="font-weight-bold h3">Autospam</p>
|
||
|
<p class="text-muted mb-0 lead">Detected <span class="font-weight-bold">{{$appeal->created_at->diffForHumans()}}</span> from <a href="{{$appeal->user->url()}}" class="text-muted font-weight-bold">@{{$appeal->user->username}}</a>.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-12 col-md-8 mt-3">
|
||
|
@if($appeal->type == 'post.autospam')
|
||
|
<div class="card shadow-none border">
|
||
|
<div class="card-header bg-light h5 font-weight-bold py-4">Unlisted + Content Warning</div>
|
||
|
@if($appeal->has_media)
|
||
|
<img class="card-img-top border-bottom" src="{{$appeal->status->thumb(true)}}">
|
||
|
@endif
|
||
|
<div class="card-body">
|
||
|
<div class="mt-2 p-3">
|
||
|
@if($meta->caption)
|
||
|
<p class="text-break">
|
||
|
{{$appeal->has_media ? 'Caption' : 'Comment'}}: <span class="font-weight-bold">{{$meta->caption}}</span>
|
||
|
</p>
|
||
|
@endif
|
||
|
<p class="mb-0">
|
||
|
Like Count: <span class="font-weight-bold">{{$meta->likes_count}}</span>
|
||
|
</p>
|
||
|
<p class="mb-0">
|
||
|
Share Count: <span class="font-weight-bold">{{$meta->reblogs_count}}</span>
|
||
|
</p>
|
||
|
<p class="mb-0">
|
||
|
Timestamp: <span class="font-weight-bold">{{now()->parse($meta->created_at)->format('r')}}</span>
|
||
|
</p>
|
||
|
<p class="" style="word-break: break-all !important;">
|
||
|
URL: <span class="font-weight-bold text-primary"><a href="{{$meta->url}}">{{$meta->url}}</a></span>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endif
|
||
|
</div>
|
||
|
<div class="col-12 col-md-4 mt-3">
|
||
|
<form method="post">
|
||
|
@csrf
|
||
|
<input type="hidden" name="action" value="dismiss">
|
||
|
<button type="submit" class="btn btn-primary btn-block font-weight-bold mb-3">Mark as read</button>
|
||
|
</form>
|
||
|
<button type="button" class="btn btn-light border btn-block font-weight-bold mb-3" onclick="approveWarning()">Mark as not spam</button>
|
||
|
<div class="card shadow-none border mt-5">
|
||
|
<div class="card-header text-center font-weight-bold bg-light">
|
||
|
@{{$appeal->user->username}} stats
|
||
|
</div>
|
||
|
<div class="card-body">
|
||
|
<p class="">
|
||
|
Open Appeals: <span class="font-weight-bold">{{App\AccountInterstitial::whereUserId($appeal->user_id)->whereNotNull('appeal_requested_at')->whereNull('appeal_handled_at')->count()}}</span>
|
||
|
</p>
|
||
|
<p class="">
|
||
|
Total Appeals: <span class="font-weight-bold">{{App\AccountInterstitial::whereUserId($appeal->user_id)->whereNotNull('appeal_requested_at')->count()}}</span>
|
||
|
</p>
|
||
|
<p class="">
|
||
|
Total Warnings: <span class="font-weight-bold">{{App\AccountInterstitial::whereUserId($appeal->user_id)->count()}}</span>
|
||
|
</p>
|
||
|
<p class="">
|
||
|
Status Count: <span class="font-weight-bold">{{$appeal->user->statuses()->count()}}</span>
|
||
|
</p>
|
||
|
<p class="mb-0">
|
||
|
Joined: <span class="font-weight-bold">{{$appeal->user->created_at->diffForHumans(null, null, false)}}</span>
|
||
|
</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|
||
|
|
||
|
@push('scripts')
|
||
|
<script type="text/javascript">
|
||
|
function approveWarning() {
|
||
|
if(window.confirm('Are you sure you want to mark this as not spam?') == true) {
|
||
|
axios.post(window.location.href, {
|
||
|
action: 'approve'
|
||
|
}).then(res => {
|
||
|
window.location.href = '/i/admin/reports/autospam';
|
||
|
}).catch(err => {
|
||
|
swal('Oops!', 'An error occured, please try again later.', 'error');
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
@endpush
|