mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix reaction display on mobile
This commit is contained in:
1 parent
e2259b7495
commit
83d4f9fd5f
4 files changed
+20
-27
No files matched your search
@@ -193,7 +193,7 @@ function renderReactions(reactions, self, rootEle) {
|
||||
let html = '';
|
||||
for (const key in reactions) {
|
||||
if (!reactions[key]) continue;
|
||||
html += `<div class="reaction${self[key] ? ' active' : ''}"><p>${key} ${reactions[key]}</p></div>`;
|
||||
html += `<div class="reaction${self[key] ? ' active' : ''}"><span class="emoji">${key}</span> ${reactions[key]}</div>\n`;
|
||||
}
|
||||
rootEle.html(html);
|
||||
}
|
||||
@@ -227,7 +227,7 @@ function Reaction({ payload, ele }) {
|
||||
{line.map((emoji) => (
|
||||
<div
|
||||
key={emoji}
|
||||
className={`medium-${12 / elesPerRow} columns`}
|
||||
className={`medium-${12 / elesPerRow} small-${12 / elesPerRow} columns`}
|
||||
onClick={() => handleEmojiClick(payload, emoji, ele).then(() => updateFinish(true))}
|
||||
>
|
||||
{emoji}
|
||||
|
||||
Reference in new issue
Block a user