4 Commits
0.5.0 ... 0.7.0

Author SHA1 Message Date
TeamCity
027095f874 ci: bump version to v0.7.0 2025-12-10 14:22:13 +00:00
df61db2730 feat(api): FRO-14 Create Game (#14)
Added functionality to create Game so that it creates a game in the Backend

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #14
Reviewed-by: Janis <janis-e@gmx.de>
Co-authored-by: lq64 <lq@blackhole.local>
Co-committed-by: lq64 <lq@blackhole.local>
2025-12-10 15:20:33 +01:00
TeamCity
8758f95fcd ci: bump version to v0.6.0 2025-12-10 14:12:10 +00:00
ecb38510de feat: FRO-21 Create Turn Component (#13)
Reviewed-on: #13
Reviewed-by: lq64 <lq@blackhole.local>
Co-authored-by: Janis <janis.e.20@gmx.de>
Co-committed-by: Janis <janis.e.20@gmx.de>
2025-12-10 15:10:54 +01:00
5 changed files with 62 additions and 7 deletions

View File

@@ -68,3 +68,13 @@
### Features
* FRO-20 Create scoreboard component ([#12](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/12)) ([97a9f85](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/97a9f857586eb41feb056d7af0a5d8553d2bcf80))
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.5.0...0.0.0) (2025-12-10)
### Features
* FRO-21 Create Turn Component ([#13](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/13)) ([ecb3851](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/ecb38510de53b811eaaee2a39fc1ae423aed71c6))
## [0.0.0](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/compare/0.6.0...0.0.0) (2025-12-10)
### Features
* **api:** FRO-14 Create Game ([#14](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/issues/14)) ([df61db2](https://git.janis-eccarius.de/KnockOutWhist/KnockOutWhist-Frontend/commit/df61db2730b5e6b2796cbe58d1d224f1d5d6f085))

View File

@@ -0,0 +1,38 @@
<script setup lang="ts">
import { computed } from 'vue'
import type {PlayerQueue} from "@/types/GameSubTypes.ts";
const props = defineProps<{
queue: PlayerQueue
}>()
const safeNextPlayers = computed(() => props.queue.players ?? [])
</script>
<template>
<q-card flat class="turn-tracker-container q-pa-md">
<q-card-section>
<div class="text-subtitle2 q-mb-xs">Current Player</div>
<div id="current-player-name" class="text-h6 text-weight-bold text-positive">{{
props.queue.currentPlayer?.name
}}</div>
<div v-if="safeNextPlayers.length > 0" class="q-mt-md">
<div id="next-players-text" class="text-subtitle2 q-mb-xs">Next Players</div>
<q-list id="next-players-container" dense>
<q-item v-for="player in safeNextPlayers" :key="player.id">
<q-item-section>
<div class="text-body1 text-primary">{{ player.name }}</div>
</q-item-section>
</q-item>
</q-list>
</div>
</q-card-section>
</q-card>
</template>
<style scoped>
.turn-tracker-container {
max-width: 320px;
}
</style>

View File

@@ -2,7 +2,9 @@
import { ref } from 'vue';
import { useQuasar } from 'quasar';
import { useRouter } from 'vue-router';
import axios from "axios";
const api = window?.__RUNTIME_CONFIG__?.API_URL;
const lobbyName = ref('');
const isPublic = ref(false);
const playerAmount = ref(2);
@@ -16,16 +18,21 @@ const createGameQuasar = async () => {
return;
}
isLoading.value = true;
//TODO: Implement Logic to Create the Game and Redirect to Lobby
await delay(3000)
isLoading.value = false;
axios.post(`${api}/createGame`, {lobbyname: lobbyName.value, playeramount: playerAmount.value.toString()}, {withCredentials: true}).then((response) => {
const responseData = response.data
console.log("Response" + responseData.status)
$q.notify({
message: `Lobby "${lobbyName.value}" erfolgreich erstellt!`,
message: `Lobby "${lobbyName.value}" erfolgreich erstellt mit gameId ${responseData.gameId}!`,
color: 'green-6',
icon: 'check_circle',
position: 'top'
});
router.push({ name: 'mainmenu'});
router.push("/lobby")
}).catch((err) => {
console.log("ERROR:" + err)
}).finally(() =>
isLoading.value = false
)
}
</script>

View File

@@ -80,7 +80,7 @@ const onSubmit = () => {
loginError.value = ''
axios.post(`${api}/login`, {username: username.value, password: password.value}, {withCredentials: true}).then((response) => {
uInfo.setUserInfo(response.data.user.username, response.data.user.id)
router.push("/")
router.push("/mainmenu")
}).catch(() => {
loginError.value = 'Invalid username or password'
}).finally(() =>

View File

@@ -1,3 +1,3 @@
MAJOR=0
MINOR=5
MINOR=7
PATCH=0