Fix display for reactions plugin
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
list[key] = {value, score:value/(display === "relative" ? max : reactions.length)}
|
||||
|
||||
//Results
|
||||
return {list, comments:comments.length, details, days}
|
||||
return {list, comments:comments.length, details, days, twemoji:q["config.twemoji"]}
|
||||
}
|
||||
//Handle errors
|
||||
catch (error) {
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
</div>
|
||||
<% } else { %>
|
||||
<div class="row fill-width">
|
||||
<% if (plugins.reactions.twemoji) { %>
|
||||
<style>
|
||||
.gauge.info .twemoji {
|
||||
transform: scale(0.5);
|
||||
transform-origin: center;
|
||||
}
|
||||
</style>
|
||||
<% } %>
|
||||
<section class="categories">
|
||||
<% for (const [reaction, icon] of Object.entries({HEART:"❤️", THUMBS_UP:"👍", THUMBS_DOWN:"👎", LAUGH:"😄", CONFUSED:"😕", EYES:"👀", ROCKET:"🚀", HOORAY:"🎉"})) { const {score = 0, value:count = 0} = plugins.reactions.list[reaction] ?? {} %>
|
||||
<div class="categorie column">
|
||||
@@ -26,13 +28,13 @@
|
||||
<circle class="gauge-base" r="53" cx="60" cy="60"></circle>
|
||||
<% if (score > 0) { %>
|
||||
<circle class="gauge-arc" transform="rotate(-90 60 60)" r="53" cx="60" cy="60" stroke-dasharray="<%= score * 329 %> 329"></circle>
|
||||
<% if (true) { %>
|
||||
<% if (plugins.reactions.twemoji) { %>
|
||||
<%= icon %>
|
||||
<% } else { %>
|
||||
<text x="60" y="60" dominant-baseline="central"><%= icon %></text>
|
||||
<% } %>
|
||||
<% } else { %>
|
||||
<% if (true) { %>
|
||||
<% if (plugins.reactions.twemoji) { %>
|
||||
<%= icon %>
|
||||
<% } else { %>
|
||||
<text x="60" y="60" dominant-baseline="central"><%= icon %></text>
|
||||
|
||||
Reference in New Issue
Block a user