summaryrefslogtreecommitdiff
path: root/src/TalentBox.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/TalentBox.vue')
-rw-r--r--src/TalentBox.vue17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/TalentBox.vue b/src/TalentBox.vue
index c779e12..d372f20 100644
--- a/src/TalentBox.vue
+++ b/src/TalentBox.vue
@@ -4,11 +4,9 @@
<article class="media">
<div class="media-left">
<figure class="image is-64x64">
- <img :src="'dist/assets/hero-icons/' + hero.toLowerCase() + '.png'" :alt="entry.Actor">
- </figure>
- <figure class="image is-64x64">
- <img :src="'dist/assets/talent-icons-small/' + hero + '/' + hero + '_' + rarity + '.png'" :alt="hero + ' ' + rarity">
+ <img :src="'dist/assets/hero-icons/' + hero + '.png'" :alt="entry.Actor">
</figure>
+ <talent-image :entry="entry"></talent-image>
</div>
<div class="media-content">
<div class="content">
@@ -21,21 +19,18 @@
<script>
import Vue from 'vue';
+import TalentImage from './TalentImage.vue';
import * as maps from './maps/maps';
export default Vue.component('talent-box', {
props: [ 'title', 'content', 'entry' ],
data: function() {
return {
+ hero: maps.getHero(this.entry.Actor).toLowerCase(),
};
},
- computed: {
- hero: function() {
- return maps.getHero(this.entry.Actor);
- },
- rarity: function() {
- return maps.getTalentRarity(this.entry.Talent);
- },
+ components: {
+ TalentImage,
},
});
</script>