Revert v3 changes in v2 asset server

This commit is contained in:
Lea Anthony
2023-08-14 08:28:32 +10:00
parent ec0731d5d8
commit 543b18dd54
+3 -25
View File
@@ -15,11 +15,9 @@ import (
)
const (
runtimeJSPath = "/wails/runtime.js"
ipcJSPath = "/wails/ipc.js"
runtimePath = "/wails/runtime"
capabilitiesPath = "/wails/capabilities"
flagsPath = "/wails/flags"
runtimeJSPath = "/wails/runtime.js"
ipcJSPath = "/wails/ipc.js"
runtimePath = "/wails/runtime"
)
type RuntimeAssets interface {
@@ -49,12 +47,6 @@ type AssetServer struct {
// plugin scripts
pluginScripts map[string]string
// GetCapabilities returns the capabilities of the runtime
GetCapabilities func() []byte
// GetFlags returns the application flags
GetFlags func() []byte
assetServerWebView
}
@@ -153,20 +145,6 @@ func (d *AssetServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
case runtimeJSPath:
d.writeBlob(rw, path, d.runtimeJS)
case capabilitiesPath:
var data = []byte("{}")
if d.GetCapabilities != nil {
data = d.GetCapabilities()
}
d.writeBlob(rw, path, data)
case flagsPath:
var data = []byte("{}")
if d.GetFlags != nil {
data = d.GetFlags()
}
d.writeBlob(rw, path, data)
case runtimePath:
if d.runtimeHandler != nil {
d.runtimeHandler.HandleRuntimeCall(rw, req)