fix(plugins/discussions): support for GitHub emojis (#754) [skip ci]

This commit is contained in:
Simon Lecoq
2022-01-09 19:54:08 +01:00
committed by GitHub
parent 2123056288
commit b00a59fb1b
2 changed files with 5 additions and 1 deletions

View File

@@ -34,7 +34,7 @@
fetched.map(({upvoteCount}) => discussions.upvotes.discussions += upvoteCount)
//Compute favorite category
for (const category of [...fetched.map(({category:{emoji, name}}) => `${imports.emoji.get(emoji)} ${name}`)])
for (const category of [...fetched.map(({category:{emoji, name}}) => `${imports.emoji.get(emoji) ?? emoji} ${name}`)])
categories[category] = (categories[category] ?? 0) + 1
const categoryEntries = Object.entries(categories).sort((a, b) => b[1] - a[1])
discussions.categories.stats = Object.fromEntries(categoryEntries)

View File

@@ -310,6 +310,7 @@
}
.label.label-flex {
display: flex;
align-items: center;
}
.label .label-right {
display: flex;
@@ -1341,6 +1342,9 @@
width: 1em;
margin-bottom: -.125em;
}
.label-flex .gemoji {
margin-right: .25rem;
}
/* Cake day */
.cakeday, .cakeday svg {