Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/lichess-org/lila
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jul 29, 2024
2 parents c840908 + da837f4 commit d6815da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/RelayRound.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ final class RelayRound(
json = doApiShow(id)
)

def apiShow(ts: String, rs: String, id: RelayRoundId) = AnonOrScoped(_.Study.Read):
def apiShow(ts: String, rs: String, id: RelayRoundId) = AnonOrScoped(_.Study.Read, _.Web.Mobile):
doApiShow(id)

private def doApiShow(id: RelayRoundId)(using Context): Fu[Result] =
Expand Down
2 changes: 1 addition & 1 deletion modules/web/src/main/CtrlErrors.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ trait CtrlErrors extends ControllerHelpers:
.mapValues: errors =>
JsArray:
errors.map: e =>
JsString(I18nKey(e.message).txt(e.args))
JsString(I18nKey(e.message).txt(e.args*))
.toMap
json.validate(jsonGlobalErrorRenamer).getOrElse(json)

Expand Down
4 changes: 2 additions & 2 deletions ui/bits/src/bits.cropDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export async function initModule(o?: CropOpts) {
maxWidth: opts.max?.pixels,
maxHeight: opts.max?.pixels,
});
const tryQuality = (quality = 0.9) => {
const tryQuality = (quality = 1) => {
canvas.toBlob(
blob => {
if (blob && blob.size < (opts.max?.megabytes ?? 100) * 1024 * 1024) submit(blob);
else if (blob && quality > 0.05) tryQuality(quality * 0.9);
else submit(false, 'Rendering failed');
},
'image/jpeg',
'image/png',
quality,
);
};
Expand Down

0 comments on commit d6815da

Please sign in to comment.