|
@@ -1,409 +1,409 @@
|
|
|
@{
|
|
@{
|
|
|
- ViewData["Title"] = "Kitty Fall";
|
|
|
|
|
- var msisdn = ViewBag.Msisdn as string;
|
|
|
|
|
- var profilePicture = ViewBag.ProfilePicture as string;
|
|
|
|
|
- var avatarUrl = string.IsNullOrWhiteSpace(profilePicture) ? Url.Content("~/kitty/assets/kitty-fall/default.png") : Url.Content("~/kitty/assets/kitty-fall/") + profilePicture;
|
|
|
|
|
- var totalPoint = ViewBag.TotalPoint is null ? 0L : Convert.ToInt64(ViewBag.TotalPoint);
|
|
|
|
|
- var totalTurn = ViewBag.TotalTurn is null ? 0L : Convert.ToInt64(ViewBag.TotalTurn);
|
|
|
|
|
- var packageFee = ViewBag.PackageFee is null ? 179M : Convert.ToDecimal(ViewBag.PackageFee);
|
|
|
|
|
- var packageTurns = ViewBag.PackageTurns is null ? 5 : Convert.ToInt32(ViewBag.PackageTurns);
|
|
|
|
|
- var packageExpireDays = ViewBag.PackageExpireDays is null ? 1 : Convert.ToInt32(ViewBag.PackageExpireDays);
|
|
|
|
|
- var packageProductName = ViewBag.PackageProductName as string ?? "";
|
|
|
|
|
- var packagePeriodText = packageExpireDays <= 1 ? "Day" : $"{packageExpireDays} Days";
|
|
|
|
|
- var packageTurnText = packageTurns <= 1 ? "Turn" : "Turns";
|
|
|
|
|
- var isSubscriber = Context.Session.IsSubscriber();
|
|
|
|
|
- var packageAction = isSubscriber ? "buy-turn" : "subscribe";
|
|
|
|
|
- var autoOpenSubscriptionConfirm = (ViewBag.AutoOpenSubscriptionConfirm as bool?) == true && !isSubscriber;
|
|
|
|
|
- // CHARGE is a one-time turn purchase, so it must be available even when
|
|
|
|
|
- // the player does not have an active DAILY/WEEKLY subscription.
|
|
|
|
|
- var autoOpenBuyTurn = (ViewBag.AutoOpenBuyTurn as bool?) == true;
|
|
|
|
|
- var subscriptionPackages = ViewBag.SubscriptionPackages as List<Dictionary<string, object?>> ?? new List<Dictionary<string, object?>>();
|
|
|
|
|
- var subscriptionFees = subscriptionPackages
|
|
|
|
|
- .Select(p => p.TryGetValue("fee", out var value) && decimal.TryParse(value?.ToString(), out var fee) ? fee : 0M)
|
|
|
|
|
- .Where(fee => fee > 0)
|
|
|
|
|
- .ToList();
|
|
|
|
|
- var lowestSubscriptionFee = subscriptionFees.Count > 0 ? subscriptionFees.Min() : packageFee;
|
|
|
|
|
- var turnPackages = ViewBag.TurnPackages as List<Dictionary<string, object?>> ?? new List<Dictionary<string, object?>>();
|
|
|
|
|
- var firstTurnPackage = turnPackages.FirstOrDefault();
|
|
|
|
|
- var buyTurnFee = firstTurnPackage != null && firstTurnPackage.TryGetValue("fee", out var buyTurnFeeValue) && decimal.TryParse(buyTurnFeeValue?.ToString(), out var parsedBuyTurnFee)
|
|
|
|
|
- ? parsedBuyTurnFee
|
|
|
|
|
- : packageFee;
|
|
|
|
|
- var buyTurnCount = firstTurnPackage != null && firstTurnPackage.TryGetValue("numberSpin", out var buyTurnCountValue) && int.TryParse(buyTurnCountValue?.ToString(), out var parsedBuyTurnCount)
|
|
|
|
|
- ? parsedBuyTurnCount
|
|
|
|
|
- : packageTurns;
|
|
|
|
|
- var buyTurnText = buyTurnCount <= 1 ? "Turn" : "Turns";
|
|
|
|
|
|
|
+ ViewData["Title"] = "Kitty Fall";
|
|
|
|
|
+ var msisdn = ViewBag.Msisdn as string;
|
|
|
|
|
+ var profilePicture = ViewBag.ProfilePicture as string;
|
|
|
|
|
+ var avatarUrl = string.IsNullOrWhiteSpace(profilePicture) ? Url.Content("~/kitty/assets/kitty-fall/default.png") : Url.Content("~/kitty/assets/kitty-fall/") + profilePicture;
|
|
|
|
|
+ var totalPoint = ViewBag.TotalPoint is null ? 0L : Convert.ToInt64(ViewBag.TotalPoint);
|
|
|
|
|
+ var totalTurn = ViewBag.TotalTurn is null ? 0L : Convert.ToInt64(ViewBag.TotalTurn);
|
|
|
|
|
+ var packageFee = ViewBag.PackageFee is null ? 179M : Convert.ToDecimal(ViewBag.PackageFee);
|
|
|
|
|
+ var packageTurns = ViewBag.PackageTurns is null ? 5 : Convert.ToInt32(ViewBag.PackageTurns);
|
|
|
|
|
+ var packageExpireDays = ViewBag.PackageExpireDays is null ? 1 : Convert.ToInt32(ViewBag.PackageExpireDays);
|
|
|
|
|
+ var packageProductName = ViewBag.PackageProductName as string ?? "";
|
|
|
|
|
+ var packagePeriodText = packageExpireDays <= 1 ? "Day" : $"{packageExpireDays} Days";
|
|
|
|
|
+ var packageTurnText = packageTurns <= 1 ? "Turn" : "Turns";
|
|
|
|
|
+ var isSubscriber = Context.Session.IsSubscriber();
|
|
|
|
|
+ var packageAction = isSubscriber ? "buy-turn" : "subscribe";
|
|
|
|
|
+ var autoOpenSubscriptionConfirm = (ViewBag.AutoOpenSubscriptionConfirm as bool?) == true && !isSubscriber;
|
|
|
|
|
+ // CHARGE is a one-time turn purchase, so it must be available even when
|
|
|
|
|
+ // the player does not have an active DAILY/WEEKLY subscription.
|
|
|
|
|
+ var autoOpenBuyTurn = (ViewBag.AutoOpenBuyTurn as bool?) == true;
|
|
|
|
|
+ var subscriptionPackages = ViewBag.SubscriptionPackages as List<Dictionary<string, object?>> ?? new List<Dictionary<string, object?>>();
|
|
|
|
|
+ var subscriptionFees = subscriptionPackages
|
|
|
|
|
+ .Select(p => p.TryGetValue("fee", out var value) && decimal.TryParse(value?.ToString(), out var fee) ? fee : 0M)
|
|
|
|
|
+ .Where(fee => fee > 0)
|
|
|
|
|
+ .ToList();
|
|
|
|
|
+ var lowestSubscriptionFee = subscriptionFees.Count > 0 ? subscriptionFees.Min() : packageFee;
|
|
|
|
|
+ var turnPackages = ViewBag.TurnPackages as List<Dictionary<string, object?>> ?? new List<Dictionary<string, object?>>();
|
|
|
|
|
+ var firstTurnPackage = turnPackages.FirstOrDefault();
|
|
|
|
|
+ var buyTurnFee = firstTurnPackage != null && firstTurnPackage.TryGetValue("fee", out var buyTurnFeeValue) && decimal.TryParse(buyTurnFeeValue?.ToString(), out var parsedBuyTurnFee)
|
|
|
|
|
+ ? parsedBuyTurnFee
|
|
|
|
|
+ : packageFee;
|
|
|
|
|
+ var buyTurnCount = firstTurnPackage != null && firstTurnPackage.TryGetValue("numberSpin", out var buyTurnCountValue) && int.TryParse(buyTurnCountValue?.ToString(), out var parsedBuyTurnCount)
|
|
|
|
|
+ ? parsedBuyTurnCount
|
|
|
|
|
+ : packageTurns;
|
|
|
|
|
+ var buyTurnText = buyTurnCount <= 1 ? "Turn" : "Turns";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
<main class="kitty-app" aria-label="Kitty Fall home screen">
|
|
<main class="kitty-app" aria-label="Kitty Fall home screen">
|
|
|
- <img class="kitty-bg" src="~/kitty/assets/kitty-fall/bg.png" alt="">
|
|
|
|
|
- <div class="kitty-bg-fade"></div>
|
|
|
|
|
-
|
|
|
|
|
- <header class="topbar">
|
|
|
|
|
- <div class="profile">
|
|
|
|
|
- <button class="home-back-button" type="button" aria-label="Back" onclick="logoutAndBack()">
|
|
|
|
|
- <span></span>
|
|
|
|
|
- </button>
|
|
|
|
|
- <img class="profile-avatar" src="@avatarUrl" alt="Player avatar">
|
|
|
|
|
- <div class="profile-copy">
|
|
|
|
|
- <strong>@Lang.Hello</strong>
|
|
|
|
|
- <span>@(string.IsNullOrWhiteSpace(msisdn) ? "-" : msisdn)</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="topbar-actions">
|
|
|
|
|
- <button class="menu-button" type="button" aria-label="Open menu">
|
|
|
|
|
- <span></span>
|
|
|
|
|
- <span></span>
|
|
|
|
|
- <span></span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </header>
|
|
|
|
|
-
|
|
|
|
|
- <section class="stats-shell home-screen scale-floor" data-scale-floor="368" data-scale-height="80" data-scale-keep-height="true" aria-label="Player status">
|
|
|
|
|
- <div class="stats-card scale-floor-inner">
|
|
|
|
|
- <div class="stat-item">
|
|
|
|
|
- <img class="stat-icon coin" src="~/kitty/assets/kitty-fall/coin.png" alt="">
|
|
|
|
|
- <div>
|
|
|
|
|
- <p>@Lang.Points</p>
|
|
|
|
|
- <strong class="points">@totalPoint.ToString("N0")</strong>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span class="stat-divider"></span>
|
|
|
|
|
- <div class="stat-item">
|
|
|
|
|
- <img class="stat-icon ticket" src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
- <div>
|
|
|
|
|
- <p>@Lang.PlayTurns</p>
|
|
|
|
|
- <strong class="turns">@totalTurn.ToString("N0")</strong>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <section class="hero home-screen" aria-label="Kitty Fall">
|
|
|
|
|
- <img class="kitty-logo" src="~/kitty/assets/kitty-fall/logo.png" alt="Kitty Fall">
|
|
|
|
|
- <img class="kitty-cat" src="~/kitty/assets/kitty-fall/cat.png" alt="Smiling kitten">
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <a class="play-button home-screen" href="/Play" aria-label="@Lang.PlayNow">
|
|
|
|
|
- <span class="play-icon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/play-icon.svg" alt="">
|
|
|
|
|
- </span>
|
|
|
|
|
- <span>@Lang.PlayNow</span>
|
|
|
|
|
- </a>
|
|
|
|
|
-
|
|
|
|
|
- <section class="package-shell home-screen scale-floor" data-scale-floor="368" data-scale-height="100" data-scale-keep-height="true" aria-label="@(isSubscriber ? Lang.BuyTurn : "Subscription packages")">
|
|
|
|
|
- @if (isSubscriber)
|
|
|
|
|
- {
|
|
|
|
|
- <div class="package-card scale-floor-inner">
|
|
|
|
|
- <img class="package-icon" src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
- <div class="package-copy">
|
|
|
|
|
- <div class="package-title"><h2>@Lang.BuyTurn</h2></div>
|
|
|
|
|
- <p>@Lang.SelectTurnPackage</p>
|
|
|
|
|
- <p>@buyTurnCount @buyTurnText available from @buyTurnFee.ToString("N0") HTG</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="package-action">
|
|
|
|
|
- <p><strong>@buyTurnFee.ToString("N0")</strong> HTG/@buyTurnCount @buyTurnText</p>
|
|
|
|
|
- <button class="subscribe-trigger" type="button" data-open-buy-turn>@Lang.BuyTurn</button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- <div class="package-card scale-floor-inner">
|
|
|
|
|
- <img class="package-icon" src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
- <div class="package-copy">
|
|
|
|
|
- <div class="package-title"><h2>Daily / Weekly</h2></div>
|
|
|
|
|
- <p>Choose your package</p>
|
|
|
|
|
- <p>Daily or weekly auto renewal</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="package-action">
|
|
|
|
|
- <p><span>From</span> <strong>@lowestSubscriptionFee.ToString("N0")</strong> HTG</p>
|
|
|
|
|
- <button class="subscribe-trigger" type="button" data-open-subscription-options>@Lang.SubscribeNow</button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- }
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <div class="subscription-modal" data-subscription-modal
|
|
|
|
|
- data-auto-open-subscription="@(autoOpenSubscriptionConfirm ? "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>
|
|
|
|
|
-
|
|
|
|
|
- <section class="confirm-dialog-shell buy-turn-dialog-shell scale-floor modal-panel" data-modal-panel="subscription-options" data-scale-floor="361" data-scale-height="460" role="dialog" aria-modal="true" aria-label="Select subscription package">
|
|
|
|
|
- <div class="confirm-dialog buy-turn-dialog scale-floor-inner">
|
|
|
|
|
- <div class="confirm-card buy-turn-card">
|
|
|
|
|
- <div class="confirm-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs><path id="subscription-options-title-path" d="M 20 55 Q 160 18 300 55" /></defs>
|
|
|
|
|
- <text font-size="27" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#subscription-options-title-path" startOffset="50%">SELECT PACKAGE</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="Close">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
- <p class="confirm-intro buy-turn-intro">Choose your subscription package</p>
|
|
|
|
|
- <div class="buy-turn-options">
|
|
|
|
|
- @foreach (var subscriptionPackage in subscriptionPackages)
|
|
|
|
|
- {
|
|
|
|
|
- var optionProductName = subscriptionPackage.TryGetValue("productName", out var optionProductValue) ? optionProductValue?.ToString() ?? "" : "";
|
|
|
|
|
- var optionFee = subscriptionPackage.TryGetValue("fee", out var optionFeeValue) && decimal.TryParse(optionFeeValue?.ToString(), out var parsedOptionFee) ? parsedOptionFee : 0M;
|
|
|
|
|
- var optionTurns = subscriptionPackage.TryGetValue("numberSpin", out var optionTurnsValue) && int.TryParse(optionTurnsValue?.ToString(), out var parsedOptionTurns) ? parsedOptionTurns : 0;
|
|
|
|
|
- var optionExpireDays = subscriptionPackage.TryGetValue("expireDays", out var optionDaysValue) && int.TryParse(optionDaysValue?.ToString(), out var parsedOptionDays) ? parsedOptionDays : 1;
|
|
|
|
|
- var optionIsWeekly = optionProductName.Contains("WEEKLY", StringComparison.OrdinalIgnoreCase) || optionExpireDays == 7;
|
|
|
|
|
- var optionTitle = optionIsWeekly ? "Weekly Package" : Lang.DailyPackage;
|
|
|
|
|
- var optionPeriod = optionIsWeekly ? "week" : "day";
|
|
|
|
|
- var optionTurnText = optionTurns <= 1 ? "Turn" : "Turns";
|
|
|
|
|
- var optionRenewal = optionIsWeekly ? "Auto renewed weekly" : Lang.AutoRenewedDaily;
|
|
|
|
|
-
|
|
|
|
|
- <button class="buy-turn-option" type="button"
|
|
|
|
|
- data-select-subscription-package
|
|
|
|
|
- data-product-name="@optionProductName"
|
|
|
|
|
- data-package-fee="@optionFee.ToString("N0")"
|
|
|
|
|
- data-package-turns="@optionTurns"
|
|
|
|
|
- data-package-turn-text="@optionTurnText"
|
|
|
|
|
- data-package-renewal="@optionRenewal">
|
|
|
|
|
- <span>
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
- <strong>@optionTitle</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <b>@optionFee.ToString("N0") HTG/@optionPeriod</b>
|
|
|
|
|
- <small>@optionTurns @optionTurnText</small>
|
|
|
|
|
- </button>
|
|
|
|
|
- }
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <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="">
|
|
|
|
|
- <div class="confirm-card">
|
|
|
|
|
- <div class="confirm-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="confirm-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
- </defs>
|
|
|
|
|
- <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#confirm-ribbon-title-path" startOffset="50%">@Lang.ConfirmSubscription</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- <span id="subscription-title" class="sr-only">@Lang.ConfirmSubscription</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.ConfirmSubscription">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
- <p class="confirm-intro">@Lang.SubscriptionIntro</p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="confirm-price">
|
|
|
|
|
- <strong data-subscription-fee>@packageFee.ToString("N0")</strong>
|
|
|
|
|
- <span data-subscription-turns>HTG/@packageTurns @packageTurnText</span>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <img class="confirm-tickets" src="~/kitty/assets/kitty-fall/confirm-tickets.png" alt="">
|
|
|
|
|
-
|
|
|
|
|
- <p class="confirm-note">@Lang.MoreTurnsAndMoreFun</p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="renewal-note">
|
|
|
|
|
- <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
- <p>@Lang.ThisPackageWillBe <strong data-subscription-renewal>@Lang.AutoRenewedDaily</strong></p>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <button class="confirm-button" type="button" data-confirm-subscription data-package-action="@packageAction" data-product-name="@packageProductName">
|
|
|
|
|
- <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
- <span>@Lang.Confirm</span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <section class="confirm-dialog-shell buy-turn-dialog-shell scale-floor modal-panel" data-modal-panel="buy-turn" data-scale-floor="361" data-scale-height="460" role="dialog" aria-modal="true" aria-label="@Lang.SelectTurnPackage">
|
|
|
|
|
- <div class="confirm-dialog buy-turn-dialog scale-floor-inner">
|
|
|
|
|
- <div class="confirm-card buy-turn-card">
|
|
|
|
|
- <div class="confirm-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="buy-turn-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
- </defs>
|
|
|
|
|
- <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#buy-turn-ribbon-title-path" startOffset="50%">@Lang.BuyTurn</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- <span class="sr-only">@Lang.SelectTurnPackage</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.SelectTurnPackage">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
- <p class="confirm-intro buy-turn-intro">@Lang.SelectTurnPackage</p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="buy-turn-options">
|
|
|
|
|
- @foreach (var turnPackage in turnPackages)
|
|
|
|
|
- {
|
|
|
|
|
- var turnProductName = turnPackage.TryGetValue("productName", out var productNameValue) ? productNameValue?.ToString() ?? "" : "";
|
|
|
|
|
- var turnFee = turnPackage.TryGetValue("fee", out var feeValue) && decimal.TryParse(feeValue?.ToString(), out var parsedFee) ? parsedFee : 0M;
|
|
|
|
|
- var turnCount = turnPackage.TryGetValue("numberSpin", out var turnValue) && int.TryParse(turnValue?.ToString(), out var parsedTurn) ? parsedTurn : 0;
|
|
|
|
|
- var turnText = turnCount <= 1 ? "Turn" : "Turns";
|
|
|
|
|
-
|
|
|
|
|
- if (string.IsNullOrWhiteSpace(turnProductName))
|
|
|
|
|
- {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- <button class="buy-turn-option" type="button" data-select-buy-turn-package data-product-name="@turnProductName" data-turn-count="@turnCount" data-turn-fee="@turnFee.ToString("N0")">
|
|
|
|
|
- <span>
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
- <strong>@turnCount @turnText</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <b>@turnFee.ToString("N0") HTG</b>
|
|
|
|
|
- @* <small>@turnProductName</small> *@
|
|
|
|
|
- </button>
|
|
|
|
|
- }
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <section class="confirm-dialog-shell buy-turn-confirm-dialog-shell scale-floor modal-panel" data-modal-panel="confirm-buy-turn" data-scale-floor="361" data-scale-height="430" role="dialog" aria-modal="true" aria-label="@Lang.ConfirmBuyTurn">
|
|
|
|
|
- <div class="confirm-dialog buy-turn-confirm-dialog scale-floor-inner">
|
|
|
|
|
- <div class="confirm-card buy-turn-confirm-card">
|
|
|
|
|
- <div class="confirm-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="confirm-buy-turn-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
- </defs>
|
|
|
|
|
- <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#confirm-buy-turn-ribbon-title-path" startOffset="50%">@Lang.ConfirmBuyTurn</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- <span class="sr-only">@Lang.ConfirmBuyTurn</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.ConfirmBuyTurn">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
- <p class="confirm-intro buy-turn-confirm-intro">@Lang.ConfirmBuyTurnQuestion</p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="selected-buy-turn-package">
|
|
|
|
|
- <span>
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
- <strong data-selected-turn-count>-</strong>
|
|
|
|
|
- </span>
|
|
|
|
|
- <b><span data-selected-turn-fee>-</span> HTG</b>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <button class="confirm-button buy-turn-confirm-button" type="button" data-confirm-subscription data-package-action="buy-turn" data-product-name="" data-turn-count="">
|
|
|
|
|
- <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
- <span>@Lang.Confirm</span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <section class="result-dialog-shell result-dialog-shell-success scale-floor modal-panel" data-modal-panel="success" data-scale-floor="361" data-scale-height="608" role="dialog" aria-modal="true" aria-label="@Lang.Successful">
|
|
|
|
|
- <div class="result-dialog scale-floor-inner">
|
|
|
|
|
- <img class="result-cat result-cat-success" src="~/kitty/assets/kitty-fall/result-success-cat.png" alt="">
|
|
|
|
|
- <div class="result-card result-card-success">
|
|
|
|
|
- <div class="confirm-ribbon result-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title result-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="result-success-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
- </defs>
|
|
|
|
|
- <text font-size="34" font-weight="900" fill="#fff" text-anchor="middle" textLength="210" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#result-success-title-path" startOffset="50%">@Lang.Successful</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- <span class="sr-only">@Lang.Successful</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.Successful">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
- <img class="result-status-icon result-status-success" src="~/kitty/assets/kitty-fall/result-success-icon.png" alt="">
|
|
|
|
|
- <p class="result-title result-title-success" data-success-title
|
|
|
|
|
- data-subscription-title="@Lang.SubscriptionSuccessMessage"
|
|
|
|
|
- data-buy-turn-template="@Lang.BuyTurnSuccessMessage">@Lang.SubscriptionSuccessMessage</p>
|
|
|
|
|
-
|
|
|
|
|
- <div class="result-benefits" data-success-benefits>
|
|
|
|
|
- <div class="result-benefit">
|
|
|
|
|
- <span class="result-ticket-icon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
- @* <strong>x@packageTurns</strong> *@
|
|
|
|
|
- </span>
|
|
|
|
|
- <p><strong data-result-turn-count>@packageTurns</strong> @Lang.TurnsHaveBeenAdded</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="result-benefit" data-subscription-result-only>
|
|
|
|
|
- <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
- <p>@Lang.EnjoyMoreRewards</p>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="result-benefit" data-subscription-result-only>
|
|
|
|
|
- <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
- <p>@Lang.ThisPackageWillBe <strong>@Lang.AutoRenewedDaily</strong></p>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <button class="result-button confirm-button" type="button" data-close-subscription
|
|
|
|
|
- data-success-action-button data-confirm-label="@Lang.Confirm"
|
|
|
|
|
- data-play-label="@Lang.PlayNow" data-play-url="@Url.Action("Index", "Play")">
|
|
|
|
|
- <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
- <span data-success-action-label>@Lang.Confirm</span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
-
|
|
|
|
|
- <section class="result-dialog-shell result-dialog-shell-fail scale-floor modal-panel" data-modal-panel="fail" data-scale-floor="361" data-scale-height="452" role="dialog" aria-modal="true" aria-label="@Lang.SubscriptionFailed">
|
|
|
|
|
- <div class="result-dialog scale-floor-inner">
|
|
|
|
|
- <img class="result-cat result-cat-fail" src="~/kitty/assets/kitty-fall/result-fail-cat.png" alt="">
|
|
|
|
|
- <div class="result-card result-card-fail">
|
|
|
|
|
- <div class="confirm-ribbon result-ribbon">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
- <svg class="confirm-ribbon-title result-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
- <defs>
|
|
|
|
|
- <path id="result-fail-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
- </defs>
|
|
|
|
|
- <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
- <textPath href="#result-fail-title-path" startOffset="50%">@Lang.SubscriptionFailed</textPath>
|
|
|
|
|
- </text>
|
|
|
|
|
- </svg>
|
|
|
|
|
- <span class="sr-only">@Lang.SubscriptionFailed</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.SubscriptionFailed">
|
|
|
|
|
- <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
- </button>
|
|
|
|
|
-
|
|
|
|
|
- <img class="result-status-icon result-status-fail" src="~/kitty/assets/kitty-fall/result-fail-icon.png" alt="">
|
|
|
|
|
- <p class="result-title result-title-fail">@Lang.SubscriptionFailedTitle</p>
|
|
|
|
|
- <p class="result-copy-fail" data-fallback-message="@Lang.SubscriptionFailedCopy @Lang.PleaseTryAgain">@Lang.SubscriptionFailedCopy<br>@Lang.PleaseTryAgain</p>
|
|
|
|
|
-
|
|
|
|
|
- <button class="result-button result-button-fail confirm-button" type="button" data-close-subscription>
|
|
|
|
|
- <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
- <span>@Lang.Confirm</span>
|
|
|
|
|
- </button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </section>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <img class="kitty-bg" src="~/kitty/assets/kitty-fall/bg.png" alt="">
|
|
|
|
|
+ <div class="kitty-bg-fade"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <header class="topbar">
|
|
|
|
|
+ <div class="profile">
|
|
|
|
|
+ <button class="home-back-button" type="button" aria-label="Back" onclick="logoutAndBack()">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <img class="profile-avatar" src="@avatarUrl" alt="Player avatar">
|
|
|
|
|
+ <div class="profile-copy">
|
|
|
|
|
+ <strong>@Lang.Hello</strong>
|
|
|
|
|
+ <span>@(string.IsNullOrWhiteSpace(msisdn) ? "-" : msisdn)</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="topbar-actions">
|
|
|
|
|
+ <button class="menu-button" type="button" aria-label="Open menu">
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ <span></span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </header>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="stats-shell home-screen scale-floor" data-scale-floor="368" data-scale-height="80" data-scale-keep-height="true" aria-label="Player status">
|
|
|
|
|
+ <div class="stats-card scale-floor-inner">
|
|
|
|
|
+ <div class="stat-item">
|
|
|
|
|
+ <img class="stat-icon coin" src="~/kitty/assets/kitty-fall/coin.png" alt="">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>@Lang.Points</p>
|
|
|
|
|
+ <strong class="points">@totalPoint.ToString("N0")</strong>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <span class="stat-divider"></span>
|
|
|
|
|
+ <div class="stat-item">
|
|
|
|
|
+ <img class="stat-icon ticket" src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <p>@Lang.PlayTurns</p>
|
|
|
|
|
+ <strong class="turns">@totalTurn.ToString("N0")</strong>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="hero home-screen" aria-label="Kitty Fall">
|
|
|
|
|
+ <img class="kitty-logo" src="~/kitty/assets/kitty-fall/logo.png" alt="Kitty Fall">
|
|
|
|
|
+ <img class="kitty-cat" src="~/kitty/assets/kitty-fall/cat.png" alt="Smiling kitten">
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <a class="play-button home-screen" href="/Play" aria-label="@Lang.PlayNow">
|
|
|
|
|
+ <span class="play-icon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/play-icon.svg" alt="">
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span>@Lang.PlayNow</span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="package-shell home-screen scale-floor" data-scale-floor="368" data-scale-height="100" data-scale-keep-height="true" aria-label="@(isSubscriber? Lang.BuyTurn: "Subscription packages")">
|
|
|
|
|
+ @if (isSubscriber)
|
|
|
|
|
+ {
|
|
|
|
|
+ <div class="package-card scale-floor-inner">
|
|
|
|
|
+ <img class="package-icon" src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
+ <div class="package-copy">
|
|
|
|
|
+ <div class="package-title"><h2>@Lang.BuyTurn</h2></div>
|
|
|
|
|
+ <p>@Lang.SelectTurnPackage</p>
|
|
|
|
|
+ <p>@buyTurnCount @buyTurnText available from @buyTurnFee.ToString("N0") HTG</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="package-action">
|
|
|
|
|
+ <p><strong>@buyTurnFee.ToString("N0")</strong> HTG/@buyTurnCount @buyTurnText</p>
|
|
|
|
|
+ <button class="subscribe-trigger" type="button" data-open-buy-turn>@Lang.BuyTurn</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ <div class="package-card scale-floor-inner">
|
|
|
|
|
+ <img class="package-icon" src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
+ <div class="package-copy">
|
|
|
|
|
+ <div class="package-title"><h2>Daily / Weekly</h2></div>
|
|
|
|
|
+ <p>Choose your package</p>
|
|
|
|
|
+ <p>Daily or weekly auto renewal</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="package-action">
|
|
|
|
|
+ <p><span>From</span> <strong>@lowestSubscriptionFee.ToString("N0")</strong> HTG</p>
|
|
|
|
|
+ <button class="subscribe-trigger" type="button" data-open-subscription-options>@Lang.SubscribeNow</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ }
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="subscription-modal" data-subscription-modal
|
|
|
|
|
+ data-auto-open-subscription="@(autoOpenSubscriptionConfirm ? "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>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="confirm-dialog-shell buy-turn-dialog-shell scale-floor modal-panel" data-modal-panel="subscription-options" data-scale-floor="361" data-scale-height="460" role="dialog" aria-modal="true" aria-label="Select subscription package">
|
|
|
|
|
+ <div class="confirm-dialog buy-turn-dialog scale-floor-inner">
|
|
|
|
|
+ <div class="confirm-card buy-turn-card">
|
|
|
|
|
+ <div class="confirm-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs><path id="subscription-options-title-path" d="M 20 55 Q 160 18 300 55" /></defs>
|
|
|
|
|
+ <text font-size="27" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#subscription-options-title-path" startOffset="50%">SELECT PACKAGE</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="Close">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+ <p class="confirm-intro buy-turn-intro">Choose your subscription package</p>
|
|
|
|
|
+ <div class="buy-turn-options">
|
|
|
|
|
+ @foreach (var subscriptionPackage in subscriptionPackages)
|
|
|
|
|
+ {
|
|
|
|
|
+ var optionProductName = subscriptionPackage.TryGetValue("productName", out var optionProductValue) ? optionProductValue?.ToString() ?? "" : "";
|
|
|
|
|
+ var optionFee = subscriptionPackage.TryGetValue("fee", out var optionFeeValue) && decimal.TryParse(optionFeeValue?.ToString(), out var parsedOptionFee) ? parsedOptionFee : 0M;
|
|
|
|
|
+ var optionTurns = subscriptionPackage.TryGetValue("numberSpin", out var optionTurnsValue) && int.TryParse(optionTurnsValue?.ToString(), out var parsedOptionTurns) ? parsedOptionTurns : 0;
|
|
|
|
|
+ var optionExpireDays = subscriptionPackage.TryGetValue("expireDays", out var optionDaysValue) && int.TryParse(optionDaysValue?.ToString(), out var parsedOptionDays) ? parsedOptionDays : 1;
|
|
|
|
|
+ var optionIsWeekly = optionProductName.Contains("WEEKLY", StringComparison.OrdinalIgnoreCase) || optionExpireDays == 7;
|
|
|
|
|
+ var optionTitle = optionIsWeekly ? "Weekly Package" : Lang.DailyPackage;
|
|
|
|
|
+ var optionPeriod = optionIsWeekly ? "week" : "day";
|
|
|
|
|
+ var optionTurnText = optionTurns <= 1 ? "Turn" : "Turns";
|
|
|
|
|
+ var optionRenewal = optionIsWeekly ? "Auto renewed weekly" : Lang.AutoRenewedDaily;
|
|
|
|
|
+
|
|
|
|
|
+ <button class="buy-turn-option" type="button"
|
|
|
|
|
+ data-select-subscription-package
|
|
|
|
|
+ data-product-name="@optionProductName"
|
|
|
|
|
+ data-package-fee="@optionFee.ToString("N0")"
|
|
|
|
|
+ data-package-turns="@optionTurns"
|
|
|
|
|
+ data-package-turn-text="@optionTurnText"
|
|
|
|
|
+ data-package-renewal="@optionRenewal">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/gift.png" alt="">
|
|
|
|
|
+ <strong>@optionTitle</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <b>@optionFee.ToString("N0") HTG/@optionPeriod</b>
|
|
|
|
|
+ <small>@optionTurns @optionTurnText</small>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <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="">
|
|
|
|
|
+ <div class="confirm-card">
|
|
|
|
|
+ <div class="confirm-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs>
|
|
|
|
|
+ <path id="confirm-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
+ </defs>
|
|
|
|
|
+ <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#confirm-ribbon-title-path" startOffset="50%">@Lang.ConfirmSubscription</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span id="subscription-title" class="sr-only">@Lang.ConfirmSubscription</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.ConfirmSubscription">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <p class="confirm-intro">@Lang.SubscriptionIntro</p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="confirm-price">
|
|
|
|
|
+ <strong data-subscription-fee>@packageFee.ToString("N0")</strong>
|
|
|
|
|
+ <span data-subscription-turns>HTG/@packageTurns @packageTurnText</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <img class="confirm-tickets" src="~/kitty/assets/kitty-fall/confirm-tickets.png" alt="">
|
|
|
|
|
+
|
|
|
|
|
+ <p class="confirm-note">@Lang.MoreTurnsAndMoreFun</p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="renewal-note">
|
|
|
|
|
+ <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <p>@Lang.ThisPackageWillBe <strong data-subscription-renewal>@Lang.AutoRenewedDaily</strong></p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <button class="confirm-button" type="button" data-confirm-subscription data-package-action="@packageAction" data-product-name="@packageProductName">
|
|
|
|
|
+ <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <span>@Lang.Confirm</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="confirm-dialog-shell buy-turn-dialog-shell scale-floor modal-panel" data-modal-panel="buy-turn" data-scale-floor="361" data-scale-height="460" role="dialog" aria-modal="true" aria-label="@Lang.SelectTurnPackage">
|
|
|
|
|
+ <div class="confirm-dialog buy-turn-dialog scale-floor-inner">
|
|
|
|
|
+ <div class="confirm-card buy-turn-card">
|
|
|
|
|
+ <div class="confirm-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs>
|
|
|
|
|
+ <path id="buy-turn-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
+ </defs>
|
|
|
|
|
+ <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#buy-turn-ribbon-title-path" startOffset="50%">@Lang.BuyTurn</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span class="sr-only">@Lang.SelectTurnPackage</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.SelectTurnPackage">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <p class="confirm-intro buy-turn-intro">@Lang.SelectTurnPackage</p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="buy-turn-options">
|
|
|
|
|
+ @foreach (var turnPackage in turnPackages)
|
|
|
|
|
+ {
|
|
|
|
|
+ var turnProductName = turnPackage.TryGetValue("productName", out var productNameValue) ? productNameValue?.ToString() ?? "" : "";
|
|
|
|
|
+ var turnFee = turnPackage.TryGetValue("fee", out var feeValue) && decimal.TryParse(feeValue?.ToString(), out var parsedFee) ? parsedFee : 0M;
|
|
|
|
|
+ var turnCount = turnPackage.TryGetValue("numberSpin", out var turnValue) && int.TryParse(turnValue?.ToString(), out var parsedTurn) ? parsedTurn : 0;
|
|
|
|
|
+ var turnText = turnCount <= 1 ? "Turn" : "Turns";
|
|
|
|
|
+
|
|
|
|
|
+ if (string.IsNullOrWhiteSpace(turnProductName))
|
|
|
|
|
+ {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ <button class="buy-turn-option" type="button" data-select-buy-turn-package data-product-name="@turnProductName" data-turn-count="@turnCount" data-turn-fee="@turnFee.ToString("N0")">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
+ <strong>@turnCount @turnText</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <b>@turnFee.ToString("N0") HTG</b>
|
|
|
|
|
+ @* <small>@turnProductName</small> *@
|
|
|
|
|
+ </button>
|
|
|
|
|
+ }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="confirm-dialog-shell buy-turn-confirm-dialog-shell scale-floor modal-panel" data-modal-panel="confirm-buy-turn" data-scale-floor="361" data-scale-height="430" role="dialog" aria-modal="true" aria-label="@Lang.ConfirmBuyTurn">
|
|
|
|
|
+ <div class="confirm-dialog buy-turn-confirm-dialog scale-floor-inner">
|
|
|
|
|
+ <div class="confirm-card buy-turn-confirm-card">
|
|
|
|
|
+ <div class="confirm-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs>
|
|
|
|
|
+ <path id="confirm-buy-turn-ribbon-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
+ </defs>
|
|
|
|
|
+ <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#confirm-buy-turn-ribbon-title-path" startOffset="50%">@Lang.ConfirmBuyTurn</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span class="sr-only">@Lang.ConfirmBuyTurn</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.ConfirmBuyTurn">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <p class="confirm-intro buy-turn-confirm-intro">@Lang.ConfirmBuyTurnQuestion</p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="selected-buy-turn-package">
|
|
|
|
|
+ <span>
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
+ <strong data-selected-turn-count>-</strong>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <b><span data-selected-turn-fee>-</span> HTG</b>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <button class="confirm-button buy-turn-confirm-button" type="button" data-confirm-subscription data-package-action="buy-turn" data-product-name="" data-turn-count="">
|
|
|
|
|
+ <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <span>@Lang.Confirm</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="result-dialog-shell result-dialog-shell-success scale-floor modal-panel" data-modal-panel="success" data-scale-floor="361" data-scale-height="608" role="dialog" aria-modal="true" aria-label="@Lang.Successful">
|
|
|
|
|
+ <div class="result-dialog scale-floor-inner">
|
|
|
|
|
+ <img class="result-cat result-cat-success" src="~/kitty/assets/kitty-fall/result-success-cat.png" alt="">
|
|
|
|
|
+ <div class="result-card result-card-success">
|
|
|
|
|
+ <div class="confirm-ribbon result-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title result-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs>
|
|
|
|
|
+ <path id="result-success-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
+ </defs>
|
|
|
|
|
+ <text font-size="34" font-weight="900" fill="#fff" text-anchor="middle" textLength="210" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#result-success-title-path" startOffset="50%">@Lang.Successful</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span class="sr-only">@Lang.Successful</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.Successful">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <img class="result-status-icon result-status-success" src="~/kitty/assets/kitty-fall/result-success-icon.png" alt="">
|
|
|
|
|
+ <p class="result-title result-title-success" data-success-title
|
|
|
|
|
+ data-subscription-title="@Lang.SubscriptionSuccessMessage"
|
|
|
|
|
+ data-buy-turn-template="@Lang.BuyTurnSuccessMessage">@Lang.SubscriptionSuccessMessage</p>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="result-benefits" data-success-benefits>
|
|
|
|
|
+ <div class="result-benefit">
|
|
|
|
|
+ <span class="result-ticket-icon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/ticket.png" alt="">
|
|
|
|
|
+ @* <strong>x@packageTurns</strong> *@
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <p><strong data-result-turn-count>@packageTurns</strong> @Lang.TurnsHaveBeenAdded</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="result-benefit" data-subscription-result-only>
|
|
|
|
|
+ <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <p>@Lang.EnjoyMoreRewards</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="result-benefit" data-subscription-result-only>
|
|
|
|
|
+ <span class="renewal-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <p>@Lang.ThisPackageWillBe <strong>@Lang.AutoRenewedDaily</strong></p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <button class="result-button confirm-button" type="button" data-close-subscription
|
|
|
|
|
+ data-success-action-button data-confirm-label="@Lang.Confirm"
|
|
|
|
|
+ data-play-label="@Lang.PlayNow" data-play-url="@Url.Action("Index", "Play")">
|
|
|
|
|
+ <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <span data-success-action-label>@Lang.Confirm</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="result-dialog-shell result-dialog-shell-fail scale-floor modal-panel" data-modal-panel="fail" data-scale-floor="361" data-scale-height="452" role="dialog" aria-modal="true" aria-label="@Lang.SubscriptionFailed">
|
|
|
|
|
+ <div class="result-dialog scale-floor-inner">
|
|
|
|
|
+ <img class="result-cat result-cat-fail" src="~/kitty/assets/kitty-fall/result-fail-cat.png" alt="">
|
|
|
|
|
+ <div class="result-card result-card-fail">
|
|
|
|
|
+ <div class="confirm-ribbon result-ribbon">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-ribbon.png" alt="">
|
|
|
|
|
+ <svg class="confirm-ribbon-title result-ribbon-title" viewBox="-20 0 360 75" aria-hidden="true">
|
|
|
|
|
+ <defs>
|
|
|
|
|
+ <path id="result-fail-title-path" d="M 20 55 Q 160 18 300 55" />
|
|
|
|
|
+ </defs>
|
|
|
|
|
+ <text font-size="30" font-weight="900" fill="#fff" text-anchor="middle" textLength="258" lengthAdjust="spacingAndGlyphs">
|
|
|
|
|
+ <textPath href="#result-fail-title-path" startOffset="50%">@Lang.SubscriptionFailed</textPath>
|
|
|
|
|
+ </text>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ <span class="sr-only">@Lang.SubscriptionFailed</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button class="confirm-close" type="button" data-close-subscription aria-label="@Lang.SubscriptionFailed">
|
|
|
|
|
+ <img src="~/kitty/assets/kitty-fall/confirm-close.png" alt="">
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <img class="result-status-icon result-status-fail" src="~/kitty/assets/kitty-fall/result-fail-icon.png" alt="">
|
|
|
|
|
+ <p class="result-title result-title-fail">@Lang.SubscriptionFailedTitle</p>
|
|
|
|
|
+ <p class="result-copy-fail" data-fallback-message="@Lang.SubscriptionFailedCopy @Lang.PleaseTryAgain">@Lang.SubscriptionFailedCopy<br>@Lang.PleaseTryAgain</p>
|
|
|
|
|
+
|
|
|
|
|
+ <button class="result-button result-button-fail confirm-button" type="button" data-close-subscription>
|
|
|
|
|
+ <span class="confirm-button-icon" aria-hidden="true"></span>
|
|
|
|
|
+ <span>@Lang.Confirm</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </div>
|
|
|
</main>
|
|
</main>
|
|
|
|
|
|
|
|
@section Scripts {
|
|
@section Scripts {
|
|
|
- <script>
|
|
|
|
|
- function logoutAndBack() {
|
|
|
|
|
- $.ajax({
|
|
|
|
|
- url: "/Login/LogoutBackAction",
|
|
|
|
|
- type: "POST",
|
|
|
|
|
- complete: function () {
|
|
|
|
|
- //window.location.href = "mytel://back";
|
|
|
|
|
- window.location.href = "Login/index";
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- </script>
|
|
|
|
|
|
|
+ <script>
|
|
|
|
|
+ function logoutAndBack() {
|
|
|
|
|
+ $.ajax({
|
|
|
|
|
+ url: "/Login/LogoutBackAction",
|
|
|
|
|
+ type: "POST",
|
|
|
|
|
+ complete: function () {
|
|
|
|
|
+ //window.location.href = "mytel://back";
|
|
|
|
|
+ window.location.href = "Login/index";
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ </script>
|
|
|
}
|
|
}
|