woodpecker/web/src/components/atomic/DocsLink.vue
renovate[bot] 22414744b0
chore(deps): update dependency eslint to v9 - abandoned (#3594)
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Anbraten <6918444+anbraten@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-06 15:16:59 +02:00

25 lines
633 B
Vue

<template>
<a
:href="`${docsUrl}`"
:title="$t('documentation_for', { topic })"
target="_blank"
class="text-wp-link-100 hover:text-wp-link-200 cursor-pointer mt-1"
>
<Icon name="question" class="!w-4 !h-4" />
</a>
</template>
<script lang="ts" setup>
import { computed, toRef } from 'vue';
import Icon from '~/components/atomic/Icon.vue';
const props = defineProps<{
url: string;
topic: string;
}>();
const url = toRef(props, 'url');
const topic = toRef(props, 'topic');
const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `https://woodpecker-ci.org/${url.value}`));
</script>