mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 10:10:47 +01:00
Add overview page for companions
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<tbody>
|
||||
<tr v-for="companion in p.pages[p.index.value]" :key="companion.contentId" style="position: relative;">
|
||||
<td scope="row">
|
||||
<NuxtLink class="text-decoration-none text-light stretched-link" :to="`/companions/overview/${companion.contentId}`">
|
||||
<NuxtLink class="text-decoration-none text-light stretched-link" :to="`/companions/overview/${companion.itemId}`">
|
||||
{{ companion.itemId }}
|
||||
</NuxtLink>
|
||||
</td>
|
||||
|
||||
@@ -1,3 +1,32 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h1 class="display-4 mb-0">{{ companion.name }}</h1>
|
||||
<p class="text-muted border-bottom -b-3 border-light border-opacity-25 border-4">{{ companion.description }}</p>
|
||||
|
||||
<div class="d-flex flex-wrap gap-3">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-12 d-flex justify-content-center align-items-center">
|
||||
<img :src="companion.getLoadoutsIcon('latest')"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Badge from "../../../components/Badge.vue";
|
||||
import useClient from "../../../composables/useClient";
|
||||
import { Companion } from "~/core/models";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const id = route.params.id as unknown;
|
||||
|
||||
const { client } = useClient();
|
||||
|
||||
const companions = await client.companions.listAsync({locale: "default", version: "latest"});
|
||||
const companion = companions.find((x) => x.itemId == id) || new Companion({});
|
||||
</script>
|
||||
Reference in New Issue
Block a user