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
relay-no-until
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">
@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 {
@if(!thread.isVisibleByOther(me) && !me.troll) {
<p class="end">
@userIdLink(thread.otherUserId(me).some) has closed this thread.
<a href="@routes.Message.form?user=@thread.otherUserId(me)" class="button">Create a new one</a>
@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>
}
</p>
} else {
@form.map { f =>

View File

@ -30,7 +30,7 @@ openGraph = lila.app.ui.OpenGraph(
title = title,
url = s"$netBaseUrl${routes.Plan.index.url}",
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 =>
<div class="banner one_time_active">
<i data-icon="@patronIconChar"></i>
@ -162,6 +162,11 @@ description = "Free chess for everyone, forever!").some) {
Yes, at any time, from this page.<br />
Or you can <a href="@routes.Page.contact">contact lichess support</a>.
</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>
<dt>Are some features reserved to Patrons?</dt>

View File

@ -161,7 +161,8 @@ object mon {
}
object lag {
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")
def uncomped(key: String) = rec(s"round.move.lag.uncomped.$key")
val uncompedAll = rec(s"round.move.lag.uncomped.all")

View File

@ -62,7 +62,7 @@ private final class RelayFetch(
def updateRelay(r: Relay)(result: SyncResult): Funit = api byId id flatMap {
_ ?? { r =>
lila.mon.relay.sync.result(result.toString.toLowerCase)()
lila.mon.relay.sync.result(result.toString.toLowerCase)()
result match {
case SyncResult.Ok(0, games) =>
chapterRepo.relaysAndTagsByStudyId(r.studyId) map { chapters =>
@ -71,7 +71,7 @@ private final class RelayFetch(
chapters forall (_.looksOver)
} flatMap {
_ ?? api.updateIfChanged(r)(_.finish)
}
}
case SyncResult.Ok(nbMoves, games) =>
lila.mon.relay.moves(nbMoves)
api.update(r)(_.ensureStarted)

View File

@ -253,7 +253,7 @@ private[round] final class Round(
avgComp <- lt.avgLagComp
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.uncompedAll(uncomp.centis)
}

View File

@ -28,7 +28,7 @@ object Dependencies {
val findbugs = "com.google.code.findbugs" % "jsr305" % "3.0.1"
val hasher = "com.roundeights" %% "hasher" % "1.2.0"
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 prismic = "io.prismic" %% "scala-kit" % "1.2.11-THIB"
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/"
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")

Binary file not shown.

View File

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

View File

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