From bcb59cc65ea5ef96f40f8837753d2b322cc07362 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 26 Apr 2025 20:13:30 +0200 Subject: Rename Dashboard to Settings --- VPNAuth.Server/Pages/Settings.cshtml | 90 ++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 VPNAuth.Server/Pages/Settings.cshtml (limited to 'VPNAuth.Server/Pages/Settings.cshtml') diff --git a/VPNAuth.Server/Pages/Settings.cshtml b/VPNAuth.Server/Pages/Settings.cshtml new file mode 100644 index 0000000..c706e98 --- /dev/null +++ b/VPNAuth.Server/Pages/Settings.cshtml @@ -0,0 +1,90 @@ +@page "/" +@using VPNAuth.Server +@using VPNAuth.Server.Database + +@{ + Layout = null; + + ConfigUser? configUser = Request.HttpContext.GetUser(); + + UserInformation? dbUser = null; + + if (configUser != null) + { + using var db = new Database(); + dbUser = db.UserInformation.Where(user => user.Sub == configUser!.Username).ToList().FirstOrDefault(); + } +} + + + + + + VPNAuth - Settings + + + + + @if (configUser == null) + { +

No user detected with IP @Request.HttpContext.GetRemoteIpAddress().

+ } + else + { +
+

Settings

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Username@dbUser?.Sub
IPs +
    + @foreach (var ip in configUser.Ips!) + { +
  • @ip
  • + } +
+
+
+
+ } + + + + + -- cgit v1.2.3