forked from forks/microblog.pub
Sort custom emoji by name
This commit is contained in:
parent
6090b59c7f
commit
91f879d213
2 changed files with 5 additions and 4 deletions
|
@ -334,9 +334,10 @@ def admin_new() -> _Response:
|
|||
default_visibility=default_visibility,
|
||||
visibility=ap.Visibility,
|
||||
emojis=config.EMOJIS.split(" "),
|
||||
custom_emojis={
|
||||
name: ap.Emoji(**dat) for name, dat in EMOJIS_BY_NAME.items()
|
||||
},
|
||||
custom_emojis=sorted(
|
||||
[ap.Emoji(**dat) for name, dat in EMOJIS_BY_NAME.items()],
|
||||
key=lambda e: e.name,
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
{% for emoji in emojis %}
|
||||
<span class="ji">{{ emoji | emojify | safe }}</span>
|
||||
{% endfor %}
|
||||
{% for emoji in custom_emojis.values() %}
|
||||
{% for emoji in custom_emojis %}
|
||||
<span class="ji"><img src="{{emoji.get_icon_url()}}" alt="{{emoji.name}}" title="{{emoji.name}}" class="custom-emoji"></span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
|
|
Loading…
Reference in a new issue