More.cshtml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. @model LotteryWebApp.Models.HomeIndex_ViewModel
  2. @{
  3. ViewData["Title"] = "Millions - More";
  4. ViewData["ActiveTab"] = "More";
  5. Layout = "~/Areas/Millions/Views/Shared/_Layout.cshtml";
  6. }
  7. @using LotteryWebApp.Languages;
  8. <script src="https://cdn.tailwindcss.com"></script>
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  10. <link rel="stylesheet" href="/Millions/css/site.css" />
  11. <link rel="stylesheet" href="/Millions/css/more.css" />
  12. @functions {
  13. public string FormatMoney(string amount) {
  14. if (string.IsNullOrEmpty(amount)) return "0";
  15. var clean = new string(amount.Where(c => char.IsDigit(c)).ToArray());
  16. if (long.TryParse(clean, out long val)) {
  17. return val.ToString("#,##0", new System.Globalization.CultureInfo("vi-VN")).Replace(",", ".");
  18. }
  19. return amount;
  20. }
  21. }
  22. <div class="main-container animate__animated animate__fadeIn min-h-screen relative flex flex-col pb-24 overflow-x-hidden" style="background-color: #EAEAEA !important;">
  23. <!-- User Profile Header (Center Aligned, Red Background) -->
  24. <div class="w-full bg-[#0062FF] flex flex-col items-center justify-center pt-8 pb-6 px-6 relative z-10 border-none m-0">
  25. <!-- Avatar Ring -->
  26. <div class="w-[88px] h-[88px] bg-[#EAEAEA] rounded-full flex items-center justify-center border-4 border-[#FFF9CB] shadow-lg mb-3 overflow-hidden">
  27. <img src="/Millions/img/avatar.png" class="w-full h-full object-cover" onerror="this.outerHTML='<i class=\'fa-solid fa-user text-gray-500 text-4xl\'></i>'" />
  28. </div>
  29. <!-- Info -->
  30. <span class="font-bold text-lg text-white tracking-wide">@(Model?.profile?.fullName ?? "User")</span>
  31. <span class="text-sm text-white font-medium tracking-wide mb-2">@(Model?.profile?.users ?? "0000000000")</span>
  32. <!-- Coin Display (Matching GameHome aesthetic) -->
  33. <div class="flex items-center gap-1.5 mt-1 bg-black/10 px-4 py-1 rounded-full border border-white/10 backdrop-blur-sm">
  34. <img src="/Millions/img/gold_coin.png" class="w-5 h-5 object-contain" onerror="this.style.display='none'" />
  35. <span class="text-[22px] font-black text-[#FBF3A7]" style="text-shadow: 0 1px 2px rgba(0,0,0,0.2)">@FormatMoney(Model?.userStatus?.bet_coin)</span>
  36. <span class="text-[10px] font-bold text-[#FBF3A7] uppercase mt-1.5">@Lang.millions_htg</span>
  37. </div>
  38. </div>
  39. <!-- Menu List (White Full Container) -->
  40. <div class="w-full bg-white flex flex-col px-6 pt-2 pb-6 relative z-10 m-0 border-none">
  41. <!-- Item: Winning Account
  42. <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50">
  43. <div class="flex items-center gap-4">
  44. <img src="/Millions/img/gold_coin.png" class="w-6 h-6 object-contain" onerror="this.outerHTML='<i class=\'fa-solid fa-sack-dollar text-[#4A4A4A] text-[20px] w-6 text-center\'></i>'" />
  45. <span class="text-[#212121] font-bold text-[13px]">@Lang.winning_account</span>
  46. </div>
  47. <span class="font-extrabold text-[15px] text-[#212121]">@(Model?.userStatus?.cash_coin ?? "0") HTG</span>
  48. </div> -->
  49. <!-- Item: Profile -->
  50. <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50" onclick="window.location.href='/Millions/Home/Profile'">
  51. <div class="flex items-center gap-4">
  52. <i class="fa-regular fa-user text-[#4A4A4A] text-[20px] w-6 text-center"></i>
  53. <span class="text-[#212121] font-bold text-[13px]">@Lang.profile</span>
  54. </div>
  55. <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
  56. </div>
  57. <!-- Item: How to play Pick 10
  58. <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50" onclick="window.location.href='/Millions/Home/HowToPlay'">
  59. <div class="flex items-center gap-4">
  60. <i class="fa-regular fa-circle-question text-[#4A4A4A] text-[20px] w-6 text-center"></i>
  61. <span class="text-[#212121] font-bold text-[13px]">@Lang.how_to_play_pick10</span>
  62. </div>
  63. <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
  64. </div>
  65. -->
  66. <!-- Item: Change Lang
  67. <div class="flex items-center justify-between py-[18px] border-b-2 border-dashed border-gray-100 cursor-pointer transition-colors active:bg-gray-50" onclick="toggleLanguage()">
  68. <div class="flex items-center gap-4">
  69. <i class="fa-solid fa-language text-[#1689FC] text-[22px] w-6 text-center shadow-blue-500 drop-shadow-sm"></i>
  70. <span class="text-[#212121] font-bold text-[13px]">@Lang.change_language</span>
  71. </div>
  72. <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
  73. </div>
  74. -->
  75. <!-- Item: Contact Us -->
  76. <div class="flex items-center justify-between py-[18px] cursor-pointer transition-colors active:bg-gray-50">
  77. <div class="flex items-center gap-4">
  78. <i class="fa-solid fa-phone-volume text-[#4A4A4A] text-[18px] w-6 text-center" style="transform: rotate(-15deg);"></i>
  79. <span class="text-[#212121] font-bold text-[13px]">@Lang.contact_us</span>
  80. </div>
  81. <div class="flex items-center gap-3">
  82. <span class="font-extrabold text-[15px] text-[#0062FF]">191</span>
  83. <i class="fa-solid fa-chevron-right text-gray-400 text-sm opacity-80"></i>
  84. </div>
  85. </div>
  86. <!-- Log out Button -->
  87. <div class="mt-6 w-full px-1">
  88. <a href="@Url.Action("Logout", "Home", new { area = "Millions" })" class="w-full flex items-center justify-center bg-[#f00b39] text-white font-bold text-[18px] py-[14px] rounded-[10px] shadow-[0_5px_15px_rgba(238,0,51,0.2)] hover:bg-red-700 transition-colors cursor-pointer no-underline active:scale-95 duration-150">
  89. @Lang.logout
  90. </a>
  91. </div>
  92. <!-- Item: Change Language Flags -->
  93. <div class="mt-8 flex items-center justify-center w-full px-1">
  94. <div class="flex items-center gap-2 bg-gray-100 p-1.5 rounded-xl w-full">
  95. @{
  96. var currentLang = System.Threading.Thread.CurrentThread.CurrentCulture.Name;
  97. }
  98. <a href="javascript:void(0)" onclick="setLanguage('fr')" class="flex flex-1 justify-center items-center gap-2 px-3 py-2 rounded-lg transition-all @(currentLang == "fr" ? "bg-white shadow-sm border border-gray-200" : "opacity-60 hover:opacity-100")">
  99. <img src="/img/en_flag.png" alt="English" class="w-7 h-auto drop-shadow-sm" />
  100. <span class="text-[13px] font-bold text-gray-700">English</span>
  101. </a>
  102. <a href="javascript:void(0)" onclick="setLanguage('en')" class="flex flex-1 justify-center items-center gap-2 px-3 py-2 rounded-lg transition-all @(currentLang != "fr" ? "bg-white shadow-sm border border-gray-200" : "opacity-60 hover:opacity-100")">
  103. <img src="/img/Flag_of_Haiti.png" alt="Natcom" class="w-7 h-auto drop-shadow-sm" />
  104. <span class="text-[13px] font-bold text-gray-700">Natcom</span>
  105. </a>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- Real scalloped edge using CSS mask trick below the white box -->
  110. <div class="w-full relative z-10 scalloped-bottom"></div>
  111. <!-- Bottom Navbar shared component -->
  112. <partial name="_BottomNavbar" />
  113. </div>
  114. <script>
  115. function setLanguage(newLang) {
  116. fetch(subDomain + '/Home/SetCulture?lang=' + newLang)
  117. .then(response => {
  118. location.reload();
  119. })
  120. .catch(error => {
  121. location.reload();
  122. });
  123. }
  124. </script>