2020-12-11 04:58:56 +00:00
@ extends ( 'admin.partial.template-full' )
@ section ( 'section' )
2023-04-24 07:52:59 +00:00
< div class = " bg-primary px-4 py-3 mb-5 rounded d-flex align-items-center justify-content-between " >
< div style = " max-width: 70%; " >
< p class = " lead text-white my-0 font-weight-bold " > Try the new Report UI </ p >
< p class = " text-white small mb-0 " > We are deprecating this Report UI in the next major version release . The updated Report UI is easier , faster and provides more options to handle reports and spam .</ p >
</ div >
< a href = " /i/admin/reports?tab=autospam&id= { { $appeal -> id } } " class = " btn btn-outline-white " > View in new Report UI </ a >
</ div >
2020-12-11 04:58:56 +00:00
< 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 " >& commat ;{{ $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 )
2023-04-24 07:52:59 +00:00
< img class = " card-img-top border-bottom " src = " { { $appeal -> status -> thumb ( true ) } } " style = " max-height: 40vh;object-fit: contain; " onerror = " this.onerror=null;this.src='/storage/no-preview.png?v=0' " >
2020-12-11 04:58:56 +00:00
@ 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; " >
2023-04-24 07:52:59 +00:00
URL : < span class = " font-weight-bold text-primary " >< a href = " /i/web/post/ { { $appeal -> item_id } } " target = " _blank " > {{ $meta -> url }} </ a ></ span >
2020-12-11 04:58:56 +00:00
</ p >
</ div >
</ div >
</ div >
@ endif
</ div >
< div class = " col-12 col-md-4 mt-3 " >
2021-11-11 04:46:31 +00:00
@ if ( $appeal -> appeal_handled_at )
@ else
< button type = " button " class = " btn btn-primary border btn-block font-weight-bold mb-3 action-btn " data - action = " dismiss " > Mark as read </ button >
< button type = " button " class = " btn btn-light border btn-block font-weight-bold mb-3 action-btn " data - action = " approve " > Mark as not spam </ button >
< hr >
< button type = " button " class = " btn btn-default border btn-block font-weight-bold mb-3 action-btn " data - action = " dismiss-all " > Mark all as read </ button >
2022-04-18 06:30:06 +00:00
< button type = " button " class = " btn btn-light border btn-block font-weight-bold mb-3 action-btn " data - action = " approve-all " > Mark all as not spam </ button >
2023-04-24 07:52:59 +00:00
< hr >
< button type = " button " class = " btn btn-light border btn-block font-weight-bold mb-3 action-btn " data - action = " mark-spammer " > Mark as spammer </ button >
2022-04-18 06:30:06 +00:00
< button type = " button " class = " btn btn-danger border btn-block font-weight-bold mb-3 action-btn mb-5 " data - action = " delete-account " > Delete Account </ button >
2021-11-11 04:46:31 +00:00
@ endif
< div class = " card shadow-none border " >
2020-12-11 04:58:56 +00:00
< div class = " card-header text-center font-weight-bold bg-light " >
& commat ;{{ $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 " >
2021-11-11 04:46:31 +00:00
$ ( '.action-btn' ) . click (( e ) => {
e . preventDefault ();
e . currentTarget . blur ();
let type = e . currentTarget . getAttribute ( 'data-action' );
switch ( type ) {
case 'dismiss' :
break ;
case 'approve' :
if ( ! window . confirm ( 'Are you sure you want to approve this post?' )) {
return ;
}
break ;
case 'dismiss-all' :
if ( ! window . confirm ( 'Are you sure you want to dismiss all autospam reports?' )) {
return ;
}
break ;
case 'approve-all' :
if ( ! window . confirm ( 'Are you sure you want to approve this post and all other posts by this account?' )) {
return ;
}
break ;
2022-04-18 06:30:06 +00:00
2023-04-24 07:52:59 +00:00
case 'mark-spammer' :
if ( ! window . confirm ( 'Are you sure you want to mark this account as a spammer?' )) {
return ;
}
break ;
2022-04-18 06:30:06 +00:00
case 'delete-account' :
if ( ! window . confirm ( 'Are you sure you want to delete this account?' )) {
return ;
}
break ;
2020-12-11 04:58:56 +00:00
}
2021-11-11 04:46:31 +00:00
axios . post ( window . location . href , {
action : type
}) . then ( res => {
location . href = '/i/admin/reports/autospam' ;
}) . catch ( err => {
swal ( 'Oops!' , 'An error occured' , 'error' );
console . log ( err );
})
});
2020-12-11 04:58:56 +00:00
</ script >
2021-11-11 04:46:31 +00:00
@ endpush