mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 20:03:01 +08:00
Fix: wails dev
This commit is contained in:
parent
f6257d3d31
commit
7f3f56663f
@ -167,6 +167,11 @@ func (d *DevWebServer) WindowReload() {
|
|||||||
d.desktopFrontend.WindowReload()
|
d.desktopFrontend.WindowReload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (d *DevWebServer) WindowReloadApp() {
|
||||||
|
d.broadcast("reloadapp")
|
||||||
|
d.desktopFrontend.WindowReloadApp()
|
||||||
|
}
|
||||||
|
|
||||||
func (d *DevWebServer) WindowSetTitle(title string) {
|
func (d *DevWebServer) WindowSetTitle(title string) {
|
||||||
d.desktopFrontend.WindowSetTitle(title)
|
d.desktopFrontend.WindowSetTitle(title)
|
||||||
}
|
}
|
||||||
@ -260,6 +265,10 @@ func (d *DevWebServer) handleReload(c echo.Context) error {
|
|||||||
d.WindowReload()
|
d.WindowReload()
|
||||||
return c.NoContent(http.StatusNoContent)
|
return c.NoContent(http.StatusNoContent)
|
||||||
}
|
}
|
||||||
|
func (d *DevWebServer) handleReloadApp(c echo.Context) error {
|
||||||
|
d.WindowReloadApp()
|
||||||
|
return c.NoContent(http.StatusNoContent)
|
||||||
|
}
|
||||||
|
|
||||||
func (d *DevWebServer) handleIPCWebSocket(c echo.Context) error {
|
func (d *DevWebServer) handleIPCWebSocket(c echo.Context) error {
|
||||||
websocket.Handler(func(c *websocket.Conn) {
|
websocket.Handler(func(c *websocket.Conn) {
|
||||||
|
@ -104,6 +104,10 @@ function handleMessage(message) {
|
|||||||
window.runtime.WindowReload();
|
window.runtime.WindowReload();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (message.data === "reloadapp") {
|
||||||
|
window.runtime.WindowReloadApp()
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// As a bridge we ignore js and css injections
|
// As a bridge we ignore js and css injections
|
||||||
switch (message.data[0]) {
|
switch (message.data[0]) {
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user