Compare commits
2 Commits
609ccfc0c4
...
b9d1d1c1e1
| Author | SHA1 | Date |
|---|---|---|
|
|
b9d1d1c1e1 | |
|
|
2291a338e6 |
|
|
@ -41,7 +41,10 @@ func (p *AccountProps) Validate() (valid bool) {
|
||||||
|
|
||||||
func NewAccountProps(username string, passwordFromAdmin bool, passwordVal, confirmPassVal string) *AccountProps {
|
func NewAccountProps(username string, passwordFromAdmin bool, passwordVal, confirmPassVal string) *AccountProps {
|
||||||
return &AccountProps{
|
return &AccountProps{
|
||||||
Navbar: templates.UserNavCollapse(username, false),
|
Navbar: templates.NavCollapse{
|
||||||
|
Links: []templates.Link{{Href: "/", Name: "Home"}},
|
||||||
|
User: &templates.User{Name: username},
|
||||||
|
},
|
||||||
PasswordFromAdmin: passwordFromAdmin,
|
PasswordFromAdmin: passwordFromAdmin,
|
||||||
Password: templates.InputProps{
|
Password: templates.InputProps{
|
||||||
Type: "password",
|
Type: "password",
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
<button class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
Logged in as '{{.Name}}'
|
Logged in as '{{.Name}}'{{if and $.AccountLink $.AccountLink.Alert}} <span class="badge text-bg-danger">!</span>{{end}}
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
{{with $.AccountLink}}
|
{{with $.AccountLink}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue