show games against best reporter
parent
a3df870f2f
commit
1409b45446
|
@ -71,7 +71,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="links">
|
||||
<a href="@routes.User.games(in.user.id, "search")?players.b=@in.report.recentAtom.by.value">View<br />Games</a>
|
||||
@in.report.bestAtomByHuman.map { atom =>
|
||||
<a href="@routes.User.games(in.user.id, "search")?players.b=@atom.by.value">View<br />Games</a>
|
||||
}
|
||||
@if(isGranted(_.MarkTroll)) {
|
||||
<a href="@routes.Mod.communicationPublic(in.user.id)">View<br />Comms</a>
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ case class Report(
|
|||
} take nb
|
||||
def onlyAtom: Option[Atom] = atoms.tail.isEmpty option atoms.head
|
||||
def atomBy(reporterId: ReporterId): Option[Atom] = atoms.toList.find(_.by == reporterId)
|
||||
def bestAtomByHuman: Option[Atom] = bestAtoms(10).toList.find(_.byHuman)
|
||||
|
||||
def unprocessedCheat = open && isCheat
|
||||
def unprocessedOther = open && isOther
|
||||
|
@ -91,6 +92,8 @@ object Report {
|
|||
at: DateTime
|
||||
) {
|
||||
def simplifiedText = text.lines.filterNot(_ startsWith "[AUTOREPORT]") mkString "\n"
|
||||
|
||||
def byHuman = by.value != "lichess" && by.value != "irwin"
|
||||
}
|
||||
|
||||
case class Inquiry(mod: User.ID, seenAt: DateTime)
|
||||
|
|
Loading…
Reference in New Issue