From 2dd280ce2548607f66029388795680d7f39796b8 Mon Sep 17 00:00:00 2001 From: Settel Date: Sun, 15 Aug 2021 18:52:15 +0200 Subject: [PATCH] show quote --- client/src/components/GameControls.vue | 6 +++ client/src/components/Play.vue | 46 ++++++++++++++++++++++ client/src/components/Quote.vue | 29 ++++++++++++++ client/src/pages/play.vue | 24 +++++++---- client/src/plugins/engine/parseSyncData.js | 1 + client/src/store/game.js | 4 +- client/src/store/round.js | 11 ++++++ 7 files changed, 112 insertions(+), 9 deletions(-) create mode 100644 client/src/components/Play.vue create mode 100644 client/src/components/Quote.vue create mode 100644 client/src/store/round.js diff --git a/client/src/components/GameControls.vue b/client/src/components/GameControls.vue index 04509ab..2285c33 100644 --- a/client/src/components/GameControls.vue +++ b/client/src/components/GameControls.vue @@ -31,5 +31,11 @@ export default { .gamecontrols { padding: 8px 1em; border-bottom: 1px solid #808080; + + button { + font-family: Dosis; + padding: 0 1rem; + font-size: 18px; + } } diff --git a/client/src/components/Play.vue b/client/src/components/Play.vue new file mode 100644 index 0000000..34de5c4 --- /dev/null +++ b/client/src/components/Play.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/client/src/components/Quote.vue b/client/src/components/Quote.vue new file mode 100644 index 0000000..4482894 --- /dev/null +++ b/client/src/components/Quote.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/client/src/pages/play.vue b/client/src/pages/play.vue index d9b5540..ffb5457 100644 --- a/client/src/pages/play.vue +++ b/client/src/pages/play.vue @@ -1,14 +1,12 @@ @@ -30,3 +28,15 @@ export default { }, } + + diff --git a/client/src/plugins/engine/parseSyncData.js b/client/src/plugins/engine/parseSyncData.js index 4d46136..e0e4a97 100644 --- a/client/src/plugins/engine/parseSyncData.js +++ b/client/src/plugins/engine/parseSyncData.js @@ -3,4 +3,5 @@ export default function(data) { store.commit('engine/setJson', data) store.commit('game/setStateAndPhase', data.game) + store.commit('round/setRound', data.game.round) } diff --git a/client/src/store/game.js b/client/src/store/game.js index 2d486ed..1929d86 100644 --- a/client/src/store/game.js +++ b/client/src/store/game.js @@ -1,6 +1,6 @@ export const state = () => ({ - state: "...", - phase: "...", + state: "", + phase: "", }) export const mutations = { diff --git a/client/src/store/round.js b/client/src/store/round.js new file mode 100644 index 0000000..530e372 --- /dev/null +++ b/client/src/store/round.js @@ -0,0 +1,11 @@ +export const state = () => ({ + quote: "", + sources: [], +}) + +export const mutations = { + setRound(state, { quote, sources }) { + state.quote = quote + state.sources = sources + }, +}