From 67f93478f98fd696a38b73d4c4b68c2b73483663 Mon Sep 17 00:00:00 2001 From: BlossomiShymae <87099578+BlossomiShymae@users.noreply.github.com> Date: Mon, 10 Jun 2024 16:32:18 -0500 Subject: [PATCH] Fix images not loading, add pagination and search --- core/models.ts | 2 +- pages/companions/index.vue | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/models.ts b/core/models.ts index faaeb92..285e30a 100644 --- a/core/models.ts +++ b/core/models.ts @@ -319,6 +319,6 @@ export class Companion extends CommunityDragonObject { } getLoadoutsIcon(version: string): string { - return this.resolveGamePath({path: this.loadoutsIcon, version: version}); + return this.resolveClientPath({path: this.loadoutsIcon, args: {locale: "default", version: version}}); } } \ No newline at end of file diff --git a/pages/companions/index.vue b/pages/companions/index.vue index 307ccc4..b8d48d4 100644 --- a/pages/companions/index.vue +++ b/pages/companions/index.vue @@ -17,27 +17,23 @@ Item Id Icon Name - Species Name Species ID - + {{ companion.itemId }} - {{ companion.name }} - - {{ companion.speciesName }} - {{ companion.speciesId }} @@ -61,7 +57,8 @@ const { client } = useClient(); const query = ref(""); -const companions = await client.companions.listAsync({locale: "default", version: "latest"}); +const companions = (await client.companions.listAsync({locale: "default", version: "latest"})) + .sort((a, b) => a.itemId - b.itemId); const { isNumeric } = useIsNumeric(); const p = computed(() => {