Update to Electron 18.0.0

This commit is contained in:
rafael-aero
2022-03-29 10:13:20 +02:00
parent b0262b36d0
commit de56395946
7 changed files with 27 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
variables:
PackageVersion: 17.3.0.$(Build.BuildId)
PackageVersion: 18.0.0.$(Build.BuildId)
projectAPI: './ElectronNET.API/ElectronNET.API.csproj'
projectCLI: './ElectronNET.CLI/ElectronNET.CLI.csproj'

View File

@@ -1919,6 +1919,19 @@ namespace ElectronNET.API
BridgeConnector.Emit("browserWindowSetAppDetails", Id, options);
}
/// <summary>
///On a Window with Window Controls Overlay already enabled, this method updates
/// the style of the title bar overlay. It should not be called unless you enabled WCO
/// when creating the window.
/// </summary>
/// <param name="options"></param>
[SupportedOSPlatform("win")]
[SupportedOSPlatform("macos")]
public void SetTitleBarOverlay(TitleBarOverlayConfig options)
{
BridgeConnector.Emit("browserWindowSetTitleBarOverlay", Id, options);
}
/// <summary>
/// Same as webContents.showDefinitionForSelection().
/// </summary>

View File

@@ -35,7 +35,7 @@ Full example for a 32bit debug build with electron prune: build /target custom w
_args = args;
}
private const string _defaultElectronVersion = "17.3.0";
private const string _defaultElectronVersion = "18.0.0";
private const string _paramTarget = "target";
private const string _paramDotNetConfig = "dotnet-configuration";

View File

@@ -579,6 +579,9 @@ module.exports = (socket, app, firstTime) => {
socket.on('browserWindowSetAppDetails', (id, options) => {
getWindowById(id)?.setAppDetails(options);
});
socket.on('browserWindowSetTitleBarOverlay', (id, options) => {
getWindowById(id)?.setTitleBarOverlay(options);
});
socket.on('browserWindowShowDefinitionForSelection', (id) => {
getWindowById(id)?.showDefinitionForSelection();
});

View File

@@ -730,6 +730,10 @@ export = (socket: Socket, app: Electron.App, firstTime: boolean) => {
getWindowById(id)?.setAppDetails(options);
});
socket.on('browserWindowSetTitleBarOverlay', (id, options) => {
getWindowById(id)?.setTitleBarOverlay(options);
});
socket.on('browserWindowShowDefinitionForSelection', (id) => {
getWindowById(id)?.showDefinitionForSelection();
});

View File

@@ -395,22 +395,14 @@
"dev": true
},
"electron": {
"version": "17.3.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-17.3.0.tgz",
"integrity": "sha512-KuYHCOw1a+CE9thZlWRqTScf6M81KLd6n5qpdBGb0rl62+50RUuau9CnYpBb3EJxrjsXLaiQCBBSdPsozf/XUg==",
"version": "18.0.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-18.0.0.tgz",
"integrity": "sha512-olAmqc+pNCDM9/nvYnZxhbAwQlMF01lDCesTKJjwItu2DaWZZm959OFTD+1mc/Q/YHDq9eqyD7MjqxjKuoWgWQ==",
"dev": true,
"requires": {
"@electron/get": "^1.13.0",
"@types/node": "^14.6.2",
"@types/node": "^16.11.26",
"extract-zip": "^1.0.3"
},
"dependencies": {
"@types/node": {
"version": "14.18.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz",
"integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==",
"dev": true
}
}
},
"electron-notarize": {

View File

@@ -21,7 +21,7 @@
"devDependencies": {
"@types/node": "^16.11.26",
"dotenv": "^16.0.0",
"electron": "^17.3.0",
"electron": "^18.0.0",
"electron-notarize": "^1.2.1",
"tslint": "^6.1.3",
"typescript": "^4.6.3"