forked from rDrama/rDrama
1
0
Fork 0

show price more prominently in award modal

master
Aevann 2023-03-21 20:49:27 +02:00
parent 0a12e0c069
commit 078292e793
3 changed files with 15 additions and 1 deletions

View File

@ -3542,6 +3542,13 @@ pre {
.text-small {
font-size: 12px !important;
}
@media (max-width: 768px) {
.text-small-sm {
font-size: 12px !important;
}
}
.text-small-extra {
font-size: 10.1px !important;
}

View File

@ -139,6 +139,9 @@ function pick(kind, price, coins, marseybux) {
document.getElementById('note').placeholder = "Note to include in award notification";
document.getElementById('note').maxLength = 200;
}
document.getElementById('award_price_block').classList.remove('d-none');
document.getElementById('award_price').textContent = price;
}
function buy(mb) {

View File

@ -22,7 +22,7 @@
{% macro iterate_awards(awards) %}
{% for award in awards %}
{% set price = (award.price*v.discount)|int %}
<div data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})">
<div data-bs-toggle="tooltip" data-bs-placement="bottom" title="Price: {{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})">
<i class="{{award.icon}} {{award.color}}"></i>
<div class="pt-1 award-name">{{award.title}}</div>
<div class="text-muted award-owned"><span id="{{award.kind}}-owned">{{award.owned}}</span> owned</div>
@ -81,6 +81,10 @@
<button type="button" id="buy1" class="awardbtn btn btn-primary mt-3 mx-3 {% if not FEATURES['MARSEYBUX'] %}d-none{% endif %} fl-r" disabled data-areyousure="buy(true)" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Buy with marseybux</button>
<button type="button" id="buy2" class="awardbtn btn btn-primary mt-3 fl-r" disabled data-areyousure="buy()" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Buy</button>
<div id="award_price_block" class="fl-r mt-4 mr-3 d-none text-small-sm">
Price: <span id="award_price"></span> coins/marseybux
</div>
</div>
</div>
</div>