userpage: initial page

login, lang, and theme work. Currently only makes a request to a
hello-world type endpoint to verify auth works. Accessible at
/my/account.
This commit is contained in:
Harvey Tindall
2023-06-16 14:43:37 +01:00
parent 54fde33a20
commit 726acb9c29
13 changed files with 225 additions and 55 deletions

View File

@@ -38,9 +38,9 @@ type adminLang struct {
JSON string
}
type formLangs map[string]formLang
type userLangs map[string]userLang
func (ls *formLangs) getOptions() [][2]string {
func (ls *userLangs) getOptions() [][2]string {
opts := make([][2]string, len(*ls))
i := 0
for key, lang := range *ls {
@@ -50,7 +50,7 @@ func (ls *formLangs) getOptions() [][2]string {
return opts
}
type formLang struct {
type userLang struct {
Meta langMeta `json:"meta"`
Strings langSection `json:"strings"`
Notifications langSection `json:"notifications"`