Added better is logging function
This commit is contained in:
@@ -55,6 +55,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeydown(event) {
|
||||
if (event.ctrlKey && event.key === 's') {
|
||||
saveCharacterData();
|
||||
}
|
||||
}
|
||||
|
||||
async function saveCharacterData() {
|
||||
const res = await fetch(`${API_BASE}/api/shadowrun/characters_data/${currentCharacter.id}`, {
|
||||
method: 'POST',
|
||||
@@ -67,6 +73,8 @@
|
||||
let inventory = currentCharacter?.inventory || [];
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={handleKeydown} />
|
||||
|
||||
<h1>Name: {currentCharacter.name}</h1>
|
||||
|
||||
<h2>Character Info</h2>
|
||||
|
||||
Reference in New Issue
Block a user