fix "new game" button with rating range
This commit is contained in:
parent
f017c6dec6
commit
299a2d1232
|
@ -63,8 +63,9 @@ export default function LichessLobby(opts: LobbyOpts) {
|
||||||
lichess.StrongSocket.firstConnect.then(() => {
|
lichess.StrongSocket.firstConnect.then(() => {
|
||||||
const gameId = getParameterByName('hook_like');
|
const gameId = getParameterByName('hook_like');
|
||||||
if (!gameId) return;
|
if (!gameId) return;
|
||||||
|
const ratingRange = lobby.setup.stores.hook.get()?.ratingRange;
|
||||||
xhr.text(
|
xhr.text(
|
||||||
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${lobby.setup.ratingRange() || ''}`,
|
`/setup/hook/${lichess.sri}/like/${gameId}?rr=${ratingRange || ''}`,
|
||||||
{ method: 'post' });
|
{ method: 'post' });
|
||||||
lobby.setTab('real_time');
|
lobby.setTab('real_time');
|
||||||
history.replaceState(null, '', '/');
|
history.replaceState(null, '', '/');
|
||||||
|
|
|
@ -203,6 +203,7 @@ export default class Setup {
|
||||||
rating + parseInt(form.ratingRange_range_min.value),
|
rating + parseInt(form.ratingRange_range_min.value),
|
||||||
rating + parseInt(form.ratingRange_range_max.value)
|
rating + parseInt(form.ratingRange_range_max.value)
|
||||||
].join('-');
|
].join('-');
|
||||||
|
save();
|
||||||
const poolMember = this.hookToPoolMember(color, form);
|
const poolMember = this.hookToPoolMember(color, form);
|
||||||
modal.close();
|
modal.close();
|
||||||
if (poolMember) {
|
if (poolMember) {
|
||||||
|
|
Loading…
Reference in a new issue