From 5f2b29324dfd8dde1cd1a3993219e9bbe1a77177 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sun, 11 Oct 2020 16:31:40 +0200 Subject: [PATCH] Reflecting changes no longer use props in Wine.vue Reflecting changes now that wine should not have custom logic. No longer send prop values other than wine down. WinnerPage function called from the slot passed down, not using custom :winner prop and @chosenWine event. --- src/components/RegisterPage.vue | 12 ++++++++---- src/components/TodaysPage.vue | 12 +++++------- src/components/WinnerPage.vue | 34 ++++++++++++++++----------------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/src/components/RegisterPage.vue b/src/components/RegisterPage.vue index 0cebbe9..52345d4 100644 --- a/src/components/RegisterPage.vue +++ b/src/components/RegisterPage.vue @@ -85,7 +85,7 @@

Vinnere

Refresh data fra virtuelt lotteri
- +
@@ -500,6 +500,10 @@ hr { color: grey; } +.button-container { + margin-top: 1rem; +} + .page-container { padding: 0 1.5rem 3rem; @@ -537,10 +541,10 @@ hr { } .winner-element { display: flex; - flex-direction: row; + flex-direction: column; - @include desktop { - margin-top: 1.5rem; + > div { + margin-bottom: 1rem; } @include mobile { diff --git a/src/components/TodaysPage.vue b/src/components/TodaysPage.vue index 0dfdf12..0ec99f3 100644 --- a/src/components/TodaysPage.vue +++ b/src/components/TodaysPage.vue @@ -1,10 +1,8 @@ @@ -47,7 +45,7 @@ h1 { .wines-container { display: flex; flex-wrap: wrap; - justify-content: space-between; + justify-content: space-evenly; margin: 0 2rem; @media (min-width: 1500px) { diff --git a/src/components/WinnerPage.vue b/src/components/WinnerPage.vue index 434f9d7..adf9489 100644 --- a/src/components/WinnerPage.vue +++ b/src/components/WinnerPage.vue @@ -2,23 +2,18 @@

Gratulerer {{name}}!

-

Her er valgene for dagens lotteri, du har 10 minutter å velge etter du fikk SMS-en.

+

+ Her er valgene for dagens lotteri, du har 10 minutter å velge etter du fikk SMS-en. +

Finner ikke noen vinner her..

Du må vente på tur..

-
-
- + + +
@@ -64,7 +59,7 @@ export default { this.wines = await _wines.json(); }, methods: { - chosenWine: async function(name) { + chooseWine: async function(name) { let posted = await postWineChosen(this.id, name); console.log("response", posted); if (posted.success) { @@ -93,9 +88,14 @@ export default { flex-direction: column; } +.select-wine { + margin-top: 1rem; +} + .wines-container { - justify-content: center; display: flex; - flex-direction: column; + flex-wrap: wrap; + justify-content: space-evenly; + align-items: flex-start; } \ No newline at end of file