Feat v0.6.1-v0.6.2: backup/restore, docs surface, dynamic OpenAPI
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 20s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-sqlite (pull_request) Has been cancelled
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-go-pg (pull_request) Has been cancelled
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 20s
CI/CD / test-frontend (pull_request) Successful in 6s
CI/CD / test-sqlite (pull_request) Has been cancelled
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-go-pg (pull_request) Has been cancelled
v0.6.1 — Backup tooling (.swb ZIP export/import), admin backup section, docs surface with markdown rendering, 5 reference docs, 6 handler tests. v0.6.2 — Dark mode contrast fixes, topbar nav, 📖 docs icon, dynamic OpenAPI spec with extension route merging, docs outline sidebar, scroll/routing fixes; 7 new tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ func sectionCategory(section string) string {
|
||||
return "people"
|
||||
case "workflows":
|
||||
return "workflows"
|
||||
case "settings", "storage", "packages", "broadcast":
|
||||
case "settings", "storage", "packages", "broadcast", "backup":
|
||||
return "system"
|
||||
case "usage", "audit", "stats":
|
||||
return "monitoring"
|
||||
|
||||
@@ -249,6 +249,11 @@ func (e *Engine) registerCoreSurfaces() {
|
||||
Title: "Welcome", Template: "surface-welcome", Auth: "authenticated",
|
||||
Layout: "single", Source: "core",
|
||||
},
|
||||
{
|
||||
ID: "docs", Route: "/docs/:section", AltRoutes: []string{"/docs"},
|
||||
Title: "Docs", Template: "surface-docs", Auth: "authenticated",
|
||||
Layout: "single", Source: "core",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +366,9 @@ func (e *Engine) RenderSurface(surfaceID string) gin.HandlerFunc {
|
||||
if section == "" && surfaceID == "team-admin" {
|
||||
section = "members"
|
||||
}
|
||||
if section == "" && surfaceID == "docs" {
|
||||
section = "GETTING-STARTED"
|
||||
}
|
||||
|
||||
e.Render(c, "base.html", PageData{
|
||||
Surface: surfaceID,
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
{{else if eq .Surface "team-admin"}}{{template "surface-team-admin" .}}
|
||||
{{else if eq .Surface "settings"}}{{template "surface-settings" .}}
|
||||
{{else if eq .Surface "welcome"}}{{template "surface-welcome" .}}
|
||||
{{else if eq .Surface "docs"}}{{template "surface-docs" .}}
|
||||
{{else if and .Manifest (eq .Manifest.Source "extension")}}{{template "surface-extension" .}}
|
||||
{{else}}<div style="padding:20px">Unknown surface: {{.Surface}}</div>
|
||||
{{end}}
|
||||
@@ -124,6 +125,7 @@
|
||||
{{if eq .Surface "team-admin"}}{{template "scripts-team-admin" .}}{{end}}
|
||||
{{if eq .Surface "settings"}}{{template "scripts-settings" .}}{{end}}
|
||||
{{if eq .Surface "welcome"}}{{template "scripts-welcome" .}}{{end}}
|
||||
{{if eq .Surface "docs"}}{{template "scripts-docs" .}}{{end}}
|
||||
{{/* v0.27.0: Extension surface JS — load Preact globals, boot SDK, then extension */}}
|
||||
{{if and .Manifest (eq .Manifest.Source "extension")}}
|
||||
<script type="module" nonce="{{.CSPNonce}}">
|
||||
|
||||
35
server/pages/templates/surfaces/docs.html
Normal file
35
server/pages/templates/surfaces/docs.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{{/*
|
||||
Docs surface — v0.6.1
|
||||
Renders markdown documentation with sidebar navigation.
|
||||
*/}}
|
||||
|
||||
{{define "surface-docs"}}
|
||||
<div id="docs-mount" class="surface-docs">
|
||||
<div style="padding:40px;text-align:center;color:var(--text-3);">Loading docs…</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{define "css-docs"}}{{end}}
|
||||
|
||||
{{define "scripts-docs"}}
|
||||
<script nonce="{{.CSPNonce}}">
|
||||
window.__SECTION__ = '{{.Section}}';
|
||||
</script>
|
||||
|
||||
<script type="module" nonce="{{.CSPNonce}}">
|
||||
const { h, render } = await import('{{.BasePath}}/js/sw/vendor/preact.module.js');
|
||||
const hooksModule = await import('{{.BasePath}}/js/sw/vendor/hooks.module.js');
|
||||
const { default: htm } = await import('{{.BasePath}}/js/sw/vendor/htm.module.js');
|
||||
const html = htm.bind(h);
|
||||
window.preact = window.preact || { h, render };
|
||||
window.hooks = window.hooks || hooksModule;
|
||||
window.html = window.html || html;
|
||||
|
||||
// Boot SDK (idempotent)
|
||||
const { boot } = await import('{{.BasePath}}/js/sw/sdk/index.js?v={{.Version}}');
|
||||
await boot();
|
||||
|
||||
// Mount docs surface
|
||||
await import('{{.BasePath}}/js/sw/surfaces/docs/index.js?v={{.Version}}');
|
||||
</script>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user