1
0
forked from noxious/client
This commit is contained in:
2025-01-12 20:54:59 +01:00
parent 689e443b3d
commit 3f8c911e9d
6 changed files with 23 additions and 64 deletions

View File

@ -18,7 +18,7 @@ import Debug from '@/components/utilities/Debug.vue'
import Notifications from '@/components/utilities/Notifications.vue'
import { useGameStore } from '@/stores/gameStore'
import { useMapEditorStore } from '@/stores/mapEditorStore'
import { computed, onMounted, onUnmounted, watch } from 'vue'
import { computed, watch } from 'vue'
const gameStore = useGameStore()
const mapEditorStore = useMapEditorStore()
@ -57,7 +57,9 @@ addEventListener('keydown', (event) => {
if (gameStore.character?.role !== 'gm') return // Only allow toggling the gm panel if the character is a gm
// Check if no input is active or focus is on an input
if (event.repeat || event.isComposing || event.defaultPrevented || document.activeElement?.tagName.toUpperCase() === 'INPUT' || document.activeElement?.tagName.toUpperCase() === 'TEXTAREA') return
if (event.repeat || event.isComposing || event.defaultPrevented || document.activeElement?.tagName.toUpperCase() === 'INPUT' || document.activeElement?.tagName.toUpperCase() === 'TEXTAREA') {
return
}
if (event.key === 'G') {
gameStore.toggleGmPanel()