diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-05-21 17:47:52 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-12-13 16:59:36 +0100 |
| commit | 1b8f06b5942ba6ff0375d39cbca466a6f6322f6d (patch) | |
| tree | ce54edb5314441b701661102646ab4d8570895dd /src | |
| parent | dd0af4570e56744ae1ca9264e63041fd5bbe10ba (diff) | |
| download | brokentalents-1b8f06b5942ba6ff0375d39cbca466a6f6322f6d.tar.gz brokentalents-1b8f06b5942ba6ff0375d39cbca466a6f6322f6d.zip | |
Add footer
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.vue | 31 | ||||
| -rw-r--r-- | src/index.js | 4 | ||||
| -rw-r--r-- | src/report-service.js | 6 |
3 files changed, 40 insertions, 1 deletions
diff --git a/src/App.vue b/src/App.vue index 86770db..63030e2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,6 +14,25 @@ </section> <router-view></router-view> + + <footer class="footer"> + <div class="container"> + <div class="content has-text-centered"> + <p> + Last update: 2018-05-21, with {{ totalMatches }} matches total. + Join the <a href="https://discord.gg/txTchJY">Discord Server</a> if you have questions. + </p> + <p> + <strong>BrokenTalentsFun</strong> by shutterfly (<a href="https://schneefux.xyz">@schneefux</a>). + <a href="https://github.com/BrokenTalents/brokentalents.github.io">Source Code</a>. + Built with the <a href="http://developer.vainglorygame.com">Vainglory API</a>. + Images by <a href="https://vainglorygame.com">Super Evil Mega Corp</a>. + </p> + <p> + </p> + </div> + </div> + </footer> </div> </template> @@ -29,3 +48,15 @@ background-size: cover; } </style> + +<script> +export default { + name: 'App', + props: [ 'reportService' ], + data: function() { + return { + totalMatches: Math.floor(this.reportService.getTotalMatches()/100)*100, + }; + }, +}; +</script> diff --git a/src/index.js b/src/index.js index 3b3839d..1c1bfaf 100644 --- a/src/index.js +++ b/src/index.js @@ -27,5 +27,7 @@ const router = new VueRouter({ new Vue({ router, el: '#app', - render: h => h(App), + render: h => h(App, { + props: { reportService }, + }), }); diff --git a/src/report-service.js b/src/report-service.js index 7443672..20af7ad 100644 --- a/src/report-service.js +++ b/src/report-service.js @@ -19,6 +19,7 @@ export default class ReportService { this.topLeveledUp = new Map(); this.topLeveledDown = new Map(); this.topUnpopularWins = new Map(); + this.totalMatches = 0; this.actors = []; this.modes = MODES; @@ -28,6 +29,7 @@ export default class ReportService { this.reports.set(mode, this.report.filter((entry) => entry.Mode == mode)); this.totalPicks.set(mode, this.report.map((entry) => entry.Count).reduce((agg, cur) => agg + cur, 0)); + this.totalMatches += this.totalPicks.get(mode) / maps.playersPerMatch(mode); this.top10Relevancy.set(mode, this.reports.get(mode) .sort((entry1, entry2) => relevancy(entry2) - relevancy(entry1)) .slice(0, 10)); @@ -120,4 +122,8 @@ export default class ReportService { getModes() { return this.modes; } + + getTotalMatches() { + return this.totalMatches; + } } |
