Feat v0.2.5 ui polish dead code (#9)
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #9.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
//
|
||||
// templates/base.html — outer shell (banner + surface block + scripts)
|
||||
// templates/login.html — standalone login page
|
||||
// templates/components/*.html — reusable partials (model-select, team-select, chat-pane, etc.)
|
||||
// templates/surfaces/*.html — one per surface (chat, editor, notes, admin, etc.)
|
||||
// templates/components/*.html — reusable partials (model-select, team-select, etc.)
|
||||
// templates/surfaces/*.html — one per surface (admin, settings, team-admin, extension)
|
||||
package pages
|
||||
|
||||
import (
|
||||
@@ -46,12 +46,12 @@ type Engine struct {
|
||||
// registered in Go at startup. Extension surfaces will be registered from
|
||||
// manifest files (future).
|
||||
type SurfaceManifest struct {
|
||||
ID string `json:"id"` // unique identifier: "chat", "editor", "my-dashboard"
|
||||
Route string `json:"route"` // primary URL pattern: "/", "/editor/:wsId"
|
||||
AltRoutes []string `json:"alt_routes"` // additional URL patterns: ["/chat/:chatID"]
|
||||
Title string `json:"title"` // human-readable: "Chat", "Editor"
|
||||
Template string `json:"template"` // Go template name: "surface-chat", "surface-editor"
|
||||
Components []string `json:"components"` // component IDs used: ["chat-pane", "file-tree"]
|
||||
ID string `json:"id"` // unique identifier: "admin", "settings", "my-dashboard"
|
||||
Route string `json:"route"` // primary URL pattern: "/", "/admin"
|
||||
AltRoutes []string `json:"alt_routes"` // additional URL patterns
|
||||
Title string `json:"title"` // human-readable: "Admin", "Settings"
|
||||
Template string `json:"template"` // Go template name: "surface-admin", "surface-extension"
|
||||
Components []string `json:"components"` // component IDs used: ["file-tree"]
|
||||
DataRequires []string `json:"data_requires"` // data loader keys: ["workspace", "models"]
|
||||
Scripts []string `json:"scripts"` // JS files (surface-specific, beyond base.html common)
|
||||
Styles []string `json:"styles"` // CSS files (surface-specific)
|
||||
@@ -244,6 +244,11 @@ func (e *Engine) registerCoreSurfaces() {
|
||||
Title: "Workflow Landing", Template: "workflow-landing", Auth: "public",
|
||||
Layout: "single", Source: "core",
|
||||
},
|
||||
{
|
||||
ID: "welcome", Route: "/welcome",
|
||||
Title: "Welcome", Template: "surface-welcome", Auth: "authenticated",
|
||||
Layout: "single", Source: "core",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +438,7 @@ func (e *Engine) RenderExtensionSurface() gin.HandlerFunc {
|
||||
// PageRouteMiddleware holds middleware handlers for each auth level.
|
||||
// Passed to RegisterPageRoutes by main.go.
|
||||
type PageRouteMiddleware struct {
|
||||
Authenticated gin.HandlerFunc // AuthOrRedirect — for chat, editor, notes, settings
|
||||
Authenticated gin.HandlerFunc // AuthOrRedirect — for authenticated surfaces
|
||||
Admin []gin.HandlerFunc // AuthOrRedirect + RequireAdminPage
|
||||
Session gin.HandlerFunc // AuthOrSession — for workflow
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user