Ensure social category badges are rendered with social style and logo; affects [gitlab keybase lemmy modrinth thunderstore twitch] gist github reddit (#9859)

* Ensure social category badges are rendered with social style and logo

* Fix Twitch auth test
This commit is contained in:
Pierre-Yves Bigourdan
2023-12-31 15:08:55 +01:00
committed by GitHub
parent 17d04f73be
commit 04254e5905
19 changed files with 29 additions and 3 deletions

View File

@@ -52,7 +52,11 @@ export default class GistStars extends GithubAuthV4Service {
}
static render({ stargazerCount, url, stargazers }) {
return { message: metric(stargazerCount), link: [url, stargazers] }
return {
message: metric(stargazerCount),
style: 'social',
link: [url, stargazers],
}
}
async fetch({ gistId }) {

View File

@@ -29,6 +29,7 @@ export default class GithubFollowers extends GithubAuthV3Service {
static render({ followers }) {
return {
message: metric(followers),
style: 'social',
color: 'blue',
}
}

View File

@@ -45,6 +45,7 @@ export default class GithubForks extends GithubAuthV4Service {
static render({ user, repo, forkCount }) {
return {
message: metric(forkCount),
style: 'social',
color: 'blue',
link: [
`https://github.com/${user}/${repo}/fork`,

View File

@@ -44,6 +44,7 @@ export default class GithubStars extends GithubAuthV3Service {
const slug = `${encodeURIComponent(user)}/${encodeURIComponent(repo)}`
return {
message: metric(stars),
style: 'social',
color: 'blue',
link: [
`https://github.com/${slug}`,

View File

@@ -178,6 +178,7 @@ export default class GithubTotalStarService extends GithubAuthV4Service {
static render({ totalStars, user }) {
return {
message: metric(totalStars),
style: 'social',
color: 'blue',
link: [`https://github.com/${user}`],
}

View File

@@ -43,6 +43,7 @@ export default class GithubWatchers extends GithubAuthV3Service {
static render({ watchers, user, repo }) {
return {
message: metric(watchers),
style: 'social',
color: 'blue',
link: [
`https://github.com/${user}/${repo}`,