Fix DeckCraft WASM startup and prefer built-in file previews
This commit is contained in:
1 parent
852140c3a7
commit
7371c29111
21 files changed
+275
-15
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user