Update Chorus branding and configuration UI improvements
- Updated branding transformation documentation - Enhanced config UI layout and styling with Tailwind config updates - Modified web embed integration for improved component packaging - Added Next.js build artifacts to .gitignore for cleaner repository 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,19 +2,19 @@ package web
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Static files embedded at build time
|
||||
//go:embed static/*
|
||||
//go:embed *
|
||||
var staticFiles embed.FS
|
||||
|
||||
// GetWebUIHandler returns HTTP handler for embedded web UI
|
||||
func GetWebUIHandler() http.Handler {
|
||||
// Try to get the static subdirectory
|
||||
staticFS, err := fs.Sub(staticFiles, "static")
|
||||
// Use the embedded files directly (no static subdirectory)
|
||||
staticFS := staticFiles
|
||||
_, err := staticFiles.ReadFile("index.html")
|
||||
if err != nil {
|
||||
// Fallback to empty filesystem if no static files
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -43,7 +43,7 @@ func IsEmbeddedFileAvailable(path string) bool {
|
||||
if path == "" {
|
||||
path = "index.html"
|
||||
}
|
||||
_, err := staticFiles.ReadFile("static/" + path)
|
||||
_, err := staticFiles.ReadFile(path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func ServeEmbeddedFile(w http.ResponseWriter, r *http.Request, path string) {
|
||||
path = "index.html"
|
||||
}
|
||||
|
||||
content, err := staticFiles.ReadFile("static/" + path)
|
||||
content, err := staticFiles.ReadFile(path)
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user