Merge branch 'master' into relay-no-until

* master:
  fix puzzle layout on firefox
  mention IBAN & bitcoin on /patron
  upgrade PLAY to 2.4.11
  Hide mod username when thread is closed
  set relay as unfinished when manually triggering sync
  simplify relay fetch a bit
  scalachess 6.23
This commit is contained in:
Thibault Duplessis 2017-10-16 11:25:19 -05:00
commit 58375fa511
10 changed files with 48 additions and 35 deletions

View file

@ -24,12 +24,14 @@ title = thread.name) {
<div class="answer" id="bottom"> <div class="answer" id="bottom">
@if(blocks) { @if(blocks) {
<p class="end">@userIdLink(thread.otherUserId(me).some) blocks you. You cannot answer.</p> <p class="end">@userIdLink(thread.visibleOtherUserId(me).some) blocks you. You cannot answer.</p>
} else { } else {
@if(!thread.isVisibleByOther(me) && !me.troll) { @if(!thread.isVisibleByOther(me) && !me.troll) {
<p class="end"> <p class="end">
@userIdLink(thread.otherUserId(me).some) has closed this thread. @userIdLink(thread.visibleOtherUserId(me).some) has closed this thread.
@if(!thread.asMod){
<a href="@routes.Message.form?user=@thread.otherUserId(me)" class="button">Create a new one</a> <a href="@routes.Message.form?user=@thread.otherUserId(me)" class="button">Create a new one</a>
}
</p> </p>
} else { } else {
@form.map { f => @form.map { f =>

View file

@ -30,7 +30,7 @@ openGraph = lila.app.ui.OpenGraph(
title = title, title = title,
url = s"$netBaseUrl${routes.Plan.index.url}", url = s"$netBaseUrl${routes.Plan.index.url}",
description = "Free chess for everyone, forever!").some) { description = "Free chess for everyone, forever!").some) {
<div class="content_box no_padding plan motivation"> <div class="content_box no_padding plan">
@patron.ifTrue(ctx.me.??(_.isPatron)).map { p => @patron.ifTrue(ctx.me.??(_.isPatron)).map { p =>
<div class="banner one_time_active"> <div class="banner one_time_active">
<i data-icon="@patronIconChar"></i> <i data-icon="@patronIconChar"></i>
@ -162,6 +162,11 @@ description = "Free chess for everyone, forever!").some) {
Yes, at any time, from this page.<br /> Yes, at any time, from this page.<br />
Or you can <a href="@routes.Page.contact">contact lichess support</a>. Or you can <a href="@routes.Page.contact">contact lichess support</a>.
</dd> </dd>
<dt>Other methods of payment?</dt>
<dd>
We also accept <a href="@staticUrl("doc/iban_LICHESS_ORG_00022031601.pdf")">bank transfers</a>.<br />
And here's our bitcoin address: <code>15ZA4bBki3uu3yR2ENC2WYa9baVGUZ8Cf8</code>
</dd>
</dl> </dl>
<dl> <dl>
<dt>Are some features reserved to Patrons?</dt> <dt>Are some features reserved to Patrons?</dt>

View file

@ -161,7 +161,8 @@ object mon {
} }
object lag { object lag {
val avgReported = rec("round.move.lag.avg_reported") val avgReported = rec("round.move.lag.avg_reported")
val estimateError = rec("round.move.lag.estimate_error") private val estErrorRec = rec("round.move.lag.estimate_error_1000")
def estimateError(e: Int) = estErrorRec(e + 1000)
val compDeviation = rec("round.move.lag.comp_deviation") val compDeviation = rec("round.move.lag.comp_deviation")
def uncomped(key: String) = rec(s"round.move.lag.uncomped.$key") def uncomped(key: String) = rec(s"round.move.lag.uncomped.$key")
val uncompedAll = rec(s"round.move.lag.uncomped.all") val uncompedAll = rec(s"round.move.lag.uncomped.all")

View file

@ -253,7 +253,7 @@ private[round] final class Round(
avgComp <- lt.avgLagComp avgComp <- lt.avgLagComp
uncomp <- (lt.totalLag - lt.totalComp) / lt.lagSteps uncomp <- (lt.totalLag - lt.totalComp) / lt.lagSteps
} { } {
lRec.estimateError((avgComp - lowEst).centis + 100) lRec.estimateError((avgComp - lowEst).centis)
lRec.uncomped(f"${lt.quotaGain.roundTenths}%02d")(uncomp.centis) lRec.uncomped(f"${lt.quotaGain.roundTenths}%02d")(uncomp.centis)
lRec.uncompedAll(uncomp.centis) lRec.uncompedAll(uncomp.centis)
} }

View file

@ -28,7 +28,7 @@ object Dependencies {
val findbugs = "com.google.code.findbugs" % "jsr305" % "3.0.1" val findbugs = "com.google.code.findbugs" % "jsr305" % "3.0.1"
val hasher = "com.roundeights" %% "hasher" % "1.2.0" val hasher = "com.roundeights" %% "hasher" % "1.2.0"
val jodaTime = "joda-time" % "joda-time" % "2.9.9" val jodaTime = "joda-time" % "joda-time" % "2.9.9"
val chess = "org.lichess" %% "scalachess" % "6.22" val chess = "org.lichess" %% "scalachess" % "6.23"
val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.2.3-THIB" val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.2.3-THIB"
val prismic = "io.prismic" %% "scala-kit" % "1.2.11-THIB" val prismic = "io.prismic" %% "scala-kit" % "1.2.11-THIB"
val java8compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0" val java8compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0"

View file

@ -1,5 +1,5 @@
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6") addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.11")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.0") addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.0")

Binary file not shown.

View file

@ -73,15 +73,15 @@ table.all .thanks {
display: block; display: block;
} }
.motivation a { .plan a {
color: #3893E8!important; color: #3893E8!important;
} }
.motivation { .plan {
line-height: 2em; line-height: 2em;
} }
.motivation .banner { .plan .banner {
margin-bottom: 60px; margin-bottom: 60px;
background: #639B24; background: #639B24;
color: #fff; color: #fff;
@ -92,86 +92,86 @@ table.all .thanks {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.motivation .banner > i { .plan .banner > i {
font-size: 80px; font-size: 80px;
margin: 0 20px; margin: 0 20px;
} }
.motivation .banner > i:last-child { .plan .banner > i:last-child {
transform: scale(-1, 1); transform: scale(-1, 1);
} }
.motivation .banner h1 { .plan .banner h1 {
margin: 0 0 20px 0; margin: 0 0 20px 0;
padding: 0!important; padding: 0!important;
} }
.motivation .wrapper { .plan .wrapper {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 1.3em; font-size: 1.3em;
} }
.motivation .text, .plan .text,
.motivation .content { .plan .content {
flex: 0 0 47%; flex: 0 0 47%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.motivation .text { .plan .text {
flex-flow: column nowrap; flex-flow: column nowrap;
} }
.motivation .text p { .plan .text p {
margin-bottom: 1em; margin-bottom: 1em;
} }
.motivation .plan_checkout { .plan .plan_checkout {
width: 100%; width: 100%;
} }
.motivation .plan_checkout h3 { .plan .plan_checkout h3 {
font-family: Roboto; font-family: Roboto;
display: block; display: block;
text-transform: uppercase; text-transform: uppercase;
margin: 0; margin: 0;
} }
.motivation .plan_checkout group { .plan .plan_checkout group {
font-size: 1.1em; font-size: 1.1em;
margin-bottom: 20px; margin-bottom: 20px;
} }
.motivation .plan_checkout group input:checked + label { .plan .plan_checkout group input:checked + label {
background: #639B24!important; background: #639B24!important;
border-color: #ccc!important; border-color: #ccc!important;
} }
body.dark .motivation .plan_checkout group input:checked + label { body.dark .plan .plan_checkout group input:checked + label {
border-color: #555!important; border-color: #555!important;
} }
.motivation .plan_checkout group.freq > div { .plan .plan_checkout group.freq > div {
flex: 0 0 50%; flex: 0 0 50%;
} }
.motivation .plan_checkout group.freq input:checked + label::before { .plan .plan_checkout group.freq input:checked + label::before {
content: "✓"; content: "✓";
padding-right: 5px; padding-right: 5px;
} }
.motivation .plan_checkout .service { .plan .plan_checkout .service {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 1.1em; font-size: 1.1em;
} }
.motivation .plan_checkout .service button { .plan .plan_checkout .service button {
flex: 1 1 auto; flex: 1 1 auto;
font-weight: normal; font-weight: normal;
padding: 20px 0; padding: 20px 0;
border-color: #bbb!important; border-color: #bbb!important;
box-shadow: 0 0 7px rgba(0,0,0,0.5); box-shadow: 0 0 7px rgba(0,0,0,0.5);
} }
.motivation .plan_checkout .service button:first-child { .plan .plan_checkout .service button:first-child {
margin-right: 25px; margin-right: 25px;
} }
body.dark .motivation .plan_checkout .service button { body.dark .plan .plan_checkout .service button {
border-color: #555!important; border-color: #555!important;
box-shadow: 0 0 7px rgba(255,255,255,0.5); box-shadow: 0 0 7px rgba(255,255,255,0.5);
} }
.motivation .small_team { .plan .small_team {
text-align: center; text-align: center;
font-style: italic; font-style: italic;
font-size: 1.3em; font-size: 1.3em;
margin-top: 30px; margin-top: 40px;
} }
.faq { .faq {
margin: 50px 0 40px 0; margin: 50px 0 40px 0;
@ -180,6 +180,7 @@ body.dark .motivation .plan_checkout .service button {
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.8em;
} }
body.dark .faq { body.dark .faq {
border-color: #555; border-color: #555;
@ -194,6 +195,9 @@ body.dark .faq {
font-size: 1.3em; font-size: 1.3em;
margin-bottom: 1em; margin-bottom: 1em;
} }
.faq dt:nth-of-type(2) {
margin-top: 1.5em;
}
.faq dd { .faq dd {
margin: 0; margin: 0;
} }

View file

@ -1,5 +1,6 @@
#puzzle div.lichess_game div.lichess_ground { #puzzle div.lichess_game div.lichess_ground {
width: 280px; flex: 0 0 280px;
max-width: 280px;
} }
#puzzle .game_control { #puzzle .game_control {