add refresh=1 option

This commit is contained in:
Jake Visser 2017-07-05 17:20:07 -07:00
commit 6a0633e5a8
2 changed files with 15 additions and 2 deletions

View file

@ -8,9 +8,10 @@ namespace qcbadge.Controllers
{
public class HomeController : Controller
{
public IActionResult Index(string s, string id)
public IActionResult Index(string s, string id, int refresh)
{
Helpers.Sql sql = new Helpers.Sql();
ViewData["refresh"] = refresh;
if ((String.Compare(Startup.scode, s, true) == 0))
{

View file

@ -1,10 +1,22 @@
<!DOCTYPE html>
@{
bool refresh = Convert.ToBoolean(ViewData["refresh"]);
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>QC Badge - @ViewData["Title"]</title>
<link rel="stylesheet" type="text/css" href="~/css/site.css">
@if (refresh)
{
<meta http-equiv="refresh" content="30" />
}
</head>
<body>