Bugfixes. Optimizations/refactor. Add redis for player-cache. Add docker files. Replace sqlite dep. Single-Calc for existing players. Game-Metrics in JSON.

This commit is contained in:
MaxJa4
2024-01-21 00:49:20 +01:00
parent 069d76520e
commit da1108d441
41 changed files with 1154 additions and 203 deletions

View File

@@ -34,8 +34,8 @@
modalBodyInput.innerText = selectedPlayer;
const playerListId = button.closest('ul').parentElement.parentElement.id;
const homeClanListIndex = document.getElementById('home-clan').selectedIndex;
const oppClanListIndex = document.getElementById('opponent-clan').selectedIndex;
const homeClanList = document.getElementById('home-clan');
const oppClanList = document.getElementById('opponent-clan');
const submitButton = deletePlayerModal.querySelector('button[name="submit"]');
submitButton.addEventListener('click', function () {
@@ -46,7 +46,7 @@
}
})
.then(() => {
const sameClan = homeClanListIndex === oppClanListIndex;
const sameClan = homeClanList.selectedIndex === oppClanList.selectedIndex;
if (playerListId === 'home-player-list' || sameClan)
htmx.ajax('GET', '/players_html', {target: '#home-player-list', values: {"clan_id": getSelectedClanId("home-clan")}});
if (playerListId === 'opponent-player-list' || sameClan)