schema migration and account fixes
very close to rolling this out! just need to address some security concerns first
This commit is contained in:
parent
5566a795da
commit
570cdf6ce2
20 changed files with 641 additions and 392 deletions
|
@ -65,26 +65,23 @@ button:active {
|
|||
background: #d0d0d0;
|
||||
border-color: #808080;
|
||||
}
|
||||
|
||||
#error {
|
||||
background: #ffa9b8;
|
||||
border: 1px solid #dc5959;
|
||||
padding: 1em;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<main>
|
||||
{{if .Success}}
|
||||
|
||||
<meta http-equiv="refresh" content="5;url=/admin/" />
|
||||
<p>
|
||||
{{.Message}}
|
||||
You should be redirected to <a href="/admin">/admin</a> in 5 seconds.
|
||||
</p>
|
||||
|
||||
{{else}}
|
||||
|
||||
{{if .Message}}
|
||||
<p id="error">{{.Message}}</p>
|
||||
{{end}}
|
||||
|
||||
<form action="/admin/create-account" method="POST" id="create-account">
|
||||
<form action="/admin/register" method="POST" id="create-account">
|
||||
<div>
|
||||
<label for="username">Username</label>
|
||||
<input type="text" name="username" value="">
|
||||
|
@ -101,7 +98,5 @@ button:active {
|
|||
|
||||
<button type="submit" class="new">Create Account</button>
|
||||
</form>
|
||||
|
||||
{{end}}
|
||||
</main>
|
||||
{{end}}
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
<div class="nav-item">
|
||||
<a href="/admin/logout" id="logout">logged in as {{.Account.Username}}. log out</a>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="nav-item">
|
||||
<a href="/admin/register" id="register">create account</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</nav>
|
||||
</header>
|
||||
|
|
|
@ -43,6 +43,10 @@ input {
|
|||
font-family: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
input[disabled] {
|
||||
opacity: .5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: .5em .8em;
|
||||
|
@ -89,7 +93,7 @@ button:active {
|
|||
<input type="password" name="password" value="">
|
||||
|
||||
<label for="totp">TOTP</label>
|
||||
<input type="text" name="totp" value="">
|
||||
<input type="text" name="totp" value="" disabled>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="save">Login</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue