Changeset 0.37.7 (#219)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -119,11 +119,17 @@ type SettingsPageData struct {
|
||||
|
||||
// ── Loader registration ──────────────────────
|
||||
|
||||
// TeamAdminPageData is what the team-admin surface receives.
|
||||
type TeamAdminPageData struct {
|
||||
Section string `json:"section"`
|
||||
}
|
||||
|
||||
func (e *Engine) registerLoaders() {
|
||||
e.RegisterLoader("admin", e.adminLoader)
|
||||
e.RegisterLoader("chat", e.chatLoader)
|
||||
e.RegisterLoader("notes", e.notesLoader)
|
||||
e.RegisterLoader("notes", e.notesLoader)
|
||||
e.RegisterLoader("settings", e.settingsLoader)
|
||||
e.RegisterLoader("team-admin", e.teamAdminLoader)
|
||||
}
|
||||
|
||||
// ListDataProviders returns the keys of all registered data providers.
|
||||
@@ -396,6 +402,14 @@ func (e *Engine) notesLoader(c *gin.Context, s store.Stores) (any, error) {
|
||||
// v0.22.7: Reads feature gates from GlobalConfig to control
|
||||
// which nav links/tabs are visible (BYOK, User Personas).
|
||||
|
||||
func (e *Engine) teamAdminLoader(c *gin.Context, s store.Stores) (any, error) {
|
||||
section := c.Param("section")
|
||||
if section == "" {
|
||||
section = "members"
|
||||
}
|
||||
return &TeamAdminPageData{Section: section}, nil
|
||||
}
|
||||
|
||||
func (e *Engine) settingsLoader(c *gin.Context, s store.Stores) (any, error) {
|
||||
section := c.Param("section")
|
||||
if section == "" {
|
||||
|
||||
Reference in New Issue
Block a user