fixed functionality on landing page

This commit is contained in:
2024-11-11 01:57:54 +01:00
parent 492426db62
commit 2848658e3d

View File

@@ -1,33 +1,46 @@
<template> <template>
<v-sheet class="w-100 h-100 d-flex flex-column justify-center align-center" color="transparent"> <v-sheet class="w-100 h-100 d-flex flex-column justify-center align-center" color="transparent">
<h1 id="main-title">Tik Tak Blow</h1> <h1 id="main-title">Tik Tak Blow</h1>
<v-btn <v-sheet color="transparent" width="25rem">
class="mt-12"
color="yellow"
height="5rem"
rounded
variant="tonal"
width="20rem"
@click="createGame">
Create Game
</v-btn>
<v-sheet class="mt-6 d-flex justify-center" color="transparent" height="3.5rem">
<v-text-field <v-text-field
v-model="lobbyId" v-model="username"
placeholder="Lobby ID" class="mt-12 mb-6"
placeholder="Username"
rounded rounded
style="margin-right: 1rem; height: 3.5rem" style="height: 3.5rem"
type="username"
variant="outlined" variant="outlined"
width="9rem" /> width="100%" />
<v-sheet class="mb-6 d-flex justify-center" color="transparent" height="3.5rem">
<v-text-field
v-model="lobbyId"
placeholder="Lobby ID"
rounded
style="margin-right: 1rem; height: 3.5rem"
variant="outlined"
width="14rem" />
<v-btn
:disabled="!(username && lobbyId)"
color="yellow"
height="3.5rem"
rounded
variant="tonal"
width="10rem"
@click="joinGame">
Spiel beitreten
</v-btn>
</v-sheet>
<v-btn <v-btn
:disabled="!lobbyId" :disabled="!(username && !lobbyId)"
color="yellow" color="yellow"
height="3.5rem" height="5rem"
rounded rounded
variant="tonal" variant="tonal"
width="10rem" width="100%"
@click="joinGame"> @click="createGame">
Join Game Spiel erstellen
</v-btn> </v-btn>
</v-sheet> </v-sheet>
</v-sheet> </v-sheet>
@@ -37,7 +50,9 @@
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const router = useRouter() const router = useRouter()
const username = ref('')
const lobbyId = ref('') const lobbyId = ref('')
const password = ref('')
const createGame = () => { const createGame = () => {
// TODO Request to Server for new Game Lobby ID // TODO Request to Server for new Game Lobby ID