Changeset 0.27.0 (#166)
This commit is contained in:
21
server/pages/templates/surfaces/extension.html
Normal file
21
server/pages/templates/surfaces/extension.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{/* v0.27.0: Generic container for extension surfaces.
|
||||
Extension JS mounts into #extension-mount. The manifest is available
|
||||
as window.__MANIFEST__ (injected in base.html). Platform primitives
|
||||
(Theme, UI, API, ChatPane, etc.) are loaded by base.html before this
|
||||
script runs.
|
||||
|
||||
Extensions can use any component available on the page:
|
||||
- ChatPane.create(container, opts)
|
||||
- UI.* primitives (toast, confirm, etc.)
|
||||
- API.* (authenticated fetch)
|
||||
- Theme.* (dark/light queries)
|
||||
*/}}
|
||||
{{define "surface-extension"}}
|
||||
<div id="extension-surface" class="extension-surface"
|
||||
data-surface-id="{{.Surface}}">
|
||||
{{/* User menu — must pass dict with ID field, not raw PageData */}}
|
||||
{{template "user-menu" dict "ID" "ext"}}
|
||||
|
||||
<div id="extension-mount" class="extension-mount"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user