fix default zoom

This commit is contained in:
Niklas Fiekas 2019-04-11 10:32:35 +02:00
parent d59b1537c2
commit 4dabc51a2c
2 changed files with 2 additions and 2 deletions

View file

@ -46,7 +46,7 @@ object Pref extends LilaController {
def set(name: String) = OpenBody { implicit ctx =>
implicit val req = ctx.body
if (name == "zoom") {
Ok.withCookies(LilaCookie.session("zoom", (getInt("v") | 100).toString)).fuccess
Ok.withCookies(LilaCookie.session("zoom", (getInt("v") | 180).toString)).fuccess
} else {
implicit val req = ctx.body
(setters get name) ?? {

View file

@ -20,7 +20,7 @@ export type PublishZoom = (v: number) => void;
export function ctrl(data: BoardData, trans: Trans, redraw: Redraw, close: Close): BoardCtrl {
data.zoom = data.zoom || 100;
data.zoom = data.zoom || 180;
const saveZoom = window.lichess.debounce(() => {
$.ajax({ method: 'post', url: '/pref/zoom?v=' + data.zoom });