TS improvement
This commit is contained in:
parent
94f8398545
commit
9f71107a00
@ -44,21 +44,21 @@ onMounted(async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function fetchZones() {
|
function fetchZones() {
|
||||||
gameStore.connection.emit('gm:zone_editor:zone:list', {}, (response: Zone[]) => {
|
gameStore.connection?.emit('gm:zone_editor:zone:list', {}, (response: Zone[]) => {
|
||||||
zoneEditorStore.setZoneList(response)
|
zoneEditorStore.setZoneList(response)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadZone(id: number) {
|
function loadZone(id: number) {
|
||||||
console.log('loadZone', id)
|
console.log('loadZone', id)
|
||||||
gameStore.connection.emit('gm:zone_editor:zone:request', { zoneId: id }, (response: Zone) => {
|
gameStore.connection?.emit('gm:zone_editor:zone:request', { zoneId: id }, (response: Zone) => {
|
||||||
zoneEditorStore.setZone(response)
|
zoneEditorStore.setZone(response)
|
||||||
})
|
})
|
||||||
zoneEditorStore.toggleZoneListModal()
|
zoneEditorStore.toggleZoneListModal()
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteZone(id: number) {
|
function deleteZone(id: number) {
|
||||||
gameStore.connection.emit('gm:zone_editor:zone:delete', { zoneId: id }, () => {
|
gameStore.connection?.emit('gm:zone_editor:zone:delete', { zoneId: id }, () => {
|
||||||
fetchZones()
|
fetchZones()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user