summaryrefslogtreecommitdiff
path: root/src/ModeTab.vue
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-05-21 16:28:24 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 16:59:35 +0100
commitb7a276d54ae88fde32cd1fba0ec4bb1ac41cab55 (patch)
tree7d8a71b1da5fb4f6aa217fd88ed87212d05a036b /src/ModeTab.vue
parent365e27048fc9a17137fc3d5488103085384af1b9 (diff)
downloadbrokentalents-b7a276d54ae88fde32cd1fba0ec4bb1ac41cab55.tar.gz
brokentalents-b7a276d54ae88fde32cd1fba0ec4bb1ac41cab55.zip
Support talentless modes
Diffstat (limited to 'src/ModeTab.vue')
-rw-r--r--src/ModeTab.vue14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ModeTab.vue b/src/ModeTab.vue
index e629ef0..09bc343 100644
--- a/src/ModeTab.vue
+++ b/src/ModeTab.vue
@@ -1,18 +1,18 @@
<template>
<div>
<div class="columns is-multiline">
- <div class="column">
+ <div class="column" v-if="hasTalents">
<h2 class="title is-2">Highlights</h2>
<highlights :reportService="reportService"></highlights>
</div>
<div class="column is-narrow">
- <h2 class="title is-2">Top 10 Talents</h2>
+ <h2 class="title is-2">Top 10</h2>
<top-talents-box :reportService="reportService"></top-talents-box>
</div>
</div>
- <div class="columns is-multiline">
+ <div class="columns is-multiline" v-if="hasTalents">
<h2 class="title is-2">Individual Hero Statistics</h2>
<div class="column is-two-thirds">
<hero-draft-grid :reportService="reportService"></hero-draft-grid>
@@ -36,9 +36,17 @@ import TopTalentsBox from './TopTalentsBox.vue';
import HeroDraftGrid from './HeroDraftGrid.vue';
import HeroTalentTable from './HeroTalentTable.vue';
import ReportTable from './ReportTable.vue';
+import RouterParamMixin from './RouterParamMixin';
+import * as maps from './maps/maps.js';
export default Vue.component('mode-tab', {
props: [ 'reportService' ],
+ mixins: [ RouterParamMixin ],
+ computed: {
+ hasTalents: function() {
+ return maps.hasTalents(this.selectedMode);
+ },
+ },
components: {
Highlights,
TopTalentsBox,