diff --git a/frontend/ui/RaffleGenerator.vue b/frontend/ui/RaffleGenerator.vue index 7ba51c3..bf3679d 100644 --- a/frontend/ui/RaffleGenerator.vue +++ b/frontend/ui/RaffleGenerator.vue @@ -2,28 +2,28 @@
- +
-
+
- -
- Rød: {{ red }} - Blå: {{ blue }} - Gul: {{ yellow }} - Grønn: {{ green }} -
@@ -64,11 +52,15 @@ export default { type: Boolean, required: false, default: false + }, + compact: { + type: Boolean, + default: false } }, data() { return { - numberOfRaffles: 4, + numberOfRaffles: 6, colors: [], blue: 0, red: 0, @@ -101,18 +93,21 @@ export default { if (time == 5) { this.generating = false; this.generated = true; - if (this.numberOfRaffles > 1 && - [this.redCheckbox, this.greenCheckbox, this.yellowCheckbox, this.blueCheckbox].filter(value => value == true).length == 1) { - return + if ( + this.numberOfRaffles > 1 && + [this.redCheckbox, this.greenCheckbox, this.yellowCheckbox, this.blueCheckbox].filter(value => value == true) + .length == 1 + ) { + return; } if (new Set(this.colors).size == 1) { alert("BINGO"); } - this.emitColors() + this.emitColors(); - window.ga('send', { + window.ga("send", { hitType: "event", eventCategory: "Raffles", eventAction: "Generate", @@ -147,8 +142,7 @@ export default { } if (this.numberOfRaffles > 0) { for (let i = 0; i < this.numberOfRaffles; i++) { - let color = - randomArray[Math.floor(Math.random() * randomArray.length)]; + let color = randomArray[Math.floor(Math.random() * randomArray.length)]; this.colors.push(color); if (color == 1) { this.red += 1; @@ -201,12 +195,12 @@ export default {