From c2d002452c5b56085c6d8b8d3e740fdea6346554 Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 10 Oct 2023 20:09:48 +0300 Subject: [PATCH] keep "are you sure" for easier mass giving of awards --- files/assets/js/bottom.js | 3 +++ files/helpers/config/awards.py | 2 +- files/templates/awards.html | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/files/assets/js/bottom.js b/files/assets/js/bottom.js index f24870c3b..1c1f98621 100644 --- a/files/assets/js/bottom.js +++ b/files/assets/js/bottom.js @@ -231,6 +231,9 @@ document.addEventListener("click", function (e) { if (!element.classList.contains("areyousure")) { document.querySelectorAll(".areyousure").forEach(i => { + if (element.dataset.bsTarget == "#awardModal" && i.classList.contains('awardbtn')) + return + i.classList.remove("areyousure") if (i.dataset.oldvalue) diff --git a/files/helpers/config/awards.py b/files/helpers/config/awards.py index b850675e2..b885ad6c0 100644 --- a/files/helpers/config/awards.py +++ b/files/helpers/config/awards.py @@ -417,7 +417,7 @@ AWARDS = { "description": "Summons a moving emoji on the post.", "icon": "fas fa-smile-beam", "color": "text-yellow", - "price": 200, + "price": 100, "deflectable": False, "cosmetic": True, "ghost": True, diff --git a/files/templates/awards.html b/files/templates/awards.html index f9690964a..ce0b876d3 100644 --- a/files/templates/awards.html +++ b/files/templates/awards.html @@ -14,7 +14,7 @@
{% for emoji in p.emoji_awards_emojis(v, kind, OVER_18_EMOJIS) %} {% set src = '/e/' + emoji + '.webp' %} - {% set alt = ':#' + emoji + ':' %} + {% set alt = 'emoji-award-' + emoji %} {% set delay = 'animation-delay-' ~ ((loop.index-1)/4)|int %}
{{alt}}