go-urlsh/views/account.tmpl

83 lines
2.6 KiB
Cheetah
Raw Normal View History

2023-06-16 14:30:27 +02:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Account - go-urlsh</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel="stylesheet" href="/admin/pico.min.css">
2024-05-09 14:00:52 +02:00
<link rel="stylesheet" href="/admin/pico.colors.min.css">
2023-06-16 14:30:27 +02:00
<link rel="stylesheet" href="/admin/custom.css">
<script src="/admin/main.js" defer></script>
<style>
h1,
h2,
h3,
h4,
h5,
h6 {
margin-bottom: 30px;
2024-05-04 17:06:01 +02:00
}
2024-05-04 17:06:01 +02:00
a[role=button] {
width: fit-content;
}
2023-06-16 14:30:27 +02:00
</style>
</head>
<body>
<nav class="container-fluid">
<ul>
<li>
<a href="/admin/" class="contrast"><strong>go-urlsh</strong></a>
</li>
</ul>
<ul>
<li>
<a href="/admin/">Links</a>
</li>
<li>
<a href="/admin/apikeys/">API Keys</a>
</li>
<li>
<a href="javascript: void(0)">Users (coming soon)</a>
2023-06-16 14:30:27 +02:00
</li>
<li>
<a href="javascript: Logout()" style="color: red;">Logout</a>
</li>
</ul>
</nav>
<main class="container" style="padding: 0">
<h1>Account</h1>
<h2>User Details</h2>
<p>Username: {{ .UserName }}</p>
<p>Created at: {{ .Created }}</p>
<h2>Security</h2>
{{if .MFAEnabled}}
<a href="#" onclick="HandleMFARemovalRequest()" role="button">disable Two-Factor Authentication</a>
{{else}}
<a href="/admin/account/setup-multifactor" role="button">Setup Two-Factor Authentication</a>
{{end}}
<dialog id="mfa-disable-dialog" style="flex-direction: column;">
<h2 id="dialog-heading">⚠️ Are you sure you want to disable two-factor authentication?</h2>
<p id="dialog-text">Two-factor authentication adds an additional layer of security to your account by requiring
more than just a password to sign in.<br />If you need to change your configuration, you can delete and re-add
Two-Factor authentication again.<br /><br />Do you really want to remove your Two-Factor authentication?</p>
<div class="container grid">
<!-- change those two buttons and rework the functions to close and initiate deletion-->
<button id="button-keep" class="pico-background-green-450" onclick="HandleModalClose('mfa-disable-dialog')">No, keep Two-Factor authentication</button>
<button id="button-delete" class="pico-color-red-450 pico-background-red-450" onclick="HandleMFARemoval()">Yes,
remove Two-Factor authentication</button>
</div>
2023-06-16 14:30:27 +02:00
</dialog>
</main>
{{template "partials/footer" .}}
</body>
</html>