aboutsummaryrefslogtreecommitdiff
path: root/VPNAuth.Server/Pages
diff options
context:
space:
mode:
Diffstat (limited to 'VPNAuth.Server/Pages')
-rw-r--r--VPNAuth.Server/Pages/Auth.cshtml23
-rw-r--r--VPNAuth.Server/Pages/Dashboard.cshtml34
2 files changed, 35 insertions, 22 deletions
diff --git a/VPNAuth.Server/Pages/Auth.cshtml b/VPNAuth.Server/Pages/Auth.cshtml
index 9017445..a402236 100644
--- a/VPNAuth.Server/Pages/Auth.cshtml
+++ b/VPNAuth.Server/Pages/Auth.cshtml
@@ -10,30 +10,37 @@
<html>
<head>
<title>VPNAuth - Auth</title>
+ <link rel="stylesheet" href="/static/style.css">
</head>
-<body style="text-align: center;">
+<body>
<h1>Authorization</h1>
- <h2>VPNAuth</h2>
@if (Model.ValidRequest)
{
<div>
- <p>Do you want to log into <i>@Request.Query["client_id"]</i>?</p>
- <button onclick="window.location = '/accept-auth/@Model.RequestEntry?.Entity.Id'">Yes</button>
- <br/>
- <p>Requested Scopes:</p>
- <ul style="list-style-position: inside;">
+ <p>Do you want to log into <i>@Request.Query["client_id"]</i> as user <i>@Model.User?.Username</i>?</p>
+ <p>Requested scopes:</p>
+ <ul>
@foreach (var scope in Model.RequestEntry!.Entity.Scopes)
{
<li>@scope</li>
}
</ul>
+ <button class="button primary"
+ onclick="window.location = '/accept-auth/@Model.RequestEntry?.Entity.Id'">Yes
+ </button>
+ <button class="button error"
+ onclick="window.location = '@(Model.Config.FindApp(Request.Query["client_id"]!)!.RedirectUri
+ + "?error=access_denied")'">No</button>
<br/>
- <p>You are logged in as <i>@Model.User?.Username</i>.</p>
</div>
}
else
{
<b>Invalid request.</b>
}
+
+ <footer>
+ <p style="margin-top: 5em;"><a target="_blank" href="https://bytim.eu/projects/VPNAuth/">VPNAuth</a> by Tim</p>
+ </footer>
</body>
</html>
diff --git a/VPNAuth.Server/Pages/Dashboard.cshtml b/VPNAuth.Server/Pages/Dashboard.cshtml
index 78f6846..6648797 100644
--- a/VPNAuth.Server/Pages/Dashboard.cshtml
+++ b/VPNAuth.Server/Pages/Dashboard.cshtml
@@ -22,8 +22,9 @@
<html>
<head>
<title>VPNAuth - Dashboard</title>
+ <link rel="stylesheet" href="/static/style.css">
</head>
-<body style="text-align: center;">
+<body>
@if (configUser == null)
{
<p>No user detected</p>
@@ -31,16 +32,13 @@
else
{
<div>
- <h1>Dashboard</h1>
- <h2>VPNAuth</h2>
- <p>Hey, @configUser.Username!</p>
- <h3>User settings</h3>
+ <h1>User settings</h1>
<form hx-post="/user-info-settings" hx-swap="none" hx-trigger="change">
- <table style="margin-left: auto; margin-right: auto;">
+ <table>
<tbody>
<tr>
<th>Username</th>
- <th style="text-align: left; font-weight: normal;">@dbUser?.Sub</th>
+ <th class="normal">@dbUser?.Sub</th>
</tr>
<tr>
<th><label for="given-name">Given name</label></th>
@@ -67,18 +65,26 @@
<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>
- <h3>Your IPs</h3>
- <ul style="list-style-position: inside;">
- @foreach (var ip in configUser.Ips!)
- {
- <li>@ip</li>
- }
- </ul>
</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>