Fix badge's repoUrl with rootpath (#3076)

Fix #3032 again.
This commit is contained in:
Andy Han 2023-12-30 16:56:48 +08:00 committed by GitHub
parent 41819daaeb
commit f100a21cc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,8 @@ const badgeUrl = computed(
() => `${rootPath}/api/badges/${repo.value.id}/status.svg${branch.value !== '' ? `?branch=${branch.value}` : ''}`,
);
const repoUrl = computed(
() => `/repos/${repo.value.id}${branch.value !== '' ? `/branches/${encodeURIComponent(branch.value)}` : ''}`,
() =>
`${rootPath}/repos/${repo.value.id}${branch.value !== '' ? `/branches/${encodeURIComponent(branch.value)}` : ''}`,
);
const badgeContent = computed(() => {