From 019f359854d2071eb1c889f94c5e719c78025907 Mon Sep 17 00:00:00 2001 From: Tim van Veenendaal Date: Wed, 14 Jul 2021 20:41:29 +0200 Subject: [PATCH] Greatly improve the frontent for history etc. --- src/components/Die.vue | 2 +- src/services/PerudoApi.ts | 7 ++ src/views/Home.vue | 209 +++++++++++++++++++++++++++----------- 3 files changed, 155 insertions(+), 63 deletions(-) diff --git a/src/components/Die.vue b/src/components/Die.vue index 9a38939..086a372 100644 --- a/src/components/Die.vue +++ b/src/components/Die.vue @@ -7,6 +7,6 @@ import {Component, Prop, Vue} from 'vue-property-decorator' @Component export default class Die extends Vue { - @Prop() private number: number; + @Prop() private number!: number; } diff --git a/src/services/PerudoApi.ts b/src/services/PerudoApi.ts index 204556e..f786858 100644 --- a/src/services/PerudoApi.ts +++ b/src/services/PerudoApi.ts @@ -55,6 +55,13 @@ export default class PerudoApi { }); } + public callBluff(playerId: string): Promise { + return this.post('player/call/' + playerId) + .then((response: AxiosResponse) => { + return response.data; + }); + } + private get(url: string, getParameters?: Record): AxiosPromise { return axios.get(PerudoApi.baseUrl + url).then((response: AxiosResponse) => { // @ts-ignore diff --git a/src/views/Home.vue b/src/views/Home.vue index 697ad74..fccf069 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,69 +1,100 @@