From 6961d90c2cacb5b20df0a1e85af1f548e801a485 Mon Sep 17 00:00:00 2001
From: BlossomiShymae <87099578+BlossomiShymae@users.noreply.github.com>
Date: Thu, 13 Jun 2024 19:05:52 -0500
Subject: [PATCH] Use champion icons for statstones
---
pages/loots/index.vue | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/pages/loots/index.vue b/pages/loots/index.vue
index 809d4c2..f435aa6 100644
--- a/pages/loots/index.vue
+++ b/pages/loots/index.vue
@@ -22,7 +22,7 @@
-
![]()
+
{{ loot.name }}
@@ -43,6 +43,7 @@ import Pagination from "../../components/Pagination.vue";
import useClient from '../../composables/useClient';
import useIsNumeric from "../../composables/useIsNumeric";
import usePagination from '../../composables/usePagination';
+import { Loot } from '../../core/models';
const { client } = useClient();
@@ -69,4 +70,13 @@ const p = computed(() => {
return usePagination(filtered, 100);
});
+
+const summaries = await client.championSummaries.listAsync({locale: "default", version: "latest"});
+
+const getLootImage = (loot: Loot) => {
+ if (loot.type.includes('Statstone'))
+ return summaries.find((x) => loot.name.toLowerCase().includes(x.name.toLowerCase()))?.getIcon({locale: "default", version: "latest"});
+
+ return loot.getImage('latest');
+}
\ No newline at end of file