tulip/pages/index.go.html

61 lines
1.8 KiB
HTML
Raw Permalink Normal View History

2023-09-06 22:20:09 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{.ServiceName}}</title>
2023-12-17 16:03:13 +00:00
<link rel="stylesheet" href="/theme/style.css">
2023-09-06 22:20:09 +01:00
</head>
<body>
<header>
<h1>{{.ServiceName}}</h1>
2023-09-06 22:20:09 +01:00
</header>
<main>
2024-05-13 20:25:44 +01:00
<div>Logged in as: {{.User.Name}} ({{.User.Subject}})</div>
2023-09-06 22:20:09 +01:00
<div>
<form method="GET" action="/edit">
<button type="submit">Edit Profile</button>
</form>
</div>
<div>
<form method="GET" action="/edit/password">
<button type="submit">Change Password</button>
</form>
</div>
<div>
<form method="GET" action="/manage/apps">
<button type="submit">Manage Applications</button>
</form>
</div>
{{if .IsAdmin}}
<div>
<form method="GET" action="/manage/users">
<button type="submit">Manage Users</button>
</form>
</div>
{{end}}
2023-11-25 15:08:44 +00:00
{{if .OtpEnabled}}
<div>
<form method="POST" action="/edit/otp">
<input type="hidden" name="remove" value="1"/>
<button type="submit">Remove OTP</button>
</form>
</div>
{{else}}
<div>
<form method="POST" action="/edit/otp">
<label><input type="radio" name="digits" value="6"/> 6 digits</label>
<label><input type="radio" name="digits" value="7"/> 7 digits</label>
<label><input type="radio" name="digits" value="8"/> 8 digits</label>
<button type="submit">Change OTP</button>
</form>
</div>
{{end}}
<div>
<form method="POST" action="/logout">
<input type="hidden" name="nonce" value="{{.Nonce}}">
2023-09-06 22:20:09 +01:00
<button type="submit">Log Out</button>
</form>
</div>
</main>
</body>
</html>