Documentation
¶
Index ¶
Constants ¶
Variables ¶
View Source
var (
)
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct {
Element
// AppName appears in the header (left side, near UserBlock).
AppName string
// UserBlock slot — usually an avatar/name/logout link. Optional.
UserBlock Component
// Modules registered in order — appearance order in the nav rail.
Modules []UIModule
// CanView filters which modules the shell presents. nil = show all.
CanView func(resource string) bool
// DefaultID is the ModelName() of the module to show initially.
// If empty, the first module is used.
DefaultID string
// contains filtered or unexported fields
}
Platform is the typed skeleton root.
func (*Platform) Activate ¶
Activate programmatically switches to a module by ID (also updates window.location.hash on wasm builds).
func (*Platform) Init ¶ added in v0.0.6
func (p *Platform) Init(ctx Ctx)
Init initializes the platform state and routing.
func (*Platform) Notify ¶
Notify queues a typed notification in the proper viewport slot. Any non-zero durationMs → schedule dismissal; duration 0 → persistent message.
type UIModule ¶ added in v0.0.7
type UIModule interface {
layout.Module // identity: ModelName() → used as ID
Label() string // text in the nav rail
Icon() svg.Icon // chassis renders via the sprite
View() Component // module content (often a *rightpanel.RightPanel)
}
UIModule is a module that provides its UI to the platform chassis. The chassis takes id/hash/route from ModelName() and the rest of the presentation from these methods.
Click to show internal directories.
Click to hide internal directories.