fix: Fix incorrect phone upgrades view (#1)
This commit is contained in:
parent
41687bc34f
commit
02904a747a
@ -129,3 +129,12 @@ a {
|
|||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phone-only {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
.phone-only {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5"/>
|
<path fill-rule="evenodd" d="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5"/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
<p><b>Upgrades</b> <i class="phone-only">(hold to see more info)</i></p>
|
||||||
<div id="upgrades"></div>
|
<div id="upgrades"></div>
|
||||||
<div id="upgrade-info">
|
<div id="upgrade-info">
|
||||||
<b id="upgrade-name">Upgrade name</b>
|
<b id="upgrade-name">Upgrade name</b>
|
||||||
|
@ -60,6 +60,7 @@ function updateUpgrades() {
|
|||||||
upgradeBtn.onclick = () => purchaseUpgrade(upgrade);
|
upgradeBtn.onclick = () => purchaseUpgrade(upgrade);
|
||||||
upgradeBtn.onmouseenter = () => updateUpgradeInfo(upgrade);
|
upgradeBtn.onmouseenter = () => updateUpgradeInfo(upgrade);
|
||||||
upgradeBtn.onmouseleave = clearUpgradeInfo;
|
upgradeBtn.onmouseleave = clearUpgradeInfo;
|
||||||
|
upgradeBtn.oncontextmenu = () => false;
|
||||||
|
|
||||||
if (mood < upgrade.cost) {
|
if (mood < upgrade.cost) {
|
||||||
upgradeBtn.style.opacity = 0.6;
|
upgradeBtn.style.opacity = 0.6;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user