mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-10-11 21:29:50 +02:00
nuxt rewrite
This commit is contained in:
25
website/app/components/MangaconnectorIcon.vue
Normal file
25
website/app/components/MangaconnectorIcon.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div class="w-6 h-6 inline-block align-middle m-1">
|
||||
<NuxtLink :href="$props.websiteUrl ?? ''">
|
||||
<NuxtImg
|
||||
v-if="mangaConnector"
|
||||
:src="mangaConnector?.iconUrl"
|
||||
:class="[
|
||||
'w-full rounded-full outline-2 -outline-offset-1',
|
||||
props.useForDownload ? 'outline-green-500' : 'outline-red-500',
|
||||
]" />
|
||||
<p v-else>{{ mangaConnectorName }}</p>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { components } from '#open-fetch-schemas/api';
|
||||
type MangaConnectorId = components['schemas']['MangaConnectorId'];
|
||||
|
||||
const props = defineProps<MangaConnectorId>();
|
||||
|
||||
const { data: mangaConnector } = useApi('/v2/MangaConnector/{MangaConnectorName}', {
|
||||
path: { MangaConnectorName: props.mangaConnectorName },
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user