mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add discussion reaction (#369)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
1fa5eef2e0
commit
dc7d53b59c
7 files changed
+136
-111
No files matched your search
@@ -112,11 +112,9 @@
|
||||
</div>
|
||||
<div class="typo" data-emoji-enabled data-drid="{{ doc.docId }}" data-raw-url="{{ url('discussion_reply_raw', did=doc.parentId, drid=doc._id) }}">
|
||||
{{ doc['content']|markdown|safe }}
|
||||
<div class="reactions list">
|
||||
{% for key in Object.keys(doc.react or {}) %}
|
||||
{% if doc.react[key] %}
|
||||
<div class="reaction{% if reactions[doc.docId][key] %} active{% endif %}"><span class="emoji">{{ key }}</span> {{ doc.react[key] }}</div>
|
||||
{% endif %}
|
||||
<div class="reactions list" data-type="drid" data-drid="{{ doc._id }}">
|
||||
{% for e in Object.entries(doc.react or {})|sort(true, false, 1)|selectattr(1) %}
|
||||
<div class="reaction{% if reactions[doc.docId][e[0]] %} active{% endif %}"><span class="emoji">{{ e[0] }}</span> {{ e[1] }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user