diff options
author | Tim <contact@bytim.eu> | 2025-04-26 20:13:30 +0200 |
---|---|---|
committer | Tim <contact@bytim.eu> | 2025-04-26 20:13:30 +0200 |
commit | bcb59cc65ea5ef96f40f8837753d2b322cc07362 (patch) | |
tree | 5faa76d92dac56b17edef16025ee8f055f1ad645 /VPNAuth.Server/Pages/Dashboard.cshtml | |
parent | c3b21591d9105e78012ca3f397b5c3df21735a58 (diff) | |
download | VPNAuth-bcb59cc65ea5ef96f40f8837753d2b322cc07362.tar.xz VPNAuth-bcb59cc65ea5ef96f40f8837753d2b322cc07362.zip |
Rename Dashboard to Settings
Diffstat (limited to 'VPNAuth.Server/Pages/Dashboard.cshtml')
-rw-r--r-- | VPNAuth.Server/Pages/Dashboard.cshtml | 90 |
1 files changed, 0 insertions, 90 deletions
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(); - } -} - -<!DOCTYPE html> - -<html> -<head> - <title>VPNAuth - Dashboard</title> - <link rel="stylesheet" href="/static/style.css"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> -</head> -<body> - @if (configUser == null) - { - <p>No user detected with IP <code>@Request.HttpContext.GetRemoteIpAddress()</code>.</p> - } - else - { - <div> - <h1>User settings</h1> - <form hx-post="/user-info-settings" hx-swap="none" hx-trigger="change"> - <table> - <tbody> - <tr> - <th>Username</th> - <th class="normal">@dbUser?.Sub</th> - </tr> - <tr> - <th><label for="given-name">Given name</label></th> - <th><input name="given-name" id="given-name" type="text" - value="@dbUser?.GivenName"/></th> - </tr> - <tr> - <th><label for="family-name">Family name</label></th> - <th><input name="family-name" id="family-name" type="text" - value="@dbUser?.FamilyName"/></th> - </tr> - <tr> - <th><label for="preferred-username">Preferred username</label></th> - <th><input name="preferred-username" id="preferred-username" type="text" - value="@dbUser?.PreferredUsername"/></th> - </tr> - <tr> - <th><label for="email">Email</label></th> - <th><input name="email" id="email" type="email" - value="@dbUser?.Email"/></th> - </tr> - <tr> - <th><label for="email">Picture URL</label></th> - <th><input name="picture" id="picture" type="url" - value="@dbUser?.Picture"/></th> - </tr> - <tr> - <th>IPs</th> - <th class="normal"> - <ul> - @foreach (var ip in configUser.Ips!) - { - <li>@ip</li> - } - </ul> - </th> - </tr> - </tbody> - </table> - </form> - </div> - } - - <footer> - <p style="margin-top: 5em;"><a target="_blank" href="https://bytim.eu/projects/VPNAuth/">VPNAuth</a> by Tim</p> - </footer> - <script src="/static/htmx.js"></script> -</body> -</html> |