QoL updates
This commit is contained in:
parent
e46d6991a4
commit
d9e8c2f8fd
@ -81,7 +81,7 @@ const BossInfo = () => {
|
|||||||
return () => clearInterval(tickInterval)
|
return () => clearInterval(tickInterval)
|
||||||
}, [balance, army?.profit_per_second, player?.last_raided_at, boss?.level])
|
}, [balance, army?.profit_per_second, player?.last_raided_at, boss?.level])
|
||||||
return <div className={styles.bossInfo}>
|
return <div className={styles.bossInfo}>
|
||||||
<p><strong className={bossLevelToClass[boss?.level || 0]}>{bossToName[variant]}</strong> Moloch <small>(lvl {boss ? boss.level + 1 : 0})</small></p>
|
<p><strong className={bossLevelToClass[variant]}>{bossToName[variant]}</strong> Moloch <small>(lvl {boss ? boss.level + 1 : 0})</small></p>
|
||||||
<p><strong className={styles.reward}>{parseFloat(parseFloat(formatUnits(bossToReward[boss?.level || 0], 18).toString()).toFixed(4))} RGCVII</strong> <small>reward</small></p>
|
<p><strong className={styles.reward}>{parseFloat(parseFloat(formatUnits(bossToReward[boss?.level || 0], 18).toString()).toFixed(4))} RGCVII</strong> <small>reward</small></p>
|
||||||
<p>
|
<p>
|
||||||
<strong>{parseFloat((chanceToDefeat.current * 100).toFixed(2))} % to slay</strong>{" "}
|
<strong>{parseFloat((chanceToDefeat.current * 100).toFixed(2))} % to slay</strong>{" "}
|
||||||
|
|||||||
@ -43,8 +43,8 @@ export const toReadable = (rawValue: bigint) => {
|
|||||||
} else {
|
} else {
|
||||||
const divided = value / suffixes[i - 1].value;
|
const divided = value / suffixes[i - 1].value;
|
||||||
const numStr = (value % suffixes[i - 1].value).toString().slice(0, 3);
|
const numStr = (value % suffixes[i - 1].value).toString().slice(0, 3);
|
||||||
const remainder = parseInt(numStr.replace(/0+$/, ''), 10);
|
const remainder = numStr == "0" ? "" : "." + parseInt(numStr.replace(/0+$/, ''), 10);
|
||||||
return `${divided.toString()}.${remainder.toString()} ${suffixes[i - 1].suffix}`;
|
return `${divided.toString()}${remainder.toString()} ${suffixes[i - 1].suffix}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,8 +198,8 @@ function PixelatedQuote() {
|
|||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setIsShown(false);
|
setIsShown(false);
|
||||||
}, 4000);
|
}, 8000);
|
||||||
}, 6000);
|
}, 10000);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
if (intervalIdRef.current !== null) {
|
if (intervalIdRef.current !== null) {
|
||||||
|
|||||||
@ -16,7 +16,8 @@ const RegistrationModal = ({ isOpen, setIsOpen }: RegistrationModalProps) => {
|
|||||||
}, [register, setIsOpen])
|
}, [register, setIsOpen])
|
||||||
if (!isOpen) return null;
|
if (!isOpen) return null;
|
||||||
return <div className={bgStyles.leaderboardOverlay}><div className={styles.modal}>
|
return <div className={bgStyles.leaderboardOverlay}><div className={styles.modal}>
|
||||||
<h2 style={{ textAlign: "center" }}>Insert coins to continue</h2>
|
<span className={styles.closeBtn} onClick={() => setIsOpen(false)}>x</span>
|
||||||
|
<h2 className={styles.textCenter}>Insert coins to continue</h2>
|
||||||
<div>
|
<div>
|
||||||
<button onClick={() => onRegister("RGCVII")}>500 RGCVII</button>
|
<button onClick={() => onRegister("RGCVII")}>500 RGCVII</button>
|
||||||
<button onClick={() => onRegister("ETH")}>0.0005 ETH</button>
|
<button onClick={() => onRegister("ETH")}>0.0005 ETH</button>
|
||||||
|
|||||||
@ -48,7 +48,7 @@ const Scene = () => {
|
|||||||
className={styles.leaderboardButton}
|
className={styles.leaderboardButton}
|
||||||
title="Leaderboard"
|
title="Leaderboard"
|
||||||
>
|
>
|
||||||
📜
|
Top players 📜
|
||||||
</button>
|
</button>
|
||||||
{isLeaderboardOpen && (
|
{isLeaderboardOpen && (
|
||||||
<div className={styles.leaderboardOverlay}>
|
<div className={styles.leaderboardOverlay}>
|
||||||
|
|||||||
@ -36,6 +36,7 @@ function MyApp({ Component, pageProps }: AppProps) {
|
|||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6,
|
h6,
|
||||||
|
button,
|
||||||
.title {
|
.title {
|
||||||
font-family: ${font.style.fontFamily};
|
font-family: ${font.style.fontFamily};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -373,8 +373,8 @@
|
|||||||
|
|
||||||
.leaderboardButton {
|
.leaderboardButton {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 80px;
|
top: 30px;
|
||||||
right: 30px;
|
left: 80px;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: rgba(0, 0, 0, 0.5);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|||||||
@ -82,6 +82,30 @@
|
|||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.textCenter {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.closeBtn {
|
||||||
|
display: inline-block;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 26px;
|
||||||
|
border-radius: 4px;
|
||||||
|
position: absolute;
|
||||||
|
right: 32px;
|
||||||
|
top: 32px;
|
||||||
|
background: black;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
.closeBtn:hover {
|
||||||
|
color: var(--hover-color);
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
.closeBtn::active {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% {
|
0% {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user