master
Aevann1 2021-09-05 21:54:12 +02:00
parent f51f1ae242
commit 529d75b833
2 changed files with 2 additions and 3 deletions

View File

@ -25,8 +25,7 @@ def post_embed(id, v):
@app.template_filter("favorite_emojis")
def favorite_emojis(x):
str = ""
emojis = session["favorite_emojis"]
emojis = sorted(emojis.items(), key=lambda x: x[1], reverse=True)
emojis = sorted(x["favorite_emojis"].items(), key=lambda x: x[1], reverse=True)
for k, v in emojis:
str += f'<button class="btn m-1 px-0" onclick="getEmoji(\'{k}\', \'@form@\')" style="background: None!important; width:60px; overflow: hidden; border: none;" data-toggle="tooltip" title=":{k}:" delay:="0"><img loading="lazy" width=50 src="/assets/images/emojis/{k}.gif" alt="{k}-emoji"/></button>'
return str

View File

@ -45,7 +45,7 @@
<div class="tab-content">
<div class="tab-pane fade show active" id="emoji-tab-favorite">
<div class="d-flex flex-wrap py-3 pl-2" id="EMOJIS_favorite">
{{'v' | favorite_emojis | safe}}
{{session | favorite_emojis | safe}}
</div>
</div>
<div class="tab-pane fade" id="emoji-tab-marsey">