mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 04:06:54 +00:00
Remove WOODPECKER_DOCS
config (#2647)
This commit is contained in:
@@ -12,15 +12,13 @@
|
||||
import { computed, toRef } from 'vue';
|
||||
|
||||
import Icon from '~/components/atomic/Icon.vue';
|
||||
import useConfig from '~/compositions/useConfig';
|
||||
|
||||
const props = defineProps<{
|
||||
url: string;
|
||||
topic: string;
|
||||
}>();
|
||||
|
||||
const docsBaseUrl = useConfig().docs;
|
||||
const url = toRef(props, 'url');
|
||||
const topic = toRef(props, 'topic');
|
||||
const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `${docsBaseUrl}${url.value}`));
|
||||
const docsUrl = computed(() => (url.value.startsWith('http') ? url.value : `https://woodpecker-ci.org/${url.value}`));
|
||||
</script>
|
||||
|
@@ -16,7 +16,9 @@
|
||||
<span class="hidden md:flex">{{ $t('repositories') }}</span>
|
||||
</router-link>
|
||||
<!-- Docs Link -->
|
||||
<a :href="docsUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{ $t('docs') }}</a>
|
||||
<a href="https://woodpecker-ci.org/" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
|
||||
$t('docs')
|
||||
}}</a>
|
||||
<!-- API Link -->
|
||||
<a v-if="enableSwagger" :href="apiUrl" target="_blank" class="navbar-link navbar-clickable hidden md:flex">{{
|
||||
$t('api')
|
||||
@@ -69,7 +71,6 @@ const route = useRoute();
|
||||
const authentication = useAuthentication();
|
||||
const { user } = authentication;
|
||||
const { darkMode } = useDarkMode();
|
||||
const docsUrl = config.docs || undefined;
|
||||
const apiUrl = `${config.rootPath ?? ''}/swagger/index.html`;
|
||||
|
||||
function doLogin() {
|
||||
|
@@ -3,7 +3,6 @@ import { User } from '~/lib/api/types';
|
||||
declare global {
|
||||
interface Window {
|
||||
WOODPECKER_USER: User | undefined;
|
||||
WOODPECKER_DOCS: string | undefined;
|
||||
WOODPECKER_VERSION: string | undefined;
|
||||
WOODPECKER_CSRF: string | undefined;
|
||||
WOODPECKER_FORGE: 'github' | 'gitlab' | 'gitea' | 'bitbucket' | undefined;
|
||||
@@ -14,7 +13,6 @@ declare global {
|
||||
|
||||
export default () => ({
|
||||
user: window.WOODPECKER_USER || null,
|
||||
docs: window.WOODPECKER_DOCS || null,
|
||||
version: window.WOODPECKER_VERSION,
|
||||
csrf: window.WOODPECKER_CSRF || null,
|
||||
forge: window.WOODPECKER_FORGE || null,
|
||||
|
Reference in New Issue
Block a user