Added UI for mfa and other profile settings
This commit is contained in:
@@ -33,6 +33,10 @@ var projects = template.Must(template.ParseFiles(
|
||||
"frontend/htmx/contents/dash/base.html",
|
||||
"frontend/htmx/contents/dash/projects.html"))
|
||||
|
||||
var accountSettings = template.Must(template.ParseFiles(
|
||||
"frontend/htmx/contents/dash/base.html",
|
||||
"frontend/htmx/contents/dash/account_settings.html"))
|
||||
|
||||
var home = template.Must(template.ParseFiles("frontend/htmx/home.html"))
|
||||
|
||||
func Home(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -51,7 +55,6 @@ func Home(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func Dashboard(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
|
||||
@@ -142,6 +145,17 @@ func Projects(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
func AccountSettings(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
err := accountSettings.ExecuteTemplate(w, "base.html", struct {
|
||||
Title string
|
||||
}{
|
||||
Title: "Account Settings",
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var minifier *minify.M
|
||||
|
||||
@@ -151,7 +165,6 @@ func init() {
|
||||
minifier.AddFunc("text/css", css.Minify)
|
||||
minifier.AddFunc("text/javascript", js.Minify)
|
||||
}
|
||||
|
||||
func Assets(w http.ResponseWriter, r *http.Request) {
|
||||
path := strings.TrimPrefix(r.URL.Path, "/assets/")
|
||||
fullPath := filepath.Join("frontend/assets", path)
|
||||
|
||||
Reference in New Issue
Block a user