fix topnavs reports colour
parent
e8a41874c1
commit
857c0dfd30
|
@ -46,8 +46,11 @@ object Environment
|
|||
|
||||
def isChatPanicEnabled = env.chat.panic.enabled
|
||||
|
||||
def blockingReportMaxScore: Int =
|
||||
env.report.api.maxScores.dmap(_.highest).awaitOrElse(50.millis, "nbReports", 0)
|
||||
def blockingReportScores: (Int, Int, Int) = (
|
||||
env.report.api.maxScores.dmap(_.highest).awaitOrElse(50.millis, "nbReports", 0),
|
||||
env.report.scoreThresholdsSetting.get().mid,
|
||||
env.report.scoreThresholdsSetting.get().high
|
||||
)
|
||||
|
||||
val spinner: Frag = raw(
|
||||
"""<div class="spinner"><svg viewBox="0 0 40 40"><circle cx=20 cy=20 r=18 fill="none"></circle></svg></div>"""
|
||||
|
|
|
@ -293,18 +293,20 @@ object layout {
|
|||
|
||||
private def reports(implicit ctx: Context) =
|
||||
isGranted(_.SeeReport) option {
|
||||
val score = blockingReportMaxScore
|
||||
a(
|
||||
cls := List(
|
||||
"link data-count report-score link-center" -> true,
|
||||
"report-score--high" -> (score > 50),
|
||||
"report-score--low" -> (score <= 40)
|
||||
),
|
||||
title := "Moderation",
|
||||
href := routes.Report.list(),
|
||||
dataCount := score,
|
||||
dataIcon := ""
|
||||
)
|
||||
blockingReportScores match {
|
||||
case (score, mid, high) =>
|
||||
a(
|
||||
cls := List(
|
||||
"link data-count report-score link-center" -> true,
|
||||
"report-score--high" -> (score > high),
|
||||
"report-score--low" -> (score <= mid)
|
||||
),
|
||||
title := "Moderation",
|
||||
href := routes.Report.list(),
|
||||
dataCount := score,
|
||||
dataIcon := ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private def teamRequests(implicit ctx: Context) =
|
||||
|
|
Loading…
Reference in New Issue