@@ -9,36 +9,29 @@ final class TutorReportUi(helpers: Helpers, bits: TutorBits, perfUi: TutorPerfUi
99
1010 def apply (full : TutorFullReport )(using Context ) =
1111 bits.page(menu = bits.menu(full, none))(cls := " tutor__report tutor-layout" ):
12- val metaTag = if full.perfs.isEmpty then badTag else span
1312 frag(
1413 div(cls := " box" )(
1514 boxTop(h1(" Lichess Tutor" , bits.beta, bits.otherUser(full.user))),
1615 bits.mascotSays(
1716 div(cls := " tutor__report__header" )(
18- span(cls := " tutor__report__dates" )(bits.dateRange(full.config)(semanticDate(_))),
19- metaTag(cls := " tutor__report__meta" )(
20- strong(trans.site.nbGames.plural(full.nbGames, full.nbGames.localize)),
21- " • " ,
22- bits.days(full.config)
23- ),
17+ bits.reportTime(full.config),
18+ bits.reportMeta(full.nbGames, full.stats.meanRating),
2419 postForm(
2520 cls := " tutor__report__delete" ,
2621 action := routes.Tutor .delete(full.user.id, full.config.rangeStr)
2722 ):
2823 button(tpe := " submit" )(trans.site.delete)
2924 ),
30- full.perfs.nonEmpty.option:
31- frag(
32- p(
33- " Each aspect of your playstyle is compared to other players of similar rating, called \" peers\" ."
34- ),
35- p(
36- " It should give you some idea about what your strengths are, and where you have room for improvement."
37- )
25+ if full.perfs.isEmpty then p(" Not enough rated games to examine!" )
26+ else
27+ p(
28+ " Each aspect of your playstyle is compared to other players of similar rating, called \" peers\" ." ,
29+ br,
30+ " It should give you some idea about what your strengths are, and where you have room for improvement."
3831 )
3932 )
4033 ),
41- tutorConcepts,
34+ full.perfs.nonEmpty.option( tutorConcepts) ,
4235 div(cls := " tutor__perfs tutor-cards" )(
4336 full.perfs.toList.map { perfReportCard(full, _) }
4437 )
0 commit comments