|
@@ -4,6 +4,7 @@
|
|
|
Layout = "_GameLayout";
|
|
Layout = "_GameLayout";
|
|
|
var packages = Context.Session.GetComplexData<List<SicboSub.Web.Models.PackageInfo>>("Packages");
|
|
var packages = Context.Session.GetComplexData<List<SicboSub.Web.Models.PackageInfo>>("Packages");
|
|
|
var isRegistered = Context.Session.GetComplexData<bool?>("isRegistered") ?? false;
|
|
var isRegistered = Context.Session.GetComplexData<bool?>("isRegistered") ?? false;
|
|
|
|
|
+ var msisdn = Context.Session.GetComplexData<string>("msisdn") ?? "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@section Styles {
|
|
@section Styles {
|
|
@@ -28,7 +29,7 @@
|
|
|
<div class="medal-parent">
|
|
<div class="medal-parent">
|
|
|
<img class="hourglass-icon" src="~/img/021-medal-2.svg" alt="">
|
|
<img class="hourglass-icon" src="~/img/021-medal-2.svg" alt="">
|
|
|
<div class="ranking-coin">@Language.Rankingcoin</div>
|
|
<div class="ranking-coin">@Language.Rankingcoin</div>
|
|
|
- <b class="view-ranking-coin">@Language.ViewRankingCoin</b>
|
|
|
|
|
|
|
+ <a class="view-ranking-coin">@Language.ViewRankingCoin</a>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="frame-group">
|
|
<div class="frame-group">
|
|
|
<div class="frame-container">
|
|
<div class="frame-container">
|
|
@@ -135,8 +136,8 @@
|
|
|
|
|
|
|
|
<!-- Action Buttons -->
|
|
<!-- Action Buttons -->
|
|
|
<div class="popup-actions">
|
|
<div class="popup-actions">
|
|
|
- <button class="popup-btn cancel-btn" onclick="closePackagePopup()">@Language.Cancel</button>
|
|
|
|
|
- <button class="popup-btn next-btn" onclick="handlePackageNext()">@Language.Next</button>
|
|
|
|
|
|
|
+ @* <button class="popup-btn cancel-btn" onclick="closePackagePopup()">@Language.Cancel</button> *@
|
|
|
|
|
+ <button class="popup-btn next-btn" onclick="handlePackageNext()">@Language.Buynow</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -158,14 +159,14 @@
|
|
|
|
|
|
|
|
<!-- Confirm Content -->
|
|
<!-- Confirm Content -->
|
|
|
<div class="confirm-content">
|
|
<div class="confirm-content">
|
|
|
- <p class="confirm-message">@Language.DoYouWantToBuy</p>
|
|
|
|
|
- <p class="confirm-coins"><span id="confirmCoinsAmount">100</span> <span class="coins-label">@Language.Coins</span></p>
|
|
|
|
|
- <p class="confirm-price">Price <span id="confirmPriceAmount">1</span> <span class="htg-label">@Language.HTG</span></p>
|
|
|
|
|
|
|
+ @* <p class="confirm-message">@Language.DoYouWantToBuy</p> *@
|
|
|
|
|
+ <p class="confirm-coins"><span id="confirmCoinsAmount">100</span> <span class="coins-label">@Language.Coins</span>/ <span id="confirmPriceAmount">1</span> <span class="htg-label">@Language.HTG</span></p>
|
|
|
|
|
+ @* <p class="confirm-price">Price <span id="confirmPriceAmount">1</span> <span class="htg-label">@Language.HTG</span></p> *@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Action Buttons -->
|
|
<!-- Action Buttons -->
|
|
|
<div class="popup-actions">
|
|
<div class="popup-actions">
|
|
|
- <button class="popup-btn cancel-btn" onclick="closeConfirmPopup()">@Language.Cancel</button>
|
|
|
|
|
|
|
+ @* <button class="popup-btn cancel-btn" onclick="closeConfirmPopup()">@Language.Cancel</button> *@
|
|
|
<button class="popup-btn next-btn" onclick="handleConfirmBuy()">@Language.Confirm</button>
|
|
<button class="popup-btn next-btn" onclick="handleConfirmBuy()">@Language.Confirm</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -197,7 +198,8 @@
|
|
|
|
|
|
|
|
<!-- Text Content -->
|
|
<!-- Text Content -->
|
|
|
<div class="register-text">
|
|
<div class="register-text">
|
|
|
- <p class="register-message">Do you confirm<br/>to buy the<br/><span class="highlight-text">@Language.DailyPackage</span>?</p>
|
|
|
|
|
|
|
+ @Html.Raw(Language.ConfirmDailyPackage)
|
|
|
|
|
+ @* @Language.ConfirmDailyPackage *@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Confirm Button -->
|
|
<!-- Confirm Button -->
|
|
@@ -223,7 +225,7 @@
|
|
|
<div class="withdraw-left">
|
|
<div class="withdraw-left">
|
|
|
<div class="withdraw-phone">
|
|
<div class="withdraw-phone">
|
|
|
<span class="withdraw-label">@Language.PhoneNumber</span>
|
|
<span class="withdraw-label">@Language.PhoneNumber</span>
|
|
|
- <span class="withdraw-phone-number">0912 345 678</span>
|
|
|
|
|
|
|
+ <span class="withdraw-phone-number">@msisdn</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="withdraw-balance-badge">@Language.MainBalance</div>
|
|
<div class="withdraw-balance-badge">@Language.MainBalance</div>
|
|
@@ -235,7 +237,7 @@
|
|
|
|
|
|
|
|
<div class="withdraw-info">
|
|
<div class="withdraw-info">
|
|
|
<span class="withdraw-info-label">@Language.CoinAmount</span>
|
|
<span class="withdraw-info-label">@Language.CoinAmount</span>
|
|
|
- <span class="withdraw-coin-amount">@String.Format("{0:n0}", ViewData["WinCoin"])</span>
|
|
|
|
|
|
|
+ <span id="withdrawPopupCoinValue" class="withdraw-coin-amount">@String.Format("{0:n0}", ViewData["WinCoin"])</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -323,7 +325,7 @@
|
|
|
<div id="otpPopup" class="popup-overlay" style="display: none;">
|
|
<div id="otpPopup" class="popup-overlay" style="display: none;">
|
|
|
<div class="popup-container otp-popup">
|
|
<div class="popup-container otp-popup">
|
|
|
<div class="popup-header">
|
|
<div class="popup-header">
|
|
|
- <span class="popup-title">OTP Verification</span>
|
|
|
|
|
|
|
+ <span class="popup-title">@Language.OTPVerification</span>
|
|
|
</div>
|
|
</div>
|
|
|
<button class="popup-close-btn" onclick="closeOtpPopup()">
|
|
<button class="popup-close-btn" onclick="closeOtpPopup()">
|
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="white">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="white">
|
|
@@ -347,24 +349,46 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- Message Popup (Success/Error) -->
|
|
|
|
|
|
|
+ <!-- Message Popup (Success/Error) - Redesigned -->
|
|
|
<div id="messagePopup" class="popup-overlay" style="display: none;">
|
|
<div id="messagePopup" class="popup-overlay" style="display: none;">
|
|
|
- <div class="popup-container message-popup">
|
|
|
|
|
- <!-- Close Button -->
|
|
|
|
|
- <button class="popup-close-btn" onclick="closeMessagePopup()">
|
|
|
|
|
- <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"/>
|
|
|
|
|
|
|
+ <div id="messagePopupContainer" class="message-popup-container-custom">
|
|
|
|
|
+ <!-- Top Right Close Button (Red Circle) -->
|
|
|
|
|
+ <button class="message-close-btn-custom" onclick="closeMessagePopup()">
|
|
|
|
|
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round">
|
|
|
|
|
+ <line x1="18" y1="6" x2="6" y2="18"></line>
|
|
|
|
|
+ <line x1="6" y1="6" x2="18" y2="18"></line>
|
|
|
</svg>
|
|
</svg>
|
|
|
</button>
|
|
</button>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Dice Decorations - Success -->
|
|
|
|
|
+ <div id="diceSuccess" class="dice-set" style="display: none;">
|
|
|
|
|
+ <img src="~/img/dice_success_1.png" alt="" class="message-dice-bottom-left" />
|
|
|
|
|
+ <img src="~/img/dice_success_2.png" alt="" class="message-dice-bottom-right" />
|
|
|
|
|
+ <img src="~/img/dice_success_1.png" alt="" class="message-dice-top-left" />
|
|
|
|
|
+ <img src="~/img/dice_success_2.png" alt="" class="message-dice-top-right" />
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
- <div class="message-content">
|
|
|
|
|
- <div id="messageIcon" class="message-icon">
|
|
|
|
|
- <!-- Icon injected via JS -->
|
|
|
|
|
- </div>
|
|
|
|
|
- <div id="messageText" class="message-text">
|
|
|
|
|
|
|
+ <!-- Dice Decorations - Error -->
|
|
|
|
|
+ <div id="diceError" class="dice-set" style="display: none;">
|
|
|
|
|
+ <img src="~/img/xucto1.png" alt="" class="message-dice-bottom-left" />
|
|
|
|
|
+ <img src="~/img/xucto2.png" alt="" class="message-dice-bottom-right" />
|
|
|
|
|
+ <img src="~/img/xucto1.png" alt="" class="message-dice-top-left" />
|
|
|
|
|
+ <img src="~/img/xucto2.png" alt="" class="message-dice-top-right" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Content -->
|
|
|
|
|
+ <div class="message-content-custom">
|
|
|
|
|
+ <!-- Title -->
|
|
|
|
|
+ <div id="messageTitleCustom" class="message-title-custom">@Language.StatusSuccessful</div>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Message -->
|
|
|
|
|
+ <div id="messageTextCustom" class="message-text-custom">
|
|
|
<!-- Message text injected via JS -->
|
|
<!-- Message text injected via JS -->
|
|
|
</div>
|
|
</div>
|
|
|
- <button class="popup-btn next-btn" onclick="closeMessagePopup()">OK</button>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <!-- Bottom Action Button -->
|
|
|
|
|
+
|
|
|
|
|
+ <button id="messageActionBtn" class="message-action-btn-custom" onclick="closeMessagePopup()">@Language.PlayNow</button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -400,22 +424,42 @@
|
|
|
|
|
|
|
|
@section Scripts {
|
|
@section Scripts {
|
|
|
<script>
|
|
<script>
|
|
|
- // Message Popup Logic
|
|
|
|
|
|
|
+ // Message Popup Logic (Redesigned)
|
|
|
function showMessagePopup(type, message) {
|
|
function showMessagePopup(type, message) {
|
|
|
const popup = document.getElementById('messagePopup');
|
|
const popup = document.getElementById('messagePopup');
|
|
|
- const iconContainer = document.getElementById('messageIcon');
|
|
|
|
|
- const textContainer = document.getElementById('messageText');
|
|
|
|
|
|
|
+ const container = document.getElementById('messagePopupContainer');
|
|
|
|
|
+ const titleContainer = document.getElementById('messageTitleCustom');
|
|
|
|
|
+ const textContainer = document.getElementById('messageTextCustom');
|
|
|
|
|
+ const diceSuccess = document.getElementById('diceSuccess');
|
|
|
|
|
+ const diceError = document.getElementById('diceError');
|
|
|
|
|
+ const actionBtn = document.getElementById('messageActionBtn');
|
|
|
|
|
|
|
|
// Set message
|
|
// Set message
|
|
|
textContainer.textContent = message;
|
|
textContainer.textContent = message;
|
|
|
|
|
|
|
|
- // Set icon based on type
|
|
|
|
|
|
|
+ // Set title, background and dice based on type
|
|
|
if (type === 'success') {
|
|
if (type === 'success') {
|
|
|
- iconContainer.innerHTML = '✔';
|
|
|
|
|
- iconContainer.className = 'message-icon success';
|
|
|
|
|
|
|
+ titleContainer.textContent = '@Language.StatusSuccessful';
|
|
|
|
|
+ if (actionBtn) {
|
|
|
|
|
+ actionBtn.textContent = '@Language.PlayNow';
|
|
|
|
|
+ actionBtn.onclick = function() {
|
|
|
|
|
+ window.location.href = '/Home/Play';
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ container.className = 'message-popup-container-custom success';
|
|
|
|
|
+ // Show success dice, hide error dice
|
|
|
|
|
+ diceSuccess.style.display = 'block';
|
|
|
|
|
+ diceError.style.display = 'none';
|
|
|
} else {
|
|
} else {
|
|
|
- iconContainer.innerHTML = '✖';
|
|
|
|
|
- iconContainer.className = 'message-icon error';
|
|
|
|
|
|
|
+ titleContainer.textContent = '@Language.StatusFailed';
|
|
|
|
|
+ if (actionBtn) {
|
|
|
|
|
+ actionBtn.textContent = '@Language.Close';
|
|
|
|
|
+ actionBtn.onclick = closeMessagePopup;
|
|
|
|
|
+ }
|
|
|
|
|
+ container.className = 'message-popup-container-custom error';
|
|
|
|
|
+ // Show error dice, hide success dice
|
|
|
|
|
+ diceSuccess.style.display = 'none';
|
|
|
|
|
+ diceError.style.display = 'block';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
popup.style.display = 'flex';
|
|
popup.style.display = 'flex';
|
|
@@ -551,7 +595,13 @@
|
|
|
// Update coins
|
|
// Update coins
|
|
|
if(response.data) {
|
|
if(response.data) {
|
|
|
if(document.getElementById('betCoinVal')) document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
if(document.getElementById('betCoinVal')) document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
|
- if(document.getElementById('winCoinVal')) document.getElementById('winCoinVal').textContent = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
|
|
+ if(document.getElementById('winCoinVal')) {
|
|
|
|
|
+ const formattedWinCoin = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
+ document.getElementById('winCoinVal').textContent = formattedWinCoin;
|
|
|
|
|
+ if(document.getElementById('withdrawPopupCoinValue')) {
|
|
|
|
|
+ document.getElementById('withdrawPopupCoinValue').textContent = formattedWinCoin;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
closeRegisterPopup();
|
|
closeRegisterPopup();
|
|
@@ -690,8 +740,14 @@
|
|
|
if(response.data) {
|
|
if(response.data) {
|
|
|
if(document.getElementById('betCoinVal') && response.data.betCoin !== undefined)
|
|
if(document.getElementById('betCoinVal') && response.data.betCoin !== undefined)
|
|
|
document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
|
- if(document.getElementById('winCoinVal') && response.data.winCoin !== undefined)
|
|
|
|
|
- document.getElementById('winCoinVal').textContent = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
|
|
+ if(document.getElementById('winCoinVal') && response.data.winCoin !== undefined) {
|
|
|
|
|
+ const formattedWinCoin = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
+ document.getElementById('winCoinVal').textContent = formattedWinCoin;
|
|
|
|
|
+ // Update value in withdraw popup as well
|
|
|
|
|
+ if(document.getElementById('withdrawPopupCoinValue')) {
|
|
|
|
|
+ document.getElementById('withdrawPopupCoinValue').textContent = formattedWinCoin;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
Site.showError(response.message || 'Verification failed');
|
|
Site.showError(response.message || 'Verification failed');
|
|
@@ -714,8 +770,8 @@
|
|
|
const selectedPackage = document.querySelector('input[name="package"]:checked');
|
|
const selectedPackage = document.querySelector('input[name="package"]:checked');
|
|
|
if (selectedPackage) {
|
|
if (selectedPackage) {
|
|
|
const packageCode = selectedPackage.value;
|
|
const packageCode = selectedPackage.value;
|
|
|
- const coins = selectedPackage.getAttribute('data-coin');
|
|
|
|
|
- const price = selectedPackage.getAttribute('data-price');
|
|
|
|
|
|
|
+ const coins = parseFloat(selectedPackage.getAttribute('data-coin'));
|
|
|
|
|
+ const price = parseFloat(selectedPackage.getAttribute('data-price'));
|
|
|
|
|
|
|
|
selectedPackageCode = packageCode;
|
|
selectedPackageCode = packageCode;
|
|
|
|
|
|
|
@@ -745,7 +801,13 @@
|
|
|
// Update coins
|
|
// Update coins
|
|
|
if(response.data) {
|
|
if(response.data) {
|
|
|
if(document.getElementById('betCoinVal')) document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
if(document.getElementById('betCoinVal')) document.getElementById('betCoinVal').textContent = Site.formatNumber(response.data.betCoin);
|
|
|
- if(document.getElementById('winCoinVal')) document.getElementById('winCoinVal').textContent = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
|
|
+ if(document.getElementById('winCoinVal')) {
|
|
|
|
|
+ const formattedWinCoin = Site.formatNumber(response.data.winCoin);
|
|
|
|
|
+ document.getElementById('winCoinVal').textContent = formattedWinCoin;
|
|
|
|
|
+ if(document.getElementById('withdrawPopupCoinValue')) {
|
|
|
|
|
+ document.getElementById('withdrawPopupCoinValue').textContent = formattedWinCoin;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
closeConfirmPopup();
|
|
closeConfirmPopup();
|