mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 10:10:47 +01:00
Add overview for TFT damage skins
This commit is contained in:
@@ -11,8 +11,9 @@
|
|||||||
:on-first="p.first" :on-last="p.last"/>
|
:on-first="p.first" :on-last="p.last"/>
|
||||||
|
|
||||||
<div class="d-flex flex-wrap justify-content-around gap-2">
|
<div class="d-flex flex-wrap justify-content-around gap-2">
|
||||||
<div class="card bg-tranparent bg-screen border-light border-opacity-25" style="max-width: 140px; width: 140px;"
|
<div class="d-inline-flex align-items-stretch justify-content-stretch" v-for="tftDamageSkin in p.pages[p.index.value]" :key="tftDamageSkin.itemId">
|
||||||
v-for="tftDamageSkin in p.pages[p.index.value]" :key="tftDamageSkin.itemId">
|
<NuxtLink class="text-decoration-none" :to="`/tft-damage-skins/overview/${tftDamageSkin.itemId}`">
|
||||||
|
<div class="card h-100 bg-tranparent bg-screen border-light border-opacity-25" style="max-width: 140px; width: 140px;">
|
||||||
<img :src="tftDamageSkin.getLoadoutsIcon('latest')" loading="lazy" onerror="this.onerror = null; this.src='/clean-cuts/img/error.png';" />
|
<img :src="tftDamageSkin.getLoadoutsIcon('latest')" loading="lazy" onerror="this.onerror = null; this.src='/clean-cuts/img/error.png';" />
|
||||||
|
|
||||||
<div class="card-body d-flex flex-column justify-content-end">
|
<div class="card-body d-flex flex-column justify-content-end">
|
||||||
@@ -20,6 +21,8 @@
|
|||||||
<Badge name="identifier">{{ tftDamageSkin.itemId }}</Badge>
|
<Badge name="identifier">{{ tftDamageSkin.itemId }}</Badge>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</NuxtLink>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Pagination :pages="p.pages" :count="p.count" :index="p.index.value" :on-prev="p.prev" :on-next="p.next"
|
<Pagination :pages="p.pages" :count="p.count" :index="p.index.value" :on-prev="p.prev" :on-next="p.next"
|
||||||
|
|||||||
37
pages/tft-damage-skins/overview/[id].vue
Normal file
37
pages/tft-damage-skins/overview/[id].vue
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6 col-sm-12">
|
||||||
|
<h1 class="display-4 pb-2 mb-3 border-bottom border-light border-opacity-25 border-4">{{ tftDamageSkin!.name }}</h1>
|
||||||
|
|
||||||
|
<div class="d-flex flex-wrap gap-3 mb-3">
|
||||||
|
<Badge label="Content ID:">{{ tftDamageSkin!.contentId }}</Badge>
|
||||||
|
<Badge label="Item ID:">{{ tftDamageSkin!.itemId }}</Badge>
|
||||||
|
<Badge label="Group ID:">{{ tftDamageSkin!.groupId }}</Badge>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6 col-sm-12 d-flex justify-content-center align-items-center">
|
||||||
|
<img :src="tftDamageSkin!.getLoadoutsIcon('latest')"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import Badge from '~/components/Badge.vue';
|
||||||
|
import useClient from '~/composables/useClient';
|
||||||
|
import useLocale from '~/composables/useLocale';
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
const id = route.params.id as unknown;
|
||||||
|
|
||||||
|
const { client } = useClient();
|
||||||
|
const { currentLocale } = useLocale();
|
||||||
|
const getTftDamageSkins = async () => await client.tftDamageSkins.listAsync({ locale: currentLocale.value, version: "latest"});
|
||||||
|
|
||||||
|
const tftDamageSkins = ref(await getTftDamageSkins());
|
||||||
|
watch (currentLocale, async() => {
|
||||||
|
tftDamageSkins.value = await getTftDamageSkins();
|
||||||
|
});
|
||||||
|
|
||||||
|
const tftDamageSkin = computed(() => tftDamageSkins.value.find((x) => x.itemId == id));
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user