|
|
|
@ -22,6 +22,14 @@ func (app *appContext) AdminPage(gc *gin.Context) {
|
|
|
|
|
emailEnabled, _ := app.config.Section("invite_emails").Key("enabled").Bool()
|
|
|
|
|
notificationsEnabled, _ := app.config.Section("notifications").Key("enabled").Bool()
|
|
|
|
|
ombiEnabled := app.config.Section("ombi").Key("enabled").MustBool(false)
|
|
|
|
|
if pusher := gc.Writer.Pusher(); pusher != nil {
|
|
|
|
|
toPush := []string{"/js/admin.js", "/js/theme.js", "/js/lang.js", "/js/modal.js", "/js/tabs.js", "/js/invites.js", "/js/accounts.js", "/js/settings.js", "/js/profiles.js", "/js/common.js"}
|
|
|
|
|
for _, f := range toPush {
|
|
|
|
|
if err := pusher.Push(f, nil); err != nil {
|
|
|
|
|
app.debug.Printf("Failed HTTP2 ServerPush of \"%s\": %+v", f, err)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gcHTML(gc, http.StatusOK, "admin.html", gin.H{
|
|
|
|
|
"urlBase": app.URLBase,
|
|
|
|
|
"cssClass": app.cssClass,
|
|
|
|
|