rename teamAdmin ui module

js-sound-v2
Thibault Duplessis 2020-09-12 18:54:21 +02:00
parent 33c41d6d6c
commit 819e57f2d7
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ object admin {
views.html.base.layout(
title = title,
moreCss = frag(cssTag("team"), cssTag("tagify")),
moreJs = jsModule("team-admin")
moreJs = jsModule("team.admin")
) {
main(cls := "page-menu page-small")(
bits.menu(none),

View File

@ -2,7 +2,7 @@ import Tagify from '@yaireo/tagify'
import debounce from 'debounce-promise';
import * as xhr from 'common/xhr';
window.lichess.load.then(() => {
lichess.load.then(() => {
const input = document.getElementById('form3-leaders') as HTMLInputElement;
@ -13,7 +13,7 @@ window.lichess.load.then(() => {
whitelist: input.value.trim().split(/\s*,\s*/)
});
const doFetch: (term: string) => Promise<string[]> = debounce(
(term: string) => xhr.json(`/player/autocomplete?term=${encodeURIComponent(term)}&names=1`),
(term: string) => xhr.json(xhr.url('/player/autocomplete', { term, names: 1 })),
300
);
tagify.on('input', e => {