build: Update library assets with UI visibility fix
- Rebuild JavaScript library with delayed control panel initialization - Update server assets to include latest UI behavior changes - Ensure built assets reflect invisible UI for regular visitors The control panel now only appears after gate activation, maintaining the invisible CMS principle for end users.
This commit is contained in:
@@ -7,17 +7,36 @@ import (
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
// AuthProvider represents authentication provider information
|
||||
type AuthProvider struct {
|
||||
Type string // "mock", "jwt", "authentik"
|
||||
}
|
||||
|
||||
// ContentEngine is the unified content processing engine
|
||||
type ContentEngine struct {
|
||||
idGenerator *IDGenerator
|
||||
client ContentClient
|
||||
idGenerator *IDGenerator
|
||||
client ContentClient
|
||||
authProvider *AuthProvider
|
||||
}
|
||||
|
||||
// NewContentEngine creates a new content processing engine
|
||||
func NewContentEngine(client ContentClient) *ContentEngine {
|
||||
return &ContentEngine{
|
||||
idGenerator: NewIDGenerator(),
|
||||
client: client,
|
||||
idGenerator: NewIDGenerator(),
|
||||
client: client,
|
||||
authProvider: &AuthProvider{Type: "mock"}, // default
|
||||
}
|
||||
}
|
||||
|
||||
// NewContentEngineWithAuth creates a new content processing engine with auth config
|
||||
func NewContentEngineWithAuth(client ContentClient, authProvider *AuthProvider) *ContentEngine {
|
||||
if authProvider == nil {
|
||||
authProvider = &AuthProvider{Type: "mock"}
|
||||
}
|
||||
return &ContentEngine{
|
||||
idGenerator: NewIDGenerator(),
|
||||
client: client,
|
||||
authProvider: authProvider,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +96,7 @@ func (e *ContentEngine) ProcessContent(input ContentInput) (*ContentResult, erro
|
||||
|
||||
// 5. Inject editor assets for enhancement mode (development)
|
||||
if input.Mode == Enhancement {
|
||||
injector := NewInjector(e.client, input.SiteID)
|
||||
injector := NewInjectorWithAuth(e.client, input.SiteID, e.authProvider)
|
||||
injector.InjectEditorAssets(doc, true, "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user