Documentation
¶
Overview ¶
Package workspace provides the per-site workspace UI (config-driven SPA).
Index ¶
- func RegisterSPARoutes(router *gin.Engine, siteRouter *knet.SiteRouter)
- func SPAFS() fs.FS
- func StaticHandler() http.Handler
- type Handler
- func (h *Handler) HandleConfigView(c *gin.Context)
- func (h *Handler) HandleEditForm(c *gin.Context)
- func (h *Handler) HandleHome(c *gin.Context)
- func (h *Handler) HandleListView(c *gin.Context)
- func (h *Handler) HandleLoginPage(c *gin.Context)
- func (h *Handler) HandleNewForm(c *gin.Context)
- func (h *Handler) RegisterRoutes(router *gin.Engine)
- func (h *Handler) RegisterRoutesOnGroup(desk *gin.RouterGroup)
- type PageData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSPARoutes ¶
func RegisterSPARoutes(router *gin.Engine, siteRouter *knet.SiteRouter)
RegisterSPARoutes serves the SPA at /workspace, /assets, and /s/:site/*. Uses a single NoRoute handler to avoid conflicts.
func StaticHandler ¶
StaticHandler returns a handler that serves the embedded templates for HTMX partials.
Types ¶
type Handler ¶
Handler holds dependencies for the workspace UI.
func NewHandler ¶
NewHandler creates a new workspace UI handler.
func (*Handler) HandleConfigView ¶
HandleConfigView renders the config manager page.
func (*Handler) HandleEditForm ¶
HandleEditForm renders the edit document form.
func (*Handler) HandleHome ¶
HandleHome renders the admin home page.
func (*Handler) HandleListView ¶
HandleListView renders the document list view for a DocType.
func (*Handler) HandleLoginPage ¶
HandleLoginPage renders the login form.
func (*Handler) HandleNewForm ¶
HandleNewForm renders the new document form.
func (*Handler) RegisterRoutes ¶
RegisterRoutes registers the admin UI routes on the full engine.
func (*Handler) RegisterRoutesOnGroup ¶
func (h *Handler) RegisterRoutesOnGroup(desk *gin.RouterGroup)
RegisterRoutesOnGroup registers admin UI routes on an existing RouterGroup.