feat(ui): FRO-34 Lobby (#21)
Started with Lobby Component Co-authored-by: LQ63 <lkhermann@web.de> Co-authored-by: Janis <janis-e@gmx.de> Reviewed-on: #21 Reviewed-by: Janis <janis-e@gmx.de> Co-authored-by: lq64 <lq@blackhole.local> Co-committed-by: lq64 <lq@blackhole.local>
This commit is contained in:
@@ -6,12 +6,15 @@ const props = defineProps<{ trick: Trick }>()
|
||||
const {trick } = toRefs(props)
|
||||
|
||||
const playedCards = computed(() => {
|
||||
return [...trick.value.cards].map(card => {
|
||||
return {
|
||||
cardId: card[1].path,
|
||||
player: card[0].name
|
||||
}
|
||||
})
|
||||
if (!trick.value) return []
|
||||
let result: { cardId: string, player: string }[] = []
|
||||
for (const key in trick.value.cards) {
|
||||
result.push({
|
||||
cardId: trick.value.cards[key]?.path ?? '',
|
||||
player: key
|
||||
})
|
||||
}
|
||||
return result;
|
||||
})
|
||||
|
||||
function getCardImagePath(cardPath: string) {
|
||||
|
||||
Reference in New Issue
Block a user