@(u: User, players: List[(Pov, lila.chat.MixedChat)], threads: List[lila.message.Thread], publicLines: List[lila.shutup.PublicLine], spy: lila.security.UserSpy, notes: List[lila.user.Note], history: List[lila.mod.Modlog], priv: Boolean)(implicit ctx: Context)
@import lila.hub.actorApi.shutup.PublicSource
@moreCss = {
@cssTag("mod-communication.css")
}
@side = {
Return to the report list
}
@base.layout(
title = u.username + " communications",
moreCss = moreCss,
side = side.some) {
@userLink(u) communications
@if(isGranted(_.ViewPrivateComms)) {
@if(priv) {
PMs
} else {
PMs
}
}
@if(history.nonEmpty) {
Moderation history
@history.map { e =>
@userIdLink(e.mod.some) @e.showAction @u.username @e.details @momentFromNow(e.date)
}
}
@if(notes.nonEmpty) {
Notes from other users
@notes.map { note =>
@userIdLink(note.from.some) @momentFromNow(note.date): @richText(note.text)
}
}
Dubious public chats
@if(publicLines.isEmpty) {
None!
} else {
@publicLines.reverse.map { line =>
-
@line.date.map(momentFromNow(_)).getOrElse("[OLD]")
@line.from.map {
case PublicSource.Tournament(id) => { @tournamentLink(id) }
case PublicSource.Simul(id) => { @simulLink(id) }
case PublicSource.Watcher(id) => { Game #@id }
case PublicSource.Study(id) => { Study #@id }
}
@line.text
}
}
@if(priv) {
Recent private chats
@players.map {
case (pov, chat) => {
}
}
Recent inbox messages
@threads.map { thread =>
@thread.name
@momentFromNow(thread.createdAt)
@userIdLink(thread.creatorId.some) -> @userIdLink(thread.invitedId.some)
@thread.posts.map { post =>
@userIdLink(thread.senderOf(post).some)
@richText(post.text)
}
}
}
Alternate accounts
@spy.otherUsers.size similar user(s) |
Same |
Games |
Marks |
IPban |
Closed |
Created |
@spy.withMeSorted(u).map {
case lila.security.UserSpy.OtherUser(o, byIp, byFp) => {
@userLink(o, withBestRating = true, params = "?mod") |
@if(o == u) { - } else {
@List(byIp option "IP", byFp option "Print").flatten.mkString(", ")
}
|
@o.count.game.localize |
@if(o.engine){ENGINE}
@if(o.booster){BOOSTER}
@if(o.troll){SHADOWBAN}
|
@if(o.ipBan){IPBAN} |
@if(o.disabled){CLOSED} |
@momentFromNow(o.createdAt) |
}
}
}