diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-05-21 13:09:05 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-12-13 16:59:33 +0100 |
| commit | aea0fa999fd09951835b2d74c53137624f46929e (patch) | |
| tree | 3d806b7b5c5dd8b95fd07d6f3402d2231cf981d4 /src/Highlights.vue | |
| parent | 73e2c234f2f52357b21fd9fe9b956eeabb8ddc62 (diff) | |
| download | brokentalents-aea0fa999fd09951835b2d74c53137624f46929e.tar.gz brokentalents-aea0fa999fd09951835b2d74c53137624f46929e.zip | |
major redesign
Diffstat (limited to 'src/Highlights.vue')
| -rw-r--r-- | src/Highlights.vue | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/Highlights.vue b/src/Highlights.vue new file mode 100644 index 0000000..022c23d --- /dev/null +++ b/src/Highlights.vue @@ -0,0 +1,65 @@ +<template> + <div class="columns is-multiline"> + <div class="column"> + <talent-box class="is-dark notification" + title="Overpowered" + type="Win Rate" + label="%" + :value="Math.round(100 * stats.topWin.Winner)" + :entry="stats.topWin" /> + </div> + + <div class="column"> + <talent-box class="is-dark notification" + title="Trending" + type="Total Pick Rate" + label="%" + :value="(100 * 6 * stats.topPick.Count / stats.totalPicks).toFixed(2)" + :entry="stats.topPick" /> + </div> + + <div class="column"> + <talent-box class="is-dark notification" + title="Highest Level" + type="Average Level" + :value="stats.highestLevelAvg.Level.toFixed(2)" + :entry="stats.highestLevelAvg" /> + </div> + + <div class="column"> + <talent-box class="is-dark notification" + title="Lowest Level" + type="Average Level" + :value="stats.lowestLevelAvg.Level.toFixed(2)" + :entry="stats.lowestLevelAvg" /> + </div> + </div> +</template> + +<script> +import Vue from 'vue'; +import TalentBox from './TalentBox.vue'; + +export default Vue.component('highlights', { + props: [ 'reportService' ], + computed: { + selectedMode: { + get: function() { + return this.$route.query.mode; + }, + }, + stats: function() { + return { + topWin: this.reportService.getTopWin(this.selectedMode), + topPick: this.reportService.getTopPick(this.selectedMode), + totalPicks: this.reportService.getTotalPicks(this.selectedMode), + highestLevelAvg: this.reportService.getHighestLevelAvg(this.selectedMode), + lowestLevelAvg: this.reportService.getLowestLevelAvg(this.selectedMode), + }; + }, + }, + components: { + TalentBox, + }, +}); +</script> |
