diff --git a/files/assets/js/bootstrap.js b/files/assets/js/bootstrap.js index 3ca8f95a8..8c52bfcad 100644 --- a/files/assets/js/bootstrap.js +++ b/files/assets/js/bootstrap.js @@ -176,7 +176,7 @@ if (document.readyState === "complete" || document.addEventListener("DOMContentLoaded", bsTriggerOnReady); } -function post_toast(t, url, button1, button2, classname) { +function post_toast(t, url, button1, button2, classname, extra_actions) { let isShopConfirm = t.id.startsWith('buy1-go') || t.id.startsWith('buy2-go'); if (!isShopConfirm) @@ -208,6 +208,8 @@ function post_toast(t, url, button1, button2, classname) { document.getElementById(button2).classList.toggle(classname); } } + + if (extra_actions) extra_actions(xhr); } else { document.getElementById('toast-post-error-text').innerText = "Error, please try again later." if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"]; diff --git a/files/templates/hats.html b/files/templates/hats.html index 53aa21bd1..d24f817bf 100644 --- a/files/templates/hats.html +++ b/files/templates/hats.html @@ -16,6 +16,25 @@ {% endblock %} {% block content %} + +
 	
@@ -53,22 +72,20 @@
Buy - Are you sure? + Are you sure? {% if FEATURES['PROCOINS'] %} Buy with MBux - Are you sure? + Are you sure? {% endif %}
{% endif %}
- {% if hat.id == v.equipped_hat.id %} - Unequip - {% else %} - Equip - {% endif %} + Unequip + + Equip
diff --git a/files/templates/header.html b/files/templates/header.html index 66ca3a0e5..7dcd02f87 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -207,7 +207,9 @@
{% if v.hat_active -%} - + + {% elif request.path == '/hats' %} + {%- endif %}
diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index d9847aa84..f84f24480 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -17,7 +17,7 @@ set CACHE_VER = { 'css/win98.css': 63, 'js/award_modal.js': 255, - 'js/bootstrap.js': 279, + 'js/bootstrap.js': 280, 'js/category_modal.js': 200, 'js/comments+submission_listing.js': 269, 'js/comments_admin.js': 255,