Files
front/pages/index.vue
T
legonzaur 3892e4595b
release-tag / release-image (push) Failing after 50s
first grpc implementation
2024-05-20 15:01:04 +02:00

40 lines
1.0 KiB
Vue

<script setup lang="ts">
// import goStore, { setReady } from "@/netcode";
import { subscribeObject } from '~/netcode';
subscribeObject("0")
</script>
<template>
<div class="root_page_div">
<!-- <div id="game_status">
<template v-if="goStore.self && !goStore.current_game?.started">
<input @click.prevent="setReady(($event.target as HTMLInputElement).checked)" type="checkbox" id="ready"
:checked="goStore.self?.ready" />
<label for="ready">Ready</label>
</template>
</div>
<LoginView v-if="goStore.context === 'login'"></LoginView>
<GameBoard v-if="goStore.context != 'lobby' && goStore.context != 'login'"></GameBoard>
<LobbyView v-if="goStore.context == 'lobby'"></LobbyView>
<RulesDisplay v-if="goStore.context == 'rules'"></RulesDisplay> -->
</div>
</template>
<style>
.root_page_div {
height: 100%;
}
#game_status {
position: fixed;
z-index: 10;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(255, 255, 255, .75);
}
</style>