diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 1f63db7..77cd821 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -29,8 +29,7 @@ const butts = () => { - - + --> + @@ -25,11 +32,12 @@ import { CharacterManagerClient } from '../proto/character.client' import { GrpcWebFetchTransport } from '@protobuf-ts/grpcweb-transport' import { watchDebounced } from '@vueuse/core' +import CharacterSelectorRow from './CharacterSelectorRow.vue' + const characterSearch = ref('') const playerSearch = ref('') -const characterList = ref([]) - +const characterList = ref(new Array()) const client = new CharacterManagerClient( new GrpcWebFetchTransport({ @@ -40,12 +48,20 @@ const client = new CharacterManagerClient( watchDebounced( [characterSearch, playerSearch], - ([newCharacterValue, oldCharacterValue], [newPlayerValue, oldPlayerValue]) => { + ( + [newCharacterValue, oldCharacterValue], + [newPlayerValue, oldPlayerValue], + ) => { console.log(newCharacterValue) console.log(newPlayerValue) - client.listCharacters({characterName: characterSearch.value, playerName: playerSearch.value}).then((res) => { - characterList.value = res.response.characters - }) + client + .listCharacters({ + characterName: characterSearch.value, + playerName: playerSearch.value, + }) + .then((res) => { + characterList.value = res.response.characters + }) }, { debounce: 500 }, ) diff --git a/frontend/src/components/CharacterSelectorRow.vue b/frontend/src/components/CharacterSelectorRow.vue new file mode 100644 index 0000000..e881eee --- /dev/null +++ b/frontend/src/components/CharacterSelectorRow.vue @@ -0,0 +1,28 @@ + + + + + {{ character.characterName || "Unkown Character"}} + ( {{ character.playerName || "Unkown Player"}} ) + + + + Alias: {{ character.characterAlias }} + + + + + + + +