Commit 6ec20ba3 authored by Clint.Network's avatar Clint.Network

Add Participated Modal

parent 4b35f4ce
......@@ -157,7 +157,17 @@ namespace Stratis.Guru.Controllers
_settings.IncrementIterator();
_participation.StoreParticipation(HttpContext.Session.GetString("Ticket"), nickname, address, double.Parse(HttpContext.Session.GetString("DepositedAmount")));
return RedirectToAction("Lottery");
return RedirectToAction("Participated");
}
[Route("lottery/participated")]
public IActionResult Participated()
{
ViewBag.NextDraw = long.Parse(_memoryCache.Get("NextDraw").ToString());
ViewBag.Jackpot = _memoryCache.Get("Jackpot");
ViewBag.Players = _participation.GetPlayers(_draws.GetLastDraw());
ViewBag.Participated = true;
return View("Lottery");
}
[Route("about")]
......
......@@ -122,6 +122,23 @@
</div>
</div>
</div>
<div class="modal fade" id="participated-modal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><i class="fa fa-check"></i> Participation Confirmed</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body text-center py-4">
<h2 class="text-dark mb-1">Thank You !</h2>
<p>Thank you for your participation and wish you good luck!.</p>
<img class="mt-3" src="~/images/check.png" style="width: 250px;" />
</div>
</div>
</div>
</div>
<div class="shadow-inset"></div>
<section class="welcome-area pb-4" id="welcome-1">
<div class="header-token">
......@@ -170,6 +187,10 @@
{
<text>$("#deposit-modal").modal({backdrop: 'static', keyboard: false});</text>
}
@if(ViewBag.Participated == true)
{
<text>$("#participated-modal").modal("show"); setTimeout(function() {$("#participated-modal").modal("hide");}, 5000);</text>
}
var nextYear = moment.tz("@((DateTimeOffset.FromUnixTimeSeconds((long)ViewBag.NextDraw)).ToString("yyyy-MM-dd 20:00"))", "Europe/London");
$('#clock').countdown(nextYear.toDate(), function(event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment