forked from rDrama/rDrama
show prices of "0 owned" awards
parent
5c4f25e237
commit
aeee820c33
|
@ -6182,7 +6182,7 @@ audio, video {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header--currency img {
|
.header--currency img, .award-currency {
|
||||||
max-height: 13px;
|
max-height: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6867,6 +6867,10 @@ div.markdown {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.award-owned * {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
.hole-banner-update-section .hole-settings-subsection {
|
.hole-banner-update-section .hole-settings-subsection {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,14 +178,17 @@ function giveaward(t) {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
let owned = document.getElementById(`${kind}-owned`)
|
let owned = document.getElementById(`${kind}-owned`)
|
||||||
let ownednum = Number(owned.textContent);
|
let ownednum = Number(owned.textContent) - 1;
|
||||||
|
owned.textContent = ownednum
|
||||||
|
|
||||||
|
let ownedblock = document.getElementById(`${kind}-owned-block`)
|
||||||
if (ownednum) {
|
if (ownednum) {
|
||||||
ownednum -= 1
|
ownedblock.innerHTML = `<span>${ownednum} owned</span>`;
|
||||||
owned.textContent = ownednum
|
document.getElementById('award_price').textContent = `${ownednum} owned`;
|
||||||
if (ownednum)
|
}
|
||||||
document.getElementById('award_price').textContent = `${ownednum} owned`;
|
else {
|
||||||
else
|
ownedblock.innerHTML = `${global_price} <img loading="lazy" alt="coins" class="mr-1 ml-1 award-currency" data-bs-toggle="tooltip" data-bs-placement="bottom" src="${SITE_FULL_IMAGES}/i/rDrama/coins.webp?x=6" title="Coins">/<img loading="lazy" alt="marseybux" class="mr-1 ml-1 award-currency" data-bs-toggle="tooltip" data-bs-placement="bottom" src="${SITE_FULL_IMAGES}/i/marseybux.webp?x=6" title="Marseybux">`
|
||||||
document.getElementById('award_price').textContent = `Price: ${global_price} coins/marseybux`;
|
document.getElementById('award_price').textContent = `Price: ${global_price} coins/marseybux`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -25,8 +25,13 @@
|
||||||
<div data-bs-toggle="tooltip" data-bs-placement="bottom" title="Price: {{price}} coins/marseybux - {{award.description}}" id="{{award.kind}}" data-positive="{{award.positive}}" 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-positive="{{award.positive}}" data-nonce="{{g.nonce}}" data-onclick="pick('{{award.kind}}', {{price}}, {{v.coins}}, {{v.marseybux}})">
|
||||||
<i class="{{award.icon}} {{award.color}}"></i>
|
<i class="{{award.icon}} {{award.color}}"></i>
|
||||||
<div class="pt-1 award-name">{{award.title}}</div>
|
<div class="pt-1 award-name">{{award.title}}</div>
|
||||||
<div class="text-muted award-owned">
|
<span id="{{award.kind}}-owned" class="d-none">{{award.owned}}</span>
|
||||||
<span id="{{award.kind}}-owned">{{award.owned}}</span> owned
|
<div id="{{award.kind}}-owned-block" class="text-muted award-owned">
|
||||||
|
{% if award.owned %}
|
||||||
|
<span>{{award.owned}} owned</span>
|
||||||
|
{% else %}
|
||||||
|
<span>{{price}}</span> <img loading="lazy" alt="coins" class="mr-1 ml-1 award-currency" data-bs-toggle="tooltip" data-bs-placement="bottom" src="{{SITE_FULL_IMAGES}}/i/rDrama/coins.webp?x=6" title="Coins">/<img loading="lazy" alt="marseybux" class="mr-1 ml-1 award-currency" data-bs-toggle="tooltip" data-bs-placement="bottom" src="{{SITE_FULL_IMAGES}}/i/marseybux.webp?x=6" title="Marseybux">
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue