From 890c691b3ee3be52c3e10550c14ca9d204d4d689 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Fri, 11 May 2018 22:22:08 +0200
Subject: add hero search box to BR tab

---
 src/TalentBox.vue | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

(limited to 'src/TalentBox.vue')

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>
-- 
cgit v1.3.1

