5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-19 02:19:31 +08:00

[v2] Remove common.js

This commit is contained in:
Lea Anthony 2021-05-31 20:08:11 +10:00
parent d2e4a0b0d2
commit 4738a0e0a8
3 changed files with 60 additions and 66 deletions

View File

@ -13,13 +13,10 @@ The lightweight framework for web-like apps
* Initialises platform specific code
*/
// import * as common from './common';
const common = require('./common');
export const System = {
...common,
Platform: () => "darwin",
}
AppType: 'desktop',
Platform: () => 'darwin',
};
export function SendMessage(message) {
window.webkit.messageHandlers.external.postMessage(message);
@ -60,7 +57,7 @@ export function Init() {
let contextData = currentElement.dataset['wails-context-menu-data'];
let message = {
id: contextMenuId,
data: contextData || "",
data: contextData || '',
};
window.webkit.messageHandlers.contextMenu.postMessage(JSON.stringify(message));
}

View File

@ -14,9 +14,9 @@ The lightweight framework for web-like apps
*/
export const System = {
...common,
Platform: () => "linux",
}
AppType: 'desktop',
Platform: () => 'linux',
};
export function SendMessage(message) {
window.webkit.messageHandlers.external.postMessage(message);

View File

@ -13,11 +13,8 @@ The lightweight framework for web-like apps
* Initialises platform specific code
*/
// import * as common from './common';
const common = require('./common');
export const System = {
...common,
AppType: 'desktop',
Platform: () => 'windows',
};