Parcourir la source

tăng time đợi mps trả về từ website và api là 2 phút
còn ws thì vô thời hạn

student il y a 1 semaine
Parent
commit
b44eb5f52c

+ 2 - 0
Kitty_Fall/Kitty_Fall/Kitty_Fall.Apis/Business/User/UserBusinessImpl.cs

@@ -646,6 +646,7 @@ namespace Kitty_Fall.Apis.Business.User
                 }
 
 
+                wsClient.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(2);
                 Kitty_FallVasWs.wsRegisterSubQuickResponse wsRegisterSubQuickResponse =
                 await wsClient.wsRegisterSubQuickAsync(
                        wsUser,
@@ -816,6 +817,7 @@ namespace Kitty_Fall.Apis.Business.User
                 }
 
 
+                wsClient.InnerChannel.OperationTimeout = TimeSpan.FromMinutes(2);
                 Kitty_FallVasWs.wsChargeFeeOtpResponse wsChargeFeeOtpResponse =
                 await wsClient.wsChargeFeeOtpAsync(
                        wsUser,

+ 2 - 2
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/Controllers/HomeController.cs

@@ -15,7 +15,7 @@ namespace Kitty_Fall.Website.Controllers
 {
     public class HomeController : BaseController
     {
-        private static readonly TimeSpan QuickRegisterTimeout = TimeSpan.FromSeconds(15);
+        private static readonly TimeSpan QuickRegisterTimeout = TimeSpan.FromMinutes(2);
         private readonly ILogger<HomeController> _logger;
         private readonly IConfiguration _configuration;
         private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(HomeController));
@@ -245,7 +245,7 @@ namespace Kitty_Fall.Website.Controllers
             var remaining = QuickRegisterTimeout - stopwatch.Elapsed;
             if (remaining <= TimeSpan.Zero)
             {
-                throw new TimeoutException("Quick register exceeded its 15-second time limit.");
+                throw new TimeoutException($"Quick register exceeded its {QuickRegisterTimeout.TotalSeconds:0}-second time limit.");
             }
 
             return remaining;

+ 7 - 7
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/Language/Lang.vi.resx

@@ -232,16 +232,16 @@
     <value>စာရင်းသွင်းမှုကို အတည်ပြုပါ</value>
   </data>
   <data name="SubscriptionIntro" xml:space="preserve">
-    <value>အောက်က package ကို subscribe လုပ်ပြီး အလှည့်အပြောင်းတွေနဲ့ ဆုလာဘ်တွေကို ပိုမိုခံစားလိုက်ပါ။</value>
+    <value>package ကို Subscribe လုပ်ပြီး ဆုလာဘ်တွေကို ပိုမိုခံစားလိုက်ပါ။</value>
   </data>
   <data name="MoreTurnsAndMoreFun" xml:space="preserve">
     <value>အလှည့်ပိုများပြီး ပိုပျော်စရာကောင်းတယ်။</value>
   </data>
   <data name="ThisPackageWillBe" xml:space="preserve">
-    <value>ဒီပက်ကေ့ချ်က ပါမယ်</value>
+    <value>ဒီပက်ကေ့ချ်သည် နေ့စဥ်</value>
   </data>
   <data name="AutoRenewedDaily" xml:space="preserve">
-    <value>နေ့စဉ် အလိုအလျောက် သက်တမ်းတိုးသည်။</value>
+    <value>အလိုအလျောက်သက်တမ်းတိုးပါမည်။</value>
   </data>
   <data name="Confirm" xml:space="preserve">
     <value>အတည်ပြုပါ</value>
@@ -352,7 +352,7 @@
     <value>လကို ရွေးချယ်ပါ</value>
   </data>
   <data name="No" xml:space="preserve">
-    <value>မဟုတ်ပါ</value>
+    <value>အမှတ်စဥ်</value>
   </data>
   <data name="Time" xml:space="preserve">
     <value>အချိန်</value>
@@ -601,7 +601,7 @@
     <value>သစ္စာရှိမှုအမှတ်များ</value>
   </data>
   <data name="AccountTotalLoyaltyPoints" xml:space="preserve">
-    <value>စုစုပေါင်း loyalty points များ</value>
+    <value>စုစုပေါင်း loyalty points</value>
   </data>
   <data name="AccountTitle" xml:space="preserve">
     <value>အကောင့်</value>
@@ -628,7 +628,7 @@
     <value>ဒေတာ (MB)</value>
   </data>
   <data name="AccountTotalDataWon" xml:space="preserve">
-    <value>စုစုပေါင်းဒေတာအနိုင်ရရှိမှု</value>
+    <value>စုစုပေါင်းဒေတာ</value>
   </data>
   <data name="AccountMonthlySummary" xml:space="preserve">
     <value>အမှတ်များ၊ ဒေတာနှင့် ဆုလာဘ်များကို {0} မှ {1} အထိ စုဆောင်းပြီး လစဉ် ပြန်လည်သတ်မှတ်ပါသည်။</value>
@@ -667,7 +667,7 @@
     <value>ဝန်ဆောင်မှုကို ပယ်ဖျက်လိုပါက ပေးပို့ပါ</value>
   </data>
   <data name="AccountCancelCommand" xml:space="preserve">
-    <value>{0} မှ {1} အထိ</value>
+    <value>{1} သို့ {0}</value>
   </data>
   <data name="AccountFollowInstructions" xml:space="preserve">
     <value>နှင့် ညွှန်ကြားချက်များကို လိုက်နာပါ။</value>

+ 1 - 1
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/Views/Guide/Index.cshtml

@@ -237,7 +237,7 @@
                             <tbody>
                                 <tr><td>@Lang.GuideFirstPrize</td><td>1</td><td>@Lang.GuideFirstPrizeReward</td></tr>
                                 <tr><td>@Lang.GuideSecondPrize</td><td>1</td><td>@Lang.GuideSecondPrizeReward</td></tr>
-                                <tr><td>@Lang.GuideThirdPrize</td><td>2</td><td>@Lang.GuideThirdPrizeReward</td></tr>
+                                <tr><td>@Lang.GuideThirdPrize</td><td>1</td><td>@Lang.GuideThirdPrizeReward</td></tr>
                             </tbody>
                         </table>
                     </div>

+ 6 - 10
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/Views/Home/Index.cshtml

@@ -27,7 +27,7 @@
 
     <header class="topbar">
         <div class="profile">
-            <button class="home-back-button" type="button" aria-label="Back" onclick="logoutAndBack()">
+            <button class="home-back-button" type="button" aria-label="Back" onclick="backToMyId()">
                 <span></span>
             </button>
             <img class="profile-avatar" src="@avatarUrl" alt="Player avatar">
@@ -123,6 +123,9 @@
          data-auto-register-subscription="@(autoRegisterSubscription ? "true" : "false")"
          data-auto-open-buy-turn="@(autoOpenBuyTurn ? "true" : "false")" aria-hidden="true">
         <button class="subscription-backdrop" type="button" data-close-subscription aria-label="@Lang.ConfirmSubscription"></button>
+        <div class="subscription-loading" data-subscription-loading hidden role="status" aria-label="Processing">
+            <span class="subscription-spinner" aria-hidden="true"></span>
+        </div>
         <section class="confirm-dialog-shell scale-floor modal-panel is-active" data-modal-panel="confirm" data-scale-floor="361" data-scale-height="540" role="dialog" aria-modal="true" aria-label="@Lang.ConfirmSubscription">
             <div class="confirm-dialog scale-floor-inner">
                 <img class="confirm-cat" src="~/kitty/assets/kitty-fall/confirm-cat.png" alt="">
@@ -341,15 +344,8 @@
 
 @section Scripts {
     <script>
-        function logoutAndBack() {
-            $.ajax({
-                url: "/Login/LogoutBackAction",
-                type: "POST",
-                complete: function () {
-                    window.location.href = "mytel://back";
-                    // window.location.href = "Login/index";
-                }
-            });
+        function backToMyId() {
+            window.location.href = "mytel://back";
         }
     </script>
 }

+ 4 - 2
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/Views/Shared/_Layout.cshtml

@@ -3,7 +3,7 @@
 @using Newtonsoft.Json.Linq
 @inject Microsoft.Extensions.Configuration.IConfiguration Configuration
 <!DOCTYPE html>
-<html lang="en">
+<html lang="@(System.Globalization.CultureInfo.CurrentUICulture.Name.StartsWith("vi", StringComparison.OrdinalIgnoreCase) ? "my" : "en")">
 <head>
     <meta charset="utf-8" />
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
@@ -76,7 +76,9 @@
                     </label>
                     <div class="account-profile-fields">
                         <small>@Lang.AccountPhoneNumber</small>
-                        <strong><span>@accountMsisdn</span><span data-profile-name-display>@accountFullName</span></strong>
+                        <strong>
+                            <span>@accountMsisdn</span>
+                        </strong>
                         <input name="fullName" maxlength="100" value="@accountFullName" placeholder="Full name" aria-label="Full name">
                         <p>@Lang.AccountDefaultDescription</p>
                         <button type="submit" data-profile-save>@Lang.AccountSaveProfile</button>

+ 62 - 13
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/css/all.min.css

@@ -2,6 +2,16 @@
 @tailwind components;
 @tailwind utilities;
 
+/* Shared Myanmar font for iOS and Android; Latin text keeps its existing font. */
+@font-face {
+    font-family: "Noto Sans Myanmar";
+    src: url("../fonts/NotoSansMyanmar.ttf") format("truetype");
+    font-style: normal;
+    font-weight: 100 900;
+    font-display: swap;
+    unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F;
+}
+
 :root {
     --screen-width: 500px;
     --pink: #fb0043;
@@ -26,7 +36,7 @@ body {
     display: grid;
     place-items: center;
     background: #14121d;
-    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
+    font-family: "Noto Sans Myanmar", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
 }
 
 img {
@@ -523,6 +533,15 @@ button {
     text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
 }
 
+html[lang="my"] .package-action button {
+    padding: 3px 7px 1px;
+    font-family: "Noto Sans Myanmar", "Myanmar Text", "Segoe UI", sans-serif;
+    font-size: 10px;
+    line-height: 1.35;
+    text-transform: none;
+    white-space: normal;
+}
+
 .bottom-nav-shell {
     position: absolute;
     z-index: 5;
@@ -3134,6 +3153,32 @@ button {
     -webkit-backdrop-filter: blur(6px);
 }
 
+.subscription-loading {
+    position: absolute;
+    z-index: 30;
+    inset: 0;
+    display: grid;
+    place-items: center;
+    background: rgba(255, 255, 255, 0.38);
+    backdrop-filter: blur(2px);
+    -webkit-backdrop-filter: blur(2px);
+}
+
+.subscription-loading[hidden] { display: none; }
+
+.subscription-spinner {
+    width: 52px;
+    height: 52px;
+    border: 6px solid rgba(87, 33, 234, 0.2);
+    border-top-color: #5721ea;
+    border-radius: 50%;
+    animation: subscription-spin 0.7s linear infinite;
+}
+
+@keyframes subscription-spin {
+    to { transform: rotate(360deg); }
+}
+
 .language-menu-modal {
     position: fixed;
     z-index: 40;
@@ -3377,14 +3422,14 @@ button {
 }
 
 .renewal-note {
-    width: 199px;
+    width: 219px;
     height: 56px;
     margin: 0 auto;
     border-radius: 20px;
     display: grid;
-    grid-template-columns: 44px 1fr;
+    grid-template-columns: 34px minmax(0, 1fr);
     align-items: center;
-    padding: 12px;
+    padding: 7px 12px;
     background: rgba(255, 255, 255, 0.72);
     text-align: left;
 }
@@ -3418,8 +3463,12 @@ button {
 }
 
 .renewal-note p {
-    font-size: 13px;
-    line-height: 1.2;
+    min-width: 0;
+    margin: 0;
+    font-size: 11px;
+    line-height: 1.25;
+    overflow-wrap: anywhere;
+    word-break: normal;
 }
 
 .renewal-note strong {
@@ -5036,12 +5085,12 @@ body.has-account-menu {
 
 /* Guide typography follows the supplied T&C document; artwork placement stays unchanged. */
 .guide-content {
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
 }
 
 .guide-content h1 {
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.25;
     text-align: left;
@@ -5055,7 +5104,7 @@ body.has-account-menu {
     align-items: baseline;
     gap: 5px;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.3;
     font-weight: 700;
@@ -5078,7 +5127,7 @@ body.has-account-menu {
 .guide-section li {
     margin-bottom: 8px;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 16px;
     line-height: 1.4;
     text-align: left;
@@ -5094,7 +5143,7 @@ body.has-account-menu {
     padding: 0;
     background: transparent;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.3;
     font-weight: 700;
@@ -5103,7 +5152,7 @@ body.has-account-menu {
 }
 
 .guide-table {
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 16px;
 }
 
@@ -5128,7 +5177,7 @@ body.has-account-menu {
 
 .guide-table caption {
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-style: normal;
     font-size: 17px;
     text-align: left;

+ 62 - 13
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/css/input.css

@@ -2,6 +2,16 @@
 @tailwind components;
 @tailwind utilities;
 
+/* Shared Myanmar font for iOS and Android; Latin text keeps its existing font. */
+@font-face {
+    font-family: "Noto Sans Myanmar";
+    src: url("../fonts/NotoSansMyanmar.ttf") format("truetype");
+    font-style: normal;
+    font-weight: 100 900;
+    font-display: swap;
+    unicode-range: U+1000-109F, U+A9E0-A9FF, U+AA60-AA7F;
+}
+
 :root {
     --screen-width: 500px;
     --pink: #fb0043;
@@ -26,7 +36,7 @@ body {
     display: grid;
     place-items: center;
     background: #14121d;
-    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
+    font-family: "Noto Sans Myanmar", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
 }
 
 img {
@@ -523,6 +533,15 @@ button {
     text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
 }
 
+html[lang="my"] .package-action button {
+    padding: 3px 7px 1px;
+    font-family: "Noto Sans Myanmar", "Myanmar Text", "Segoe UI", sans-serif;
+    font-size: 10px;
+    line-height: 1.35;
+    text-transform: none;
+    white-space: normal;
+}
+
 .bottom-nav-shell {
     position: absolute;
     z-index: 5;
@@ -3134,6 +3153,32 @@ button {
     -webkit-backdrop-filter: blur(6px);
 }
 
+.subscription-loading {
+    position: absolute;
+    z-index: 30;
+    inset: 0;
+    display: grid;
+    place-items: center;
+    background: rgba(255, 255, 255, 0.38);
+    backdrop-filter: blur(2px);
+    -webkit-backdrop-filter: blur(2px);
+}
+
+.subscription-loading[hidden] { display: none; }
+
+.subscription-spinner {
+    width: 52px;
+    height: 52px;
+    border: 6px solid rgba(87, 33, 234, 0.2);
+    border-top-color: #5721ea;
+    border-radius: 50%;
+    animation: subscription-spin 0.7s linear infinite;
+}
+
+@keyframes subscription-spin {
+    to { transform: rotate(360deg); }
+}
+
 .language-menu-modal {
     position: fixed;
     z-index: 40;
@@ -3377,14 +3422,14 @@ button {
 }
 
 .renewal-note {
-    width: 199px;
+    width: 219px;
     height: 56px;
     margin: 0 auto;
     border-radius: 20px;
     display: grid;
-    grid-template-columns: 44px 1fr;
+    grid-template-columns: 34px minmax(0, 1fr);
     align-items: center;
-    padding: 12px;
+    padding: 7px 12px;
     background: rgba(255, 255, 255, 0.72);
     text-align: left;
 }
@@ -3418,8 +3463,12 @@ button {
 }
 
 .renewal-note p {
-    font-size: 13px;
-    line-height: 1.2;
+    min-width: 0;
+    margin: 0;
+    font-size: 11px;
+    line-height: 1.25;
+    overflow-wrap: anywhere;
+    word-break: normal;
 }
 
 .renewal-note strong {
@@ -5036,12 +5085,12 @@ body.has-account-menu {
 
 /* Guide typography follows the supplied T&C document; artwork placement stays unchanged. */
 .guide-content {
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
 }
 
 .guide-content h1 {
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.25;
     text-align: left;
@@ -5055,7 +5104,7 @@ body.has-account-menu {
     align-items: baseline;
     gap: 5px;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.3;
     font-weight: 700;
@@ -5078,7 +5127,7 @@ body.has-account-menu {
 .guide-section li {
     margin-bottom: 8px;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 16px;
     line-height: 1.4;
     text-align: left;
@@ -5094,7 +5143,7 @@ body.has-account-menu {
     padding: 0;
     background: transparent;
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 17px;
     line-height: 1.3;
     font-weight: 700;
@@ -5103,7 +5152,7 @@ body.has-account-menu {
 }
 
 .guide-table {
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-size: 16px;
 }
 
@@ -5128,7 +5177,7 @@ body.has-account-menu {
 
 .guide-table caption {
     color: #111;
-    font-family: "Times New Roman", Times, serif;
+    font-family: "Noto Sans Myanmar", "Times New Roman", Times, serif;
     font-style: normal;
     font-size: 17px;
     text-align: left;

BIN
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/fonts/NotoSansMyanmar.ttf


+ 93 - 0
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/fonts/OFL-NotoSansMyanmar.txt

@@ -0,0 +1,93 @@
+Copyright 2022 The Noto Project Authors (https://github.com/notofonts/myanmar)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded, 
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.

+ 12 - 1
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/js/all.min.js

@@ -491,9 +491,18 @@ const initKittyFall = () => {
     if (subscriptionModal) {
         let reloadAfterSubscriptionSuccess = false;
         let playAfterSubscriptionSuccess = false;
+        const subscriptionLoading = subscriptionModal.querySelector("[data-subscription-loading]");
         const modalPanels = subscriptionModal.querySelectorAll("[data-modal-panel]");
         let ignoreBackdropUntil = 0;
 
+        const setSubscriptionLoading = (isLoading) => {
+            if (subscriptionLoading) subscriptionLoading.hidden = !isLoading;
+            if (isLoading) {
+                subscriptionModal.classList.add("is-open");
+                subscriptionModal.setAttribute("aria-hidden", "false");
+            }
+        };
+
         const setActivePanel = (panelName) => {
             modalPanels.forEach((panel) => {
                 panel.classList.toggle("is-active", panel.dataset.modalPanel === panelName);
@@ -630,6 +639,7 @@ const initKittyFall = () => {
             if (!confirmButton || confirmButton.disabled) return;
 
             confirmButton.disabled = true;
+            setSubscriptionLoading(true);
             const turnCountElement = subscriptionModal.querySelector("[data-result-turn-count]");
             if (turnCountElement && confirmButton.dataset.turnCount) {
                 turnCountElement.textContent = confirmButton.dataset.turnCount;
@@ -661,7 +671,7 @@ const initKittyFall = () => {
             $.ajax({
                 url: actionUrl,
                 type: "POST",
-                timeout: 15000,
+                timeout: 120000,
                 data: {
                     productName: confirmButton.dataset.productName || ""
                 },
@@ -700,6 +710,7 @@ const initKittyFall = () => {
                     showSubscriptionResult("fail", "");
                 },
                 complete: function () {
+                    setSubscriptionLoading(false);
                     confirmButton.disabled = false;
                 }
             });

+ 12 - 1
Kitty_Fall/Kitty_Fall/Kitty_Fall.Website/wwwroot/kitty/js/input.js

@@ -491,9 +491,18 @@ const initKittyFall = () => {
     if (subscriptionModal) {
         let reloadAfterSubscriptionSuccess = false;
         let playAfterSubscriptionSuccess = false;
+        const subscriptionLoading = subscriptionModal.querySelector("[data-subscription-loading]");
         const modalPanels = subscriptionModal.querySelectorAll("[data-modal-panel]");
         let ignoreBackdropUntil = 0;
 
+        const setSubscriptionLoading = (isLoading) => {
+            if (subscriptionLoading) subscriptionLoading.hidden = !isLoading;
+            if (isLoading) {
+                subscriptionModal.classList.add("is-open");
+                subscriptionModal.setAttribute("aria-hidden", "false");
+            }
+        };
+
         const setActivePanel = (panelName) => {
             modalPanels.forEach((panel) => {
                 panel.classList.toggle("is-active", panel.dataset.modalPanel === panelName);
@@ -630,6 +639,7 @@ const initKittyFall = () => {
             if (!confirmButton || confirmButton.disabled) return;
 
             confirmButton.disabled = true;
+            setSubscriptionLoading(true);
             const turnCountElement = subscriptionModal.querySelector("[data-result-turn-count]");
             if (turnCountElement && confirmButton.dataset.turnCount) {
                 turnCountElement.textContent = confirmButton.dataset.turnCount;
@@ -661,7 +671,7 @@ const initKittyFall = () => {
             $.ajax({
                 url: actionUrl,
                 type: "POST",
-                timeout: 15000,
+                timeout: 120000,
                 data: {
                     productName: confirmButton.dataset.productName || ""
                 },
@@ -700,6 +710,7 @@ const initKittyFall = () => {
                     showSubscriptionResult("fail", "");
                 },
                 complete: function () {
+                    setSubscriptionLoading(false);
                     confirmButton.disabled = false;
                 }
             });