student 4 giờ trước cách đây
mục cha
commit
7c6ba30f3a

+ 12 - 6
website/Areas/LotteryV2/Views/Home/Index.cshtml

@@ -64,16 +64,17 @@
                     <!-- Right: Action Section (4 columns) -->
                     <div class="col-span-4 flex flex-col items-center justify-end h-full pb-4 relative cursor-pointer group">
                         <img src="/LotteryV2/img/gold.png" alt="Chest" class="absolute bottom-[40px] w-16 h-18 object-contain filter drop-shadow-lg z-10 group-active:scale-95 transition-transform">
-                        <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0" id="MEGA_LOTO_ID" value="@Constants.MEGA_LOTO">@Lang.rule_play_now</button>
+                        <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0" id="MEGA_LOTO_ID" value="@Constants.MEGA_LOTO_Pick10">@Lang.rule_play_now</button>
                     </div>
                 </div>
             </div>
 
             <!-- Card 2 and 3 commented out by user previously -->
-            <!-- Game Card 2: Millionair - Blurred/Faded State -->
-            <div class="card-blue relative w-full h-[120px] rounded-2xl overflow-hidden shadow-md opacity-25 grayscale blur-[1px] pointer-events-none animate__animated animate__slideInUp animate__delay-1s">
+            <!-- Game Card 2: Millions -->
+            <div class="card-blue relative w-full h-[120px] rounded-2xl overflow-hidden shadow-2xl transform active:scale-[0.98] transition-all duration-300 cursor-pointer animate__animated animate__slideInUp animate__delay-1s"
+                 onclick="goMillionsGameHome('@Constants.Millions_CODE')">
                 <!-- 1. Premium Gradient Border -->
-                <div class="absolute inset-0 rounded-2xl border-[1.5px] border-white/20 pointer-events-none z-20"></div>
+                <div class="absolute inset-0 rounded-2xl border-[1.5px] border-white/30 pointer-events-none z-20"></div>
 
                 <!-- 2. Decorative Highlights -->
                 <div class="absolute -left-[70px] -top-[108px] w-[193px] h-[193px] bg-gradient-to-br from-white/30 to-transparent rounded-full blur-3xl pointer-events-none"></div>
@@ -96,9 +97,10 @@
                     </div>
 
                     <!-- Right: Action Section (4 columns) -->
-                    <div class="col-span-4 flex flex-col items-center justify-end h-full pb-4 relative px-1">
+                    <div class="col-span-4 flex flex-col items-center justify-end h-full pb-4 relative px-1 group">
                         <img src="/LotteryV2/img/money_bag_large.png" alt="Money Bag" class="absolute bottom-[40px] w-16 h-18 object-contain filter drop-shadow-lg z-10">
-                        <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0">@Lang.rule_play_now</button>
+                        <button class="bg-gradient-to-b from-yellow-300 to-white text-black font-black px-2 w-full max-w-[110px] py-1.5 rounded-[12px] text-[13px] shadow-xl border border-white/50 group-hover:brightness-110 group-active:scale-95 transition-all relative z-0"
+                                onclick="event.stopPropagation(); goMillionsGameHome('@Constants.Millions_CODE')">@Lang.rule_play_now</button>
                     </div>
                 </div>
             </div>
@@ -151,6 +153,10 @@
         location.href = subDomain + '@Url.Action("GameHome", "Home", new { area = "LotteryV2" })?termType=' + termType;
     }
 
+    function goMillionsGameHome(termType) {
+        location.href = subDomain + '@Url.Action("GameHome", "Home", new { area = "Millions" })?termType=' + termType;
+    }
+
     function startCountdown() {
         const targetHour = 20; // 20:00 (8 PM) Haiti time
         const timeZone = 'America/Port-au-Prince';

+ 5 - 5
website/Areas/Millions/Views/Home/BuyTicket.cshtml

@@ -248,7 +248,7 @@ else
                             }
                         </div>
                         <div class="w-20 action-area flex flex-col gap-2">
-                             <button onclick="randomizeTicket(this)" class="rand-btn bg-[#0A9800] text-white flex items-center justify-center gap-2 w-20 py-2 rounded-xl font-extrabold text-[11px] shadow-sm active:scale-95 transition-all">
+                             <button onclick="randomizeTicket(this)" class="rand-btn bg-[#2B83F2] text-white flex items-center justify-center gap-2 w-20 py-2 rounded-xl font-extrabold text-[11px] shadow-sm active:scale-95 transition-all">
                                 <i class="fa-solid fa-arrows-rotate text-[10px]"></i> @Lang.Random
                              </button>
                              <div class="edit-delete-group hidden flex flex-col gap-2">
@@ -266,7 +266,7 @@ else
         }
 
         <div class="w-full pt-2" id="addButtonWrapper">
-            <button onclick="addNewTicket()" class="w-fit min-w-[220px] mx-auto bg-green-main text-white font-black text-md py-2.5 px-6 rounded-xl shadow-md border-b-[4px] border-[#129A30] active:translate-y-[1px] active:border-b-[1px] transition-all flex items-center justify-center gap-2">
+            <button onclick="addNewTicket()" class="w-fit min-w-[220px] mx-auto bg-[#2B83F2] text-white font-black text-md py-2.5 px-6 rounded-xl shadow-md border-b-[4px] border-[#1F66D6] active:translate-y-[1px] active:border-b-[1px] transition-all flex items-center justify-center gap-2">
                 @Lang.millions_add_more_ticket
             </button>
         </div>
@@ -775,7 +775,7 @@ else
                     filledTickets++;
                 }
             });
-            const pricePerTicket = @(Model.termType == Constants.PIC10_BASIC_CODE ? "10" : "50");
+            const pricePerTicket = @(Model.termType == Constants.PIC10_BASIC_CODE ? "10" : (Model.termType == Constants.Millions_CODE ? "20" : "50"));
             $("#totalPrice").text(formatMoneyV2(filledTickets * pricePerTicket));
             $("#totalTicketCount").text(filledTickets);
         }
@@ -803,7 +803,7 @@ else
                                 ${ballsHtml}
                             </div>
                             <div class="w-20 action-area flex flex-col gap-2">
-                                 <button onclick="randomizeTicket(this)" class="rand-btn bg-[#0A9800] text-white flex items-center justify-center gap-2 w-20 py-2 rounded-xl font-extrabold text-[11px] shadow-sm active:scale-95 transition-all">
+                                 <button onclick="randomizeTicket(this)" class="rand-btn bg-[#2B83F2] text-white flex items-center justify-center gap-2 w-20 py-2 rounded-xl font-extrabold text-[11px] shadow-sm active:scale-95 transition-all">
                                      <i class="fa-solid fa-arrows-rotate text-[10px]"></i> @Lang.Random
                                  </button>
                                  <div class="edit-delete-group hidden flex flex-col gap-2">
@@ -853,7 +853,7 @@ else
                     if (balls.length === maxBalls) {
                         const selectedNumbers = [];
                         balls.each(function() { selectedNumbers.push($(this).text().trim()); });
-                        const itemPrice = "@(Model.termType == Constants.PIC10_BASIC_CODE ? "10" : "50")";
+                        const itemPrice = "@(Model.termType == Constants.PIC10_BASIC_CODE ? "10" : (Model.termType == Constants.Millions_CODE ? "20" : "50"))";
                         tickets.push({
                             code: selectedNumbers.join(','),
                             money: itemPrice

+ 9 - 3
website/Models/HomeViewModel.cs

@@ -13,6 +13,8 @@ namespace LotteryWebApp.Models
         public String uuid { get; set; }
         public String subDomain { get; set; }
         public String topWinner { get; set; }
+        public DateTime serverTime { get; set; }
+        public double secondsUntilDraw { get; set; }
     }
 
     public class HomeTransfer_ViewModel
@@ -24,15 +26,17 @@ namespace LotteryWebApp.Models
         public UserStatus userStatus { get; set; }
         public Transaction transaction { get; set; }
         public TransferMoneyRequest transferData { get; set; }
-
+        public DateTime serverTime { get; set; }
     }
 
     public class HomeRules_ViewModel
     {
         public string termType { get; set; }
+        public DateTime serverTime { get; set; }
     }
     public class HomeFAQ_ViewModel
     {
+        public DateTime serverTime { get; set; }
     }
 
     public class HomeResults_ViewModel
@@ -40,12 +44,13 @@ namespace LotteryWebApp.Models
         public string termType { get; set; }
         public string fromDate { get; set; }
         public string toDate { get; set; }
+        public DateTime serverTime { get; set; }
     }
     public class TermResultModel
     {
         public List<Term> listTerm { get; set; }
         public string termType { get; set; }
-
+        public DateTime serverTime { get; set; }
     }
 
     public class TermResultHistoryModel
@@ -54,7 +59,7 @@ namespace LotteryWebApp.Models
         public string termType { get; set; }
         public string fromDate { get; set; }
         public string toDate { get; set; }
-
+        public DateTime serverTime { get; set; }
     }
 
     public class UserTicketHistoryModel
@@ -64,6 +69,7 @@ namespace LotteryWebApp.Models
         public string status { get; set; }
         public string totalPage { get; set; }
         public string seqPage { get; set; }
+        public DateTime serverTime { get; set; }
     }
 
 }