|
@@ -48,11 +48,11 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="frame-parent3">
|
|
<div class="frame-parent3">
|
|
|
- <div class="rectangle-parent" style="cursor: pointer;" onclick="handleRegister()">
|
|
|
|
|
|
|
+ <div id="registerBtnContainer" class="rectangle-parent" style="cursor: pointer;" onclick="handleRegisterClick()">
|
|
|
<div class="rectangle-div">
|
|
<div class="rectangle-div">
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- Register Button -->
|
|
|
|
|
- <div class="button-label">Register</div>
|
|
|
|
|
|
|
+ <!-- Register/Withdraw Button -->
|
|
|
|
|
+ <div id="registerBtnLabel" class="button-label">Register</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="rectangle-parent" style="cursor: pointer;" onclick="handleBuyMore()">
|
|
<div class="rectangle-parent" style="cursor: pointer;" onclick="handleBuyMore()">
|
|
|
<div class="rectangle-div">
|
|
<div class="rectangle-div">
|
|
@@ -209,9 +209,96 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <!-- Withdraw Popup -->
|
|
|
|
|
+ <div id="withdrawPopup" class="popup-overlay" style="display: none;">
|
|
|
|
|
+ <div class="popup-container withdraw-popup">
|
|
|
|
|
+ <!-- Close Button -->
|
|
|
|
|
+ <button class="popup-close-btn" onclick="closeWithdrawPopup()">
|
|
|
|
|
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="white">
|
|
|
|
|
+ <path d="M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7a1 1 0 0 0-1.41 1.41L10.59 12l-4.89 4.89a1 1 0 1 0 1.41 1.41L12 13.41l4.89 4.89a1 1 0 0 0 1.41-1.41L13.41 12l4.89-4.89a1 1 0 0 0 0-1.4z"/>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Withdraw Content -->
|
|
|
|
|
+ <div class="withdraw-content">
|
|
|
|
|
+ <!-- Left Side - Account Info -->
|
|
|
|
|
+ <div class="withdraw-left">
|
|
|
|
|
+ <div class="withdraw-phone">
|
|
|
|
|
+ <span class="withdraw-label">Phone number</span>
|
|
|
|
|
+ <span class="withdraw-phone-number">0912 345 678</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="withdraw-tunnel">
|
|
|
|
|
+ <div class="tunnel-icon">T</div>
|
|
|
|
|
+ <span class="tunnel-label">Tunnel</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="withdraw-balance-badge">Main balance</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="withdraw-info">
|
|
|
|
|
+ <span class="withdraw-info-label">Total withdraw today</span>
|
|
|
|
|
+ <span class="withdraw-info-value">100 HTG</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="withdraw-info">
|
|
|
|
|
+ <span class="withdraw-info-label">Coin Amount</span>
|
|
|
|
|
+ <span class="withdraw-coin-amount">140.000</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Right Side - Withdraw Options -->
|
|
|
|
|
+ <div class="withdraw-right">
|
|
|
|
|
+ <span class="withdraw-options-title">Withdraw value</span>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="withdraw-options">
|
|
|
|
|
+ <label class="withdraw-option">
|
|
|
|
|
+ <input type="radio" name="withdrawValue" value="1050" />
|
|
|
|
|
+ <span class="withdraw-option-coins">1050 <span class="coins-text">Coins</span></span>
|
|
|
|
|
+ <span class="withdraw-option-htg">10 <span class="htg-text">HTG</span></span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+
|
|
|
|
|
+ <label class="withdraw-option">
|
|
|
|
|
+ <input type="radio" name="withdrawValue" value="525" />
|
|
|
|
|
+ <span class="withdraw-option-coins">525 <span class="coins-text">Coins</span></span>
|
|
|
|
|
+ <span class="withdraw-option-htg">5 <span class="htg-text">HTG</span></span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+
|
|
|
|
|
+ <label class="withdraw-option">
|
|
|
|
|
+ <input type="radio" name="withdrawValue" value="210" />
|
|
|
|
|
+ <span class="withdraw-option-coins">210 <span class="coins-text">Coins</span></span>
|
|
|
|
|
+ <span class="withdraw-option-htg">2 <span class="htg-text">HTG</span></span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+
|
|
|
|
|
+ <label class="withdraw-option">
|
|
|
|
|
+ <input type="radio" name="withdrawValue" value="105" checked />
|
|
|
|
|
+ <span class="withdraw-option-coins">105 <span class="coins-text">Coins</span></span>
|
|
|
|
|
+ <span class="withdraw-option-htg">1 <span class="htg-text">HTG</span></span>
|
|
|
|
|
+ </label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Withdraw Button -->
|
|
|
|
|
+ <button class="withdraw-btn" onclick="handleWithdrawConfirm()">Withdraw</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ // Track registration state
|
|
|
|
|
+ let isRegistered = false;
|
|
|
|
|
+
|
|
|
|
|
+ function handleRegisterClick() {
|
|
|
|
|
+ if (isRegistered) {
|
|
|
|
|
+ // Already registered, show withdraw popup
|
|
|
|
|
+ handleWithdraw();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // Not registered, show register popup
|
|
|
|
|
+ handleRegister();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
function handleRegister() {
|
|
function handleRegister() {
|
|
|
// Show the register popup
|
|
// Show the register popup
|
|
|
document.getElementById('registerPopup').style.display = 'flex';
|
|
document.getElementById('registerPopup').style.display = 'flex';
|
|
@@ -224,8 +311,35 @@
|
|
|
function handleRegisterConfirm() {
|
|
function handleRegisterConfirm() {
|
|
|
// TODO: Implement actual register/buy daily package logic
|
|
// TODO: Implement actual register/buy daily package logic
|
|
|
alert('Daily Package purchased!');
|
|
alert('Daily Package purchased!');
|
|
|
|
|
+
|
|
|
|
|
+ // Mark as registered and change button to Withdraw
|
|
|
|
|
+ isRegistered = true;
|
|
|
|
|
+ document.getElementById('registerBtnLabel').textContent = 'Withdraw';
|
|
|
|
|
+
|
|
|
closeRegisterPopup();
|
|
closeRegisterPopup();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ function handleWithdraw() {
|
|
|
|
|
+ // Show the withdraw popup
|
|
|
|
|
+ document.getElementById('withdrawPopup').style.display = 'flex';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function closeWithdrawPopup() {
|
|
|
|
|
+ document.getElementById('withdrawPopup').style.display = 'none';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function handleWithdrawConfirm() {
|
|
|
|
|
+ const selectedOption = document.querySelector('input[name="withdrawValue"]:checked');
|
|
|
|
|
+ if (selectedOption) {
|
|
|
|
|
+ const coins = selectedOption.value;
|
|
|
|
|
+ const htg = parseInt(coins) / 105; // approximate conversion
|
|
|
|
|
+ alert('Withdraw requested: ' + coins + ' Coins');
|
|
|
|
|
+ // TODO: Implement actual withdraw logic here
|
|
|
|
|
+ closeWithdrawPopup();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ alert('Please select a withdraw amount');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
function handleBuyMore() {
|
|
function handleBuyMore() {
|
|
|
// Show the select package popup
|
|
// Show the select package popup
|
|
@@ -286,6 +400,12 @@
|
|
|
closeRegisterPopup();
|
|
closeRegisterPopup();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ document.getElementById('withdrawPopup')?.addEventListener('click', function(e) {
|
|
|
|
|
+ if (e.target === this) {
|
|
|
|
|
+ closeWithdrawPopup();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
function handlePlay() {
|
|
function handlePlay() {
|
|
|
// TODO: Implement play logic
|
|
// TODO: Implement play logic
|