Fix DeckCraft WASM startup and prefer built-in file previews

This commit is contained in:
SantaSpeen committed 2026-10-22 20:16:12 +03:00
1 parent 852140c3a7
commit 7371c29111
21 files changed
+275 -15

No files matched your search

+3
View File
@@ -123,6 +123,9 @@ func addonStaticHandler(manager *addons.Manager) handleFunc {
tool, _ := addons.Find(id)
config, _ := json.Marshal(tool)
response := append([]byte("window.__filebrowserCraft="+string(config)+";\n"), officeBridge...)
if deckcraftNeedsCompat(id, vars["build"]) {
response = append(append(append([]byte{}, deckcraftCompat...), '\n'), response...)
}
http.ServeContent(w, r, name, info.ModTime(), bytes.NewReader(response))
return 0, nil
}