1
0
forked from noxious/client

Removed console.log, renamed hars to characterHairs

This commit is contained in:
Dennis Postma 2024-11-24 20:28:50 +01:00
parent 937ce939d1
commit 64f5ac45dd

View File

@ -80,7 +80,7 @@
</div> </div>
<!-- TODO #255: make radio button so we can set a value, do the same with swatches --> <!-- TODO #255: make radio button so we can set a value, do the same with swatches -->
<div <div
v-for="hair in hairs" v-for="hair in characterHairs"
class="relative flex justify-center items-center bg-gray border border-solid border-gray-500 w-[18px] h-[18px] p-2 rounded-sm class="relative flex justify-center items-center bg-gray border border-solid border-gray-500 w-[18px] h-[18px] p-2 rounded-sm
hover:bg-gray-500 hover:border-gray-400 hover:bg-gray-500 hover:border-gray-400
focus-visible:outline-none focus-visible:border-gray-300 focus-visible:bg-gray-500 focus-visible:outline-none focus-visible:border-gray-300 focus-visible:bg-gray-500
@ -162,7 +162,7 @@ const isLoading = ref(true)
const characters = ref([] as CharacterT[]) const characters = ref([] as CharacterT[])
const deletingCharacter = ref(null as CharacterT | null) const deletingCharacter = ref(null as CharacterT | null)
const hairs = ref([] as CharacterHair[]) const characterHairs = ref([] as CharacterHair[])
const selectedHair = ref(null as CharacterHair | null) const selectedHair = ref(null as CharacterHair | null)
// Fetch characters // Fetch characters
@ -173,8 +173,7 @@ gameStore.connection?.on('character:list', (data: any) => {
// Fetch hairs // Fetch hairs
// @TODO: This is hacky, we should have a better way to do this // @TODO: This is hacky, we should have a better way to do this
gameStore.connection?.emit('character:hair:list', {}, (data: CharacterHair[]) => { gameStore.connection?.emit('character:hair:list', {}, (data: CharacterHair[]) => {
console.log(data) characterHairs.value = data
hairs.value = data
}) })
}) })