mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-04-28 22:44:43 +00:00
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>
25 lines
633 B
Vue
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>
|