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:
parent
d2e4a0b0d2
commit
4738a0e0a8
@ -13,13 +13,10 @@ The lightweight framework for web-like apps
|
|||||||
* Initialises platform specific code
|
* Initialises platform specific code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// import * as common from './common';
|
|
||||||
const common = require('./common');
|
|
||||||
|
|
||||||
export const System = {
|
export const System = {
|
||||||
...common,
|
AppType: 'desktop',
|
||||||
Platform: () => "darwin",
|
Platform: () => 'darwin',
|
||||||
}
|
};
|
||||||
|
|
||||||
export function SendMessage(message) {
|
export function SendMessage(message) {
|
||||||
window.webkit.messageHandlers.external.postMessage(message);
|
window.webkit.messageHandlers.external.postMessage(message);
|
||||||
@ -60,7 +57,7 @@ export function Init() {
|
|||||||
let contextData = currentElement.dataset['wails-context-menu-data'];
|
let contextData = currentElement.dataset['wails-context-menu-data'];
|
||||||
let message = {
|
let message = {
|
||||||
id: contextMenuId,
|
id: contextMenuId,
|
||||||
data: contextData || "",
|
data: contextData || '',
|
||||||
};
|
};
|
||||||
window.webkit.messageHandlers.contextMenu.postMessage(JSON.stringify(message));
|
window.webkit.messageHandlers.contextMenu.postMessage(JSON.stringify(message));
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,9 @@ The lightweight framework for web-like apps
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const System = {
|
export const System = {
|
||||||
...common,
|
AppType: 'desktop',
|
||||||
Platform: () => "linux",
|
Platform: () => 'linux',
|
||||||
}
|
};
|
||||||
|
|
||||||
export function SendMessage(message) {
|
export function SendMessage(message) {
|
||||||
window.webkit.messageHandlers.external.postMessage(message);
|
window.webkit.messageHandlers.external.postMessage(message);
|
||||||
|
@ -13,11 +13,8 @@ The lightweight framework for web-like apps
|
|||||||
* Initialises platform specific code
|
* Initialises platform specific code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// import * as common from './common';
|
|
||||||
const common = require('./common');
|
|
||||||
|
|
||||||
export const System = {
|
export const System = {
|
||||||
...common,
|
AppType: 'desktop',
|
||||||
Platform: () => 'windows',
|
Platform: () => 'windows',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user