2 Commits
0.6.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
4 changed files with 19 additions and 7 deletions

View File

@@ -73,3 +73,8 @@
### 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

@@ -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=6
MINOR=7
PATCH=0