Fix external URLs in markdown + Fix const data error from third party page

This commit is contained in:
Peaceultime 2024-08-21 16:49:02 +02:00
parent d0a9a02c23
commit 45aa9e4502
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
:icon="`link-${data[0].type.toLowerCase()}`" />
</PreviewContent>
</NuxtLink>
<NuxtLink v-else-if="href" :to="{ path: href }" :class="class">
<NuxtLink v-else-if="href" :to="href" :class="class">
<slot v-bind="$attrs"></slot>
<ThemeIcon class="link-icon" v-if="data && data[0] && data[0].type !== 'Markdown'" :height="20" :width="20"
:icon="`link-${data[0].type.toLowerCase()}`" />
@ -30,7 +30,7 @@ const props = defineProps({
});
const route = useRoute();
const { hash, pathname } = parseURL(props.href);
const { hash, pathname, protocol } = parseURL(props.href);
const project = computed(() => parseInt(Array.isArray(route.params.projectId) ? '0' : route.params.projectId));
const { data, status } = await useFetch(`/api/project/${project.value}/file`, {
method: 'GET',

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
const data = `### Librairies, framework et outils libres utilisés:
let data = `### Librairies, framework et outils libres utilisés:
- [Vuejs](https://vuejs.org/) - MIT License - Copyright (c) 2018-present, Yuxi (Evan) You and Vue contributors
- [vue-router](https://router.vuejs.org/) - MIT License - Copyright (c) 2019-present Eduardo San Martin Morote
- [Nuxt](https://nuxt.com/) - MIT License - Copyright (c) 2016-present - Nuxt Team