Add resign button

This commit is contained in:
sepia 2025-07-21 22:54:03 -05:00
parent 10a4bd64d2
commit 3093754bd4
6 changed files with 79 additions and 28 deletions

View file

@ -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'
};
}
});