mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:03:01 +08:00
fix for ipc binding
made reconnect modal a bit better
This commit is contained in:
parent
3f2f1b45f6
commit
0ae5381203
@ -20,7 +20,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
width: 20em;
|
width: 20em;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 17em;
|
height: 14em;
|
||||||
border-radius: 1em;
|
border-radius: 1em;
|
||||||
margin: 5% auto 0;
|
margin: 5% auto 0;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
@ -39,6 +39,7 @@ func (h *Headless) Initialise(appConfig *AppConfig, ipcManager *ipcManager, even
|
|||||||
h.ipcManager = ipcManager
|
h.ipcManager = ipcManager
|
||||||
h.appConfig = appConfig
|
h.appConfig = appConfig
|
||||||
h.eventManager = eventManager
|
h.eventManager = eventManager
|
||||||
|
ipcManager.bindRenderer(h)
|
||||||
h.log = newCustomLogger("Headless")
|
h.log = newCustomLogger("Headless")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -99,17 +100,13 @@ func (h *Headless) start(conn *websocket.Conn) {
|
|||||||
// set external.invoke
|
// set external.invoke
|
||||||
h.log.Infof("Connected to frontend.")
|
h.log.Infof("Connected to frontend.")
|
||||||
|
|
||||||
// If we are given an HTML fragment, load jquery
|
|
||||||
// for the html() function
|
|
||||||
if h.appConfig.isHTMLFragment {
|
|
||||||
// Inject jquery
|
|
||||||
jquery := BoxString(&defaultAssets, "jquery.3.3.1.min.js")
|
|
||||||
h.evalJS(jquery)
|
|
||||||
}
|
|
||||||
|
|
||||||
wailsRuntime := BoxString(&defaultAssets, "wails.js")
|
wailsRuntime := BoxString(&defaultAssets, "wails.js")
|
||||||
h.evalJS(wailsRuntime)
|
h.evalJS(wailsRuntime)
|
||||||
|
|
||||||
|
// Inject jquery
|
||||||
|
jquery := BoxString(&defaultAssets, "jquery.3.3.1.min.js")
|
||||||
|
h.evalJS(jquery)
|
||||||
|
|
||||||
// Inject the initial JS
|
// Inject the initial JS
|
||||||
for _, js := range h.initialisationJS {
|
for _, js := range h.initialisationJS {
|
||||||
h.sendMessage(conn, js)
|
h.sendMessage(conn, js)
|
||||||
|
Loading…
Reference in New Issue
Block a user