Spaces:
Sleeping
Sleeping
File size: 2,301 Bytes
dfa3aa6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | <!-- wallet.html: Simple wallet modal for add/withdraw money -->
<div id="walletModal" class="wallet-modal hidden">
<div class="wallet-modal-content">
<span class="wallet-close" onclick="closeWallet()">×</span>
<h2>Wallet</h2>
<div class="wallet-balance">
<span>Balance:</span>
<span id="walletBalance">₹0.00</span>
</div>
<div class="wallet-actions">
<button onclick="showAddMoney()">Add Money</button>
<button onclick="showWithdrawMoney()">Withdraw</button>
</div>
<div id="walletActionArea"></div>
</div>
</div>
<!-- Add Money Form (hidden by default) -->
<div id="addMoneyForm" class="wallet-form hidden">
<h3>Add Money</h3>
<input type="number" id="addAmount" placeholder="Enter amount" min="1" />
<button onclick="startRazorpayPayment()">Add via Razorpay</button>
</div>
<!-- Withdraw Money Form (hidden by default) -->
<div id="withdrawMoneyForm" class="wallet-form hidden">
<h3>Withdraw Money</h3>
<input type="number" id="withdrawAmount" placeholder="Enter amount" min="1" />
<button onclick="startWithdraw()">Withdraw</button>
</div>
<style>
.wallet-modal {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
}
.wallet-modal-content {
background: #181c24;
padding: 2rem 2.5rem;
border-radius: 12px;
min-width: 340px;
box-shadow: 0 8px 32px rgba(0,0,0,0.25);
position: relative;
}
.wallet-close {
position: absolute;
right: 1rem;
top: 1rem;
font-size: 1.5rem;
color: #aaa;
cursor: pointer;
}
.wallet-balance {
font-size: 1.2rem;
margin-bottom: 1.2rem;
display: flex;
justify-content: space-between;
}
.wallet-actions {
display: flex;
gap: 1rem;
margin-bottom: 1.2rem;
}
.wallet-form {
margin-top: 1rem;
}
.wallet-form input {
padding: 0.5rem 1rem;
border-radius: 6px;
border: 1px solid #242a38;
background: #23283a;
color: #fff;
margin-bottom: 0.7rem;
width: 100%;
}
.wallet-form button {
background: var(--green);
color: #000;
border: none;
border-radius: 6px;
padding: 0.5rem 1.2rem;
font-weight: 700;
cursor: pointer;
}
</style>
|