Add resign button
This commit is contained in:
parent
10a4bd64d2
commit
3093754bd4
6 changed files with 79 additions and 28 deletions
|
|
@ -3,11 +3,17 @@ document.addEventListener('htmx:wsConfigSend', function (e) {
|
|||
const row = parseInt(e.target.dataset.row);
|
||||
const col = parseInt(e.target.dataset.col);
|
||||
|
||||
console.log(e.target.id);
|
||||
|
||||
// Set the custom JSON data
|
||||
e.detail.parameters = {
|
||||
type: 'make_move',
|
||||
row: row,
|
||||
col: col,
|
||||
};
|
||||
} else if (e.target.id == 'resign-button') {
|
||||
e.detail.parameters = {
|
||||
type: 'resign'
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue