Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-24 15:38:01 +02:00
parent c414f5861d
commit 65d63bc49d
2 changed files with 11 additions and 1 deletions

View file

@ -130,11 +130,15 @@ type PasswdTplData struct {
NoMatchError bool
Success bool
CanAdmin bool
Login bool
}
func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
templateFoundPasswordPage := getTemplate("passwd.html")
data := PasswdTplData{}
data := PasswdTplData{
CanAdmin: false,
Login: false,
}
code := mux.Vars(r)["code"]
// code = strings.TrimSpace(strings.Join([]string{code}, ""))
newCode, _ := b64.URLEncoding.DecodeString(code)
@ -193,6 +197,8 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
Status: login,
ErrorMessage: "",
Success: false,
CanAdmin: false,
Login: false,
}
if r.Method == "POST" {

View file

@ -58,6 +58,10 @@ div.card-header {
writing-mode: vertical-lr;
}
body.darkmode div.card-header {
color: var(--color-text-inverted);
}
@media (max-width: 700px) {
div.card {
flex-direction: column;