mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
[windows-x] Use winres for processing manifest + icon
This commit is contained in:
@@ -13,7 +13,7 @@ import {EventsEmit, EventsNotify, EventsOff, EventsOn, EventsOnce, EventsOnMulti
|
||||
import {Callback} from './calls';
|
||||
import {SetBindings} from "./bindings";
|
||||
// import {AddScript, DisableDefaultContextMenu, InjectCSS} from './utils';
|
||||
// import {AddIPCListener, SendMessage} from 'ipc';
|
||||
import {SendMessage} from './ipc';
|
||||
|
||||
// Backend is where the Go struct wrappers get bound to
|
||||
window.backend = {};
|
||||
@@ -29,18 +29,26 @@ window.runtime = {
|
||||
|
||||
// Initialise global if not already
|
||||
window.wails = {
|
||||
Callback,
|
||||
EventsNotify,
|
||||
SetBindings,
|
||||
// AddScript,
|
||||
// InjectCSS,
|
||||
// DisableDefaultContextMenu,
|
||||
// // Init,
|
||||
// AddIPCListener,
|
||||
// SystemCall,
|
||||
// SendMessage,
|
||||
Callback,
|
||||
EventsNotify,
|
||||
SetBindings,
|
||||
};
|
||||
|
||||
window.wails.SetBindings(window.wailsbindings);
|
||||
delete window.wails['SetBindings'];
|
||||
delete window['wailsbindings'];
|
||||
|
||||
// Setup drag handler
|
||||
// Based on code from: https://github.com/patr0nus/DeskGap
|
||||
window.addEventListener('mousedown', (e) => {
|
||||
let currentElement = e.target;
|
||||
while (currentElement != null) {
|
||||
if (currentElement.hasAttribute('data-wails-no-drag')) {
|
||||
break;
|
||||
} else if (currentElement.hasAttribute('data-wails-drag')) {
|
||||
SendMessage("drag");
|
||||
break;
|
||||
}
|
||||
currentElement = currentElement.parentElement;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user