mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 04:11:03 +00:00
Fix Wrong badgeUrl repo badge tab when rootPath is not empty (#3033)
Fix #3032
This commit is contained in:
parent
e575ffe72d
commit
8c4480f281
1 changed files with 3 additions and 2 deletions
|
@ -84,9 +84,10 @@ async function loadBranches() {
|
||||||
|
|
||||||
const baseUrl = `${window.location.protocol}//${window.location.hostname}${
|
const baseUrl = `${window.location.protocol}//${window.location.hostname}${
|
||||||
window.location.port ? `:${window.location.port}` : ''
|
window.location.port ? `:${window.location.port}` : ''
|
||||||
}${useConfig().rootPath}`;
|
}`;
|
||||||
|
const { rootPath } = useConfig();
|
||||||
const badgeUrl = computed(
|
const badgeUrl = computed(
|
||||||
() => `/api/badges/${repo.value.id}/status.svg${branch.value !== '' ? `?branch=${branch.value}` : ''}`,
|
() => `${rootPath}/api/badges/${repo.value.id}/status.svg${branch.value !== '' ? `?branch=${branch.value}` : ''}`,
|
||||||
);
|
);
|
||||||
const repoUrl = computed(
|
const repoUrl = computed(
|
||||||
() => `/repos/${repo.value.id}${branch.value !== '' ? `/branches/${encodeURIComponent(branch.value)}` : ''}`,
|
() => `/repos/${repo.value.id}${branch.value !== '' ? `/branches/${encodeURIComponent(branch.value)}` : ''}`,
|
||||||
|
|
Loading…
Reference in a new issue