hide more ratings

noratings
Thibault Duplessis 2021-10-21 13:03:35 +02:00
parent 311eb2bf8b
commit 6fdf6a79bb
5 changed files with 12 additions and 5 deletions

View File

@ -263,7 +263,8 @@ object layout {
"blind-mode" -> ctx.blind,
"kid" -> ctx.kid,
"mobile" -> ctx.isMobileBrowser,
"playing fixed-scroll" -> playing
"playing fixed-scroll" -> playing,
"no-rating" -> !ctx.pref.showRatings
)
},
dataDev,

View File

@ -75,7 +75,7 @@ object show {
div(cls := "box streamer")(
views.html.streamer.header(s),
div(cls := "description")(richText(s.streamer.description.fold("")(_.value))),
a(cls := "ratings", href := routes.User.show(s.user.username))(
ctx.pref.showRatings option a(cls := "ratings", href := routes.User.show(s.user.username))(
s.user.best6Perfs.map { showPerfRating(s.user, _) }
),
views.html.activity(s.user, activities)

View File

@ -30,8 +30,10 @@ object side {
champions.get(c).fold[Frag](raw(" - ")) { p =>
frag(
p.user.title.fold[Frag](p.user.name)(t => frag(t, nbsp, p.user.name)),
" ",
p.rating
ratingTag(
" ",
p.rating
)
)
}
)

View File

@ -40,7 +40,7 @@ object list {
ol(cls := "user-top")(online map { u =>
li(
userLink(u),
showBestPerf(u)
ctx.pref.showRatings option showBestPerf(u)
)
})
),

View File

@ -48,3 +48,7 @@
.game__meta {
margin-bottom: $block-gap;
}
body.no-rating rating {
display: none;
}