|
|
@@ -7,16 +7,7 @@
|
|
|
@using LotteryWebApp.Controllers;
|
|
|
@using LotteryWebApp.Common;
|
|
|
|
|
|
-@functions {
|
|
|
- public string FormatMoney(string amount) {
|
|
|
- if (string.IsNullOrEmpty(amount)) return "0";
|
|
|
- var clean = new string(amount.Where(c => char.IsDigit(c)).ToArray());
|
|
|
- if (long.TryParse(clean, out long val)) {
|
|
|
- return val.ToString("#,##0", new System.Globalization.CultureInfo("vi-VN")).Replace(",", ".");
|
|
|
- }
|
|
|
- return amount;
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
@section Styles {
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
|
@@ -28,6 +19,15 @@
|
|
|
<div class="main-content h-dvh w-full max-w-[430px] mx-auto bg-[#f5f7fb] relative overflow-hidden font-bricolage">
|
|
|
|
|
|
<!-- Scrollable content area -->
|
|
|
+ @{
|
|
|
+ var hasResult = !string.IsNullOrEmpty(Model.lastResult);
|
|
|
+ var resultBalls = hasResult ? Model.lastResult.Split(',') : null;
|
|
|
+ if (hasResult && resultBalls.Length < 6) {
|
|
|
+ var temp = new string[6];
|
|
|
+ for (int i = 0; i < 6; i++) temp[i] = i < resultBalls.Length ? resultBalls[i] : "0";
|
|
|
+ resultBalls = temp;
|
|
|
+ }
|
|
|
+ }
|
|
|
<div class="absolute inset-x-0 top-0 bottom-[88px] overflow-y-auto flex flex-col">
|
|
|
|
|
|
<!-- Top section with header + cards -->
|
|
|
@@ -55,7 +55,7 @@
|
|
|
<p class="text-white text-base font-semibold leading-tight">@(Model?.profile?.users ?? "User")</p>
|
|
|
<div class="mt-2 flex items-center justify-between gap-2 rounded-full border border-white/35 bg-white/10 px-3 py-2">
|
|
|
<div class="flex items-center gap-1 min-w-0">
|
|
|
- <span class="text-3xl font-condensed text-gold-gradient leading-none truncate">@FormatMoney(Model?.userStatus?.bet_coin)</span>
|
|
|
+ <span class="text-3xl font-condensed text-gold-gradient leading-none truncate">@Utils.FormatMoney(Model?.userStatus?.bet_coin)</span>
|
|
|
<img src="/Millions/assets/icons/coin.png" alt="" class="w-5 h-5 shrink-0"/>
|
|
|
<span class="text-white text-sm shrink-0">@Lang.millions_htg</span>
|
|
|
</div>
|
|
|
@@ -73,7 +73,7 @@
|
|
|
<img src="/Millions/assets/icons/calendar.png" alt="" class="w-6 h-6"/>
|
|
|
<div>
|
|
|
<p class="text-xs text-[#797979]">@Lang.next_round</p>
|
|
|
- <p class="text-xs font-bold text-black" id="draw-date">Friday, Mar 20, 2026</p>
|
|
|
+ <p class="text-xs font-bold text-black" id="draw-date">@Utils.FormatResultDate(Model.nextRoundDate)</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="w-px h-12 bg-gray-200"></div>
|
|
|
@@ -82,7 +82,7 @@
|
|
|
<div>
|
|
|
<p class="text-xs text-[#797979]">@Lang.jackpot_prize</p>
|
|
|
<p class="leading-none ">
|
|
|
- <span class="text-base font-extrabold text-[#002bff]">30.000.000</span><span class="text-[10.32px] font-extrabold text-black align-top">@Lang.millions_htg</span>
|
|
|
+ <span class="text-base font-extrabold text-[#002bff]">@Utils.FormatMoney(Model.bolet ?? "30000000")</span><span class="text-[10.32px] font-extrabold text-black align-top">@Lang.millions_htg</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -90,36 +90,42 @@
|
|
|
</div>
|
|
|
|
|
|
<!-- Result section -->
|
|
|
- <div class="px-4 mt-20">
|
|
|
- <div class="result-box rounded-[32px] py-3 flex flex-col gap-2">
|
|
|
- <div class="flex items-center justify-between px-4">
|
|
|
- <div class="flex items-center gap-2 text-xs">
|
|
|
- <span class="text-[#797979]">@Lang.results</span>
|
|
|
- <span class="font-bold text-black">Monday, Mar 20, 2026</span>
|
|
|
+ @if (hasResult)
|
|
|
+ {
|
|
|
+ <div class="px-4 mt-20">
|
|
|
+ <div class="result-box rounded-[32px] py-3 flex flex-col gap-2">
|
|
|
+ <div class="flex items-center justify-between px-4">
|
|
|
+ <div class="flex items-center gap-2 text-xs">
|
|
|
+ <span class="text-[#797979]">@Lang.results</span>
|
|
|
+ <span class="font-bold text-black">@Utils.FormatResultDate(Model.lastResultDate)</span>
|
|
|
+ </div>
|
|
|
+ <a href="/Millions/Home/Results" class="flex items-center gap-1 text-[10px] font-bold text-black border border-[#c2c2c2] rounded-lg px-2 py-1">
|
|
|
+ View all results
|
|
|
+ <img src="/Millions/assets/icons/chevron-right.svg" alt="" class="w-[5px] h-2" />
|
|
|
+ </a>
|
|
|
</div>
|
|
|
- <a href="/Millions/Home/Results" class="flex items-center gap-1 text-[10px] font-bold text-black border border-[#c2c2c2] rounded-lg px-2 py-1">
|
|
|
- View all results
|
|
|
- <img src="/Millions/assets/icons/chevron-right.svg" alt="" class="w-[5px] h-2"/>
|
|
|
- </a>
|
|
|
- </div>
|
|
|
|
|
|
- <!-- Result balls -->
|
|
|
- <div class="flex items-center justify-between gap-1 px-4">
|
|
|
- <div class="ball ball-blue">7</div>
|
|
|
- <div class="ball ball-blue">16</div>
|
|
|
- <div class="ball ball-blue">32</div>
|
|
|
- <div class="ball ball-blue">35</div>
|
|
|
- <div class="ball ball-blue">40</div>
|
|
|
- <div class="relative">
|
|
|
- <img src="/Millions/assets/icons/crown.png" alt="" class="absolute -top-4 -right-1 w-7 h-auto pointer-events-none rotate-[15deg] z-0"/>
|
|
|
- <div class="ball ball-mb relative z-10">
|
|
|
- <span>12</span>
|
|
|
- <span class="absolute -bottom-1 -right-2 bg-[#ee0033] text-white text-[8px] font-bold px-1.5 py-0.5 rounded z-20">MB</span>
|
|
|
+ <!-- Result balls -->
|
|
|
+ <div class="flex items-center justify-between gap-1 px-4">
|
|
|
+ @for (int i = 0; i < 5; i++)
|
|
|
+ {
|
|
|
+ <div class="ball ball-blue">@resultBalls[i]</div>
|
|
|
+ }
|
|
|
+ <div class="relative">
|
|
|
+ <img src="/Millions/assets/icons/crown.png" alt="" class="absolute -top-4 -right-1 w-7 h-auto pointer-events-none rotate-[15deg] z-0" />
|
|
|
+ <div class="ball ball-mb relative z-10">
|
|
|
+ <span>@resultBalls[5]</span>
|
|
|
+ <span class="absolute -bottom-1 -right-2 bg-[#ee0033] text-white text-[8px] font-bold px-1.5 py-0.5 rounded z-20">MB</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ <div class="mt-20"></div>
|
|
|
+ }
|
|
|
|
|
|
<!-- Mega Jackpot banner -->
|
|
|
<div class="px-2 mt-6">
|
|
|
@@ -129,14 +135,14 @@
|
|
|
<span class="mega-glow" style="right:-107px; top:20px;"></span>
|
|
|
<p class="mega-title relative inline-block text-white text-[22px] font-futura leading-none">
|
|
|
<img src="/Millions/assets/icons/crown.png" alt="" class="absolute -top-[5px] left-[26px] w-[12px] h-auto rotate-[10deg] pointer-events-none"/>
|
|
|
- Mega Jackpot
|
|
|
+ @Lang.millions_mega_jackpot
|
|
|
</p>
|
|
|
- <p class="text-white text-xs mt-2">Estimate Jackpot Prize</p>
|
|
|
+ <p class="text-white text-xs mt-2">@Lang.millions_estimate_jackpot_prize</p>
|
|
|
<p class="leading-none mt-1 flex items-start" style="margin-bottom:18px;">
|
|
|
- <span class="mega-amount mega-jackpot-wiggle text-[40px] font-condensed text-gold-gradient tracking-tight leading-none">30.000.000</span>
|
|
|
+ <span class="mega-amount mega-jackpot-wiggle text-[40px] font-condensed text-gold-gradient tracking-tight leading-none">@Utils.FormatMoney(Model.bolet ?? "30000000")</span>
|
|
|
<span class="mega-jackpot-wiggle text-gold-gradient text-sm font-bold uppercase ml-1">@Lang.v2_htg</span>
|
|
|
</p>
|
|
|
- <p class="text-white text-[10px] mt-1 ">Be the next millionaire</p>
|
|
|
+ <p class="text-white text-[10px] mt-1 ">@Lang.millions_be_the_next_millionaire</p>
|
|
|
|
|
|
<!-- Decorative elements -->
|
|
|
<img src="/Millions/assets/images/crown-balls.png" alt="" class="absolute right-2 top-1/2 -translate-y-1/2 w-44 h-auto pointer-events-none"/>
|