Auto refresh if link process is active

This commit is contained in:
Laura Hausmann 2023-02-10 18:09:18 +01:00
parent f74d854a17
commit d410e35bab
Signed by: zotan
GPG key ID: D044E84C5BE01605
3 changed files with 8 additions and 2 deletions

View file

@ -15,6 +15,12 @@
var linkActive = !string.IsNullOrWhiteSpace(linkFlag?.Value) && linkFlag.Value == user.Id.ToString() && !string.IsNullOrWhiteSpace(lTimeFlag?.Value) && DateTime.UtcNow - DateTime.Parse(lTimeFlag.Value) < TimeSpan.FromMinutes(5);
}
@if (linkActive) {
@section Header {
<meta http-equiv="refresh" content="5"/>
}
}
<div class="text-center">
<h1 class="display-5">
Edit User

View file

@ -6,7 +6,7 @@
var db = new Database.DbConn();
}
@section Stylesheets {
@section Header {
<link rel="stylesheet" href="~/lib/datatables/dataTables.bootstrap5.min.css"/>
}

View file

@ -7,7 +7,7 @@
<title>@ViewData["Title"] - AfRApay.Web</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css"/>
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true"/>
@await RenderSectionAsync("Stylesheets", false)
@await RenderSectionAsync("Header", false)
</head>
<body class="d-flex flex-column min-vh-100">
<header>