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/Dashboard.cshtml | 90 ----------------------------------- VPNAuth.Server/Pages/Settings.cshtml | 90 +++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 90 deletions(-) delete mode 100644 VPNAuth.Server/Pages/Dashboard.cshtml create mode 100644 VPNAuth.Server/Pages/Settings.cshtml (limited to 'VPNAuth.Server') diff --git a/VPNAuth.Server/Pages/Dashboard.cshtml b/VPNAuth.Server/Pages/Dashboard.cshtml deleted file mode 100644 index 68caf8e..0000000 --- a/VPNAuth.Server/Pages/Dashboard.cshtml +++ /dev/null @@ -1,90 +0,0 @@ -@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 - Dashboard - - - - - @if (configUser == null) - { -

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

- } - else - { -
-

User settings

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Username@dbUser?.Sub
IPs -
    - @foreach (var ip in configUser.Ips!) - { -
  • @ip
  • - } -
-
-
-
- } - - - - - 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