Commit 6961d90 1 parent b2d09fb commit 6961d90 Copy full SHA for 6961d90
File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 22
22
<div class =" d-flex flex-wrap justify-content-around gap-2" >
23
23
<div class =" card bg-transparent bg-screen border-light border-opacity-25" style =" max-width : 180px ; width : 180px ;"
24
24
v-for =" loot in p.pages[p.index.value]" :key =" loot.id" >
25
- <img :src =" loot.getImage('latest' )" loading =" lazy" onerror =" this.onerror = null; this.src='/clean-cuts/img/error.png';" />
25
+ <img :src =" getLootImage(loot )" loading =" lazy" onerror =" this.onerror = null; this.src='/clean-cuts/img/error.png';" />
26
26
27
27
<div class =" card-body d-flex flex-column justify-content-end" >
28
28
<h5 >{{ loot.name }}</h5 >
@@ -43,6 +43,7 @@ import Pagination from "../../components/Pagination.vue";
43
43
import useClient from ' ../../composables/useClient' ;
44
44
import useIsNumeric from " ../../composables/useIsNumeric" ;
45
45
import usePagination from ' ../../composables/usePagination' ;
46
+ import { Loot } from ' ../../core/models' ;
46
47
47
48
const { client } = useClient ();
48
49
@@ -69,4 +70,13 @@ const p = computed(() => {
69
70
70
71
return usePagination (filtered , 100 );
71
72
});
73
+
74
+ const summaries = await client .championSummaries .listAsync ({locale: " default" , version: " latest" });
75
+
76
+ const getLootImage = (loot : Loot ) => {
77
+ if (loot .type .includes (' Statstone' ))
78
+ return summaries .find ((x ) => loot .name .toLowerCase ().includes (x .name .toLowerCase ()))?.getIcon ({locale: " default" , version: " latest" });
79
+
80
+ return loot .getImage (' latest' );
81
+ }
72
82
</script >
You can’t perform that action at this time.
0 commit comments