forked from noxious/client
npm update, updated tile & sprite detail (remove>delete)
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<div class="relative p-2.5 flex flex-col items-center justify-between h-72">
|
||||
<div class="filler"></div>
|
||||
<img class="max-h-72" :src="`${config.server_endpoint}/assets/tiles/${selectedTile?.id}.png`" :alt="'Tile ' + selectedTile?.id" />
|
||||
<button class="btn-bordeaux px-4 py-1.5 min-w-24" type="button" @click.prevent="removeTile">Remove</button>
|
||||
<button class="btn-bordeaux px-4 py-1.5 min-w-24" type="button" @click.prevent="deleteTile">Delete</button>
|
||||
<div class="absolute left-0 bottom-0 w-full h-px bg-cyan-200"></div>
|
||||
</div>
|
||||
<div class="m-2.5 p-2.5 block">
|
||||
@ -55,10 +55,10 @@ watch(selectedTile, (tile: Tile | null) => {
|
||||
tileTags.value = tile.tags
|
||||
})
|
||||
|
||||
function removeTile() {
|
||||
gameStore.connection?.emit('gm:tile:remove', { tile: selectedTile.value?.id }, (response: boolean) => {
|
||||
function deleteTile() {
|
||||
gameStore.connection?.emit('gm:tile:delete', { id: selectedTile.value?.id }, (response: boolean) => {
|
||||
if (!response) {
|
||||
console.error('Failed to remove tile')
|
||||
console.error('Failed to delete tile')
|
||||
return
|
||||
}
|
||||
refreshTileList()
|
||||
|
Reference in New Issue
Block a user