2023-05-20 20:15:57 +02:00
|
|
|
// Copyright 2023 wanderer <a_mirre at utb dot cz>
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-04-13 00:07:08 +02:00
|
|
|
package handlers
|
|
|
|
|
2023-05-06 00:03:41 +02:00
|
|
|
import moduser "git.dotya.ml/mirre-mt/pcmt/modules/user"
|
|
|
|
|
2023-04-13 00:07:08 +02:00
|
|
|
type page struct {
|
2023-05-06 00:03:41 +02:00
|
|
|
User moduser.User
|
2023-04-21 12:33:14 +02:00
|
|
|
AppName string
|
|
|
|
AppVer string
|
|
|
|
Title string
|
|
|
|
Name string
|
|
|
|
CSRF string
|
|
|
|
DevelMode bool
|
|
|
|
Current string
|
|
|
|
Error string
|
|
|
|
Status string
|
|
|
|
StatusText string
|
2023-05-22 03:22:58 +02:00
|
|
|
Data map[string]any
|
2023-04-13 00:07:08 +02:00
|
|
|
}
|
2023-08-15 18:33:48 +02:00
|
|
|
|
|
|
|
func newPage() *page {
|
2023-08-16 15:07:10 +02:00
|
|
|
data := make(map[string]any, 0)
|
|
|
|
|
|
|
|
data["RegistrationAllowed"] = registrationAllowed
|
|
|
|
|
2023-08-15 18:33:48 +02:00
|
|
|
p := &page{
|
|
|
|
AppName: appName,
|
|
|
|
AppVer: appver,
|
|
|
|
DevelMode: appIsDevel,
|
2023-08-16 15:07:10 +02:00
|
|
|
Data: data,
|
2023-08-15 18:33:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|