summaryrefslogtreecommitdiff
path: root/src/TalentImage.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/TalentImage.vue')
-rw-r--r--src/TalentImage.vue20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/TalentImage.vue b/src/TalentImage.vue
new file mode 100644
index 0000000..ccf3147
--- /dev/null
+++ b/src/TalentImage.vue
@@ -0,0 +1,20 @@
+<template>
+ <figure class="image is-64x64">
+ <img :src="'dist/assets/talent-icons-small/' + hero + '/' + hero + '_' + rarity + '.png'" :alt="hero + ' ' + rarity">
+ </figure>
+</template>
+
+<script>
+import Vue from 'vue';
+import * as maps from './maps/maps';
+
+export default Vue.component('talent-image', {
+ props: [ 'entry' ],
+ data: function() {
+ return {
+ hero: maps.getHero(this.entry.Actor),
+ rarity: maps.getTalentRarity(this.entry.Talent),
+ };
+ },
+});
+</script>