mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Update Wails runtime and increase version
The Wails runtime has been updated to correctly handle debug checks and the version in the package.json has been bumped to 3.0.0-alpha.6. Fixed reference to global wails object in WML.
This commit is contained in:
parent
0974a3ad18
commit
4c3cbc3535
5 changed files with 14 additions and 5 deletions
1
v3/internal/runtime/desktop/@wailsio/runtime/.npmignore
Normal file
1
v3/internal/runtime/desktop/@wailsio/runtime/.npmignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
events.test.js
|
||||
|
|
@ -11,6 +11,7 @@ The electron alternative for Go
|
|||
/* jshint esversion: 9 */
|
||||
|
||||
import {newRuntimeCallerWithID, objectNames} from "./runtime";
|
||||
import {IsDebug} from "./system";
|
||||
|
||||
const call = newRuntimeCallerWithID(objectNames.ContextMenu, '');
|
||||
const ContextMenuOpen = 0;
|
||||
|
|
@ -47,8 +48,9 @@ function contextMenuHandler(event) {
|
|||
This rule is inherited like normal CSS rules, so nesting works as expected
|
||||
*/
|
||||
function processDefaultContextMenu(event) {
|
||||
|
||||
// Debug builds always show the menu
|
||||
if (DEBUG) {
|
||||
if (IsDebug()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@wailsio/runtime",
|
||||
"version": "3.0.0-alpha.4",
|
||||
"version": "3.0.0-alpha.6",
|
||||
"description": "Wails Runtime",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
|
@ -12,5 +12,6 @@
|
|||
"bugs": {
|
||||
"url": "https://github.com/wailsapp/wails/issues"
|
||||
},
|
||||
"homepage": "https://wails.io"
|
||||
"homepage": "https://wails.io",
|
||||
"private": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,3 +116,7 @@ export function IsARM() {
|
|||
export function IsARM64() {
|
||||
return environmentCache.Arch === "arm64";
|
||||
}
|
||||
|
||||
export function IsDebug() {
|
||||
return environmentCache.Debug === true;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
import {Emit, WailsEvent} from "./events";
|
||||
import {Question} from "./dialogs";
|
||||
import {WindowMethods, Get} from "./window";
|
||||
import {OpenURL} from "./browser";
|
||||
|
||||
/**
|
||||
* Sends an event with the given name and optional data.
|
||||
|
|
@ -119,12 +120,12 @@ function addWMLOpenBrowserListener() {
|
|||
if (confirm) {
|
||||
Question({Title: "Confirm", Message:confirm, Buttons:[{Label:"Yes"},{Label:"No", IsDefault:true}]}).then(function (result) {
|
||||
if (result !== "No") {
|
||||
void wails.Browser.OpenURL(url);
|
||||
void OpenURL(url);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
void wails.Browser.OpenURL(url);
|
||||
void OpenURL(url);
|
||||
};
|
||||
|
||||
// Remove existing listeners
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue