Commit 4f441f87 authored by Mark Harding's avatar Mark Harding

(feat): add appeals to strikes page

1 merge request!307Epic/reporting and moderation
Pipeline #62350172 running with stage
<div class="m-page m-page--wrapped">
<div class="m-page__main">
<h2>Strikes</h2>
<p>Strikes are imposed for violations against the terms of service. Following 3 strikes, channels are banned.</p>
<p>Strikes are imposed for violations against the terms of service. Following 3 strikes, channels are banned or marked NSFW.</p>
<ul class="m-moderationStrike__list">
<li *ngFor="let strike of strikes"
class="m-border m-moderation__strike"
>
{{ strike['@timestamp'] * 1000 | date: 'medium' }}
<div>
<b> {{ service.getReasonString(strike) }} </b>
<div class="m-moderationStrike__info">
<strong>{{ strike['@timestamp'] * 1000 | date: 'medium' }}</strong>
<span><b>Reason:</b> {{ service.getReasonString(strike) }}</span>
<span><b>State:</b> {{ friendlyState(strike.report) }}</span>
</div>
<m-moderation__appeal [appeal]="strike.appeal">
</m-moderation__appeal>
</li>
<li *ngIf="!inProgress && strikes.length === 0">
You have no strikes. Your channel is in good standing.
......
......@@ -15,3 +15,10 @@ m-moderation__strikes h2 {
padding: 16px;
margin-bottom: 16px;
}
.m-moderationStrike__info {
margin-bottom: 16px;
> * {
display: block;
}
}
......@@ -61,4 +61,23 @@ export class StrikesComponent implements OnInit {
}
}
}
\ No newline at end of file
friendlyState(report) {
switch (report.state) {
case 'initial_jury_decided':
return 'Available to appeal';
break;
case 'appealed':
return 'Awaiting appeal jury';
break;
case 'appeal_jury_decided':
if (report.upheld) {
return 'Appeal rejected';
} else {
return 'Appeal accepted'; // Strike should have been removed by this stage
}
break;
}
return 'Unknown';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment