feat/FRO-31: Added ingame (#20)

Force push of Janis ingame changes

Co-authored-by: Janis <janis.e.20@gmx.de>
Reviewed-on: #20
This commit is contained in:
2025-12-11 00:15:50 +01:00
parent 97b7df2a75
commit 39898ed03b
11 changed files with 209 additions and 13 deletions

33
src/views/Game.vue Normal file
View File

@@ -0,0 +1,33 @@
<script setup lang="ts">
import {useWebSocket} from "@/composables/useWebsocket.ts";
import {useIngame} from "@/composables/useIngame.ts";
import Ingame from "@/components/Ingame.vue";
import {useUserInfo} from "@/composables/useUserInfo.ts";
import router from "@/router";
const wb = useWebSocket()
const ig = useIngame()
const ui = useUserInfo()
ui.requestState()
if (ui.gameId) {
ig.requestGame(ui.gameId)
wb.connect()
} else {
router.replace("/")
}
</script>
<template>
<div class="lobby-background">
<Ingame v-if="ig.state === 'InGame'" />
</div>
</template>
<style scoped>
.lobby-background {
background-color: var(--body-background-color);
width: 100%;
min-height:100vh;
}
</style>