fix(plugins/discussions): support for GitHub emojis (#754) [skip ci]
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
fetched.map(({upvoteCount}) => discussions.upvotes.discussions += upvoteCount)
|
fetched.map(({upvoteCount}) => discussions.upvotes.discussions += upvoteCount)
|
||||||
|
|
||||||
//Compute favorite category
|
//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
|
categories[category] = (categories[category] ?? 0) + 1
|
||||||
const categoryEntries = Object.entries(categories).sort((a, b) => b[1] - a[1])
|
const categoryEntries = Object.entries(categories).sort((a, b) => b[1] - a[1])
|
||||||
discussions.categories.stats = Object.fromEntries(categoryEntries)
|
discussions.categories.stats = Object.fromEntries(categoryEntries)
|
||||||
|
|||||||
@@ -310,6 +310,7 @@
|
|||||||
}
|
}
|
||||||
.label.label-flex {
|
.label.label-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
.label .label-right {
|
.label .label-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1341,6 +1342,9 @@
|
|||||||
width: 1em;
|
width: 1em;
|
||||||
margin-bottom: -.125em;
|
margin-bottom: -.125em;
|
||||||
}
|
}
|
||||||
|
.label-flex .gemoji {
|
||||||
|
margin-right: .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* Cake day */
|
/* Cake day */
|
||||||
.cakeday, .cakeday svg {
|
.cakeday, .cakeday svg {
|
||||||
|
|||||||
Reference in New Issue
Block a user