forked from retoor/devplacepy
- Add `/block`, `/mute` endpoints with block/unblock and mute/unmute functionality in `routers/relations.py`, hiding blocked users' content everywhere except their own profile while muting only suppresses notifications - Introduce `devplace emoji-sync` CLI command to regenerate `static/js/emoji-shortcodes.js` from the emoji library, documented in `CLAUDE.md` and wired in `cli.py` - Create `get_blocked_uids()` database helper and apply it in `content.py` `load_detail()` to filter blocked users' posts from detail views - Implement `_uid_index()` and `_drop_index()` helpers in `database.py` for unique uid indexes across tables, with `user_relations` added to `SOFT_DELETE_TABLES` - Document new routes in `AGENTS.md` and `README.md`, including emoji shortcodes rendering behavior distinct from the emoji picker
25 lines
1.5 KiB
HTML
25 lines
1.5 KiB
HTML
{% set _counts = (_reactions or {}).get('counts', {}) %}
|
|
{% set _mine = (_reactions or {}).get('mine', []) %}
|
|
{% if user or _counts %}
|
|
<div class="reaction-bar" data-reaction-type="{{ _type }}" data-reaction-uid="{{ _uid }}" role="group" aria-label="Reactions">
|
|
<div class="reaction-list">
|
|
{% for emoji in REACTION_EMOJI %}
|
|
<button type="button" class="reaction-chip{% if emoji in _mine %} reacted{% endif %}" data-reaction-emoji="{{ emoji }}" aria-label="React with {{ emoji }}" aria-pressed="{% if emoji in _mine %}true{% else %}false{% endif %}"{% if not _counts.get(emoji) and emoji not in _mine %} hidden{% endif %}{{ guest_disabled(user) }}>
|
|
<span class="reaction-emoji">{{ emoji }}</span>
|
|
<span class="reaction-count">{{ _counts.get(emoji, 0) }}</span>
|
|
</button>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="reaction-add">
|
|
<button type="button" class="reaction-add-btn" aria-label="Add reaction" title="Add reaction" aria-expanded="false"{{ guest_disabled(user) }}><span class="reaction-add-icon">🙂</span><span class="reaction-add-label">React</span></button>
|
|
{% if user %}
|
|
<div class="reaction-palette" hidden>
|
|
{% for emoji in REACTION_EMOJI %}
|
|
<button type="button" class="reaction-palette-btn" data-reaction-emoji="{{ emoji }}" aria-label="React with {{ emoji }}">{{ emoji }}</button>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|