diff --git a/public/index.html b/public/index.html index 5231c0c..8fdcfd8 100644 --- a/public/index.html +++ b/public/index.html @@ -2,12 +2,12 @@ Vinlottis - +
- + - + diff --git a/src/ui/Highscore.vue b/src/ui/Highscore.vue index 80b4cd8..8dfb6e4 100644 --- a/src/ui/Highscore.vue +++ b/src/ui/Highscore.vue @@ -2,9 +2,7 @@

Highscore

    -
  1. - {{ person.name }} - {{ person.wins.length }} -
  2. +
  3. {{ person.name }} - {{ person.wins.length }}
@@ -15,10 +13,11 @@ export default { return { highscore: [] }; }, async mounted() { - let _response = await fetch( - "/api/highscore/statistics" - ); + let _response = await fetch("/api/highscore/statistics"); let response = await _response.json(); + response.sort((a, b) => { + return a.wins.length > b.wins.length ? 1 : -1; + }); this.highscore = response; } }; diff --git a/src/ui/PurchaseGraph.vue b/src/ui/PurchaseGraph.vue index 5437215..a2310fd 100644 --- a/src/ui/PurchaseGraph.vue +++ b/src/ui/PurchaseGraph.vue @@ -12,33 +12,31 @@ export default { let canvas = this.$refs["purchase-chart"].getContext("2d"); console.log(canvas); - let _response = await fetch( - "/api/purchase/statistics" - ); + let _response = await fetch("/api/purchase/statistics"); let response = await _response.json(); let labels = []; let blue = { label: "Blå", borderColor: "#4bcffa", - backgroundColor: "#4bcffa42", + backgroundColor: "#4bcffa10", data: [] }; let yellow = { label: "Gul", borderColor: "#ffdd59", - backgroundColor: "#ffdd5942", + backgroundColor: "#ffdd5910", data: [] }; let red = { label: "Rød", borderColor: "#ef5777", - backgroundColor: "#ef577742", + backgroundColor: "#ef577710", data: [] }; let green = { label: "Grønn", borderColor: "#0be881", - backgroundColor: "#0be88142", + backgroundColor: "#0be88110", data: [] }; diff --git a/src/ui/TotalBought.vue b/src/ui/TotalBought.vue index 04b1fb9..5415898 100644 --- a/src/ui/TotalBought.vue +++ b/src/ui/TotalBought.vue @@ -28,6 +28,13 @@
{{ green.win }} vinn
{{ greenPercentage }}% vinn
+
+
+ totalt  + {{ total }} kjøpt +
+
{{ totalWin }} vinn
+
@@ -85,7 +98,8 @@ export default { .green, .blue, .yellow, -.red { +.red, +.total { font-size: 2rem; font-weight: bold; }