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

+9
View File
@@ -6,6 +6,15 @@ import "github.com/filebrowser/filebrowser/v2/internal/addons"
//go:embed craft_bridge.js
var officeBridge []byte
//go:embed deckcraft_compat.js
var deckcraftCompat []byte
// Archive digest prefix produced by the checksum-verified installer. The JS shim
// independently verifies the full WASM digest before accessing its memory layout.
func deckcraftNeedsCompat(id, build string) bool {
return id == "deckcraft" && build == "v0.9.0-38076027b9c1"
}
func needsOfficeBridge(id string) bool {
tool, ok := addons.Find(id)
return ok && tool.Bridge == "drop"