chore: upgrade electron (#2577)

This commit is contained in:
Aman Harwara
2023-10-12 13:24:53 +05:30
committed by GitHub
parent c5f4791b27
commit 21091c7f35
20 changed files with 112 additions and 69 deletions

View File

@@ -1,4 +1,4 @@
import { App, Shell } from 'electron'
import { App, Shell, Event } from 'electron'
import { AppState } from './AppState'
import { createExtensionsServer } from './javascripts/Main/ExtensionsServer'
import { Keychain } from './javascripts/Main/Keychain/Keychain'
@@ -52,7 +52,7 @@ function focusWindow(appState: AppState) {
}
function registerSingleInstanceHandler(app: Electron.App, appState: AppState) {
app.on('second-instance', (_event: Event, argv: string[]) => {
app.on('second-instance', (_event: Event, argv: string[], _workingDirectory: string, _additionalData: unknown) => {
if (isWindows()) {
appState.deepLinkUrl = argv.find((arg) => arg.startsWith(deepLinkScheme))
}

View File

@@ -174,7 +174,7 @@ export async function checkForUpdate(appState: AppState, state: UpdateState, use
state.setCheckingForUpdate(true)
try {
const result = await autoUpdater.checkForUpdates()
const result = userTriggered ? await autoUpdater.checkForUpdatesAndNotify() : await autoUpdater.checkForUpdates()
if (!result) {
return

View File

@@ -69,12 +69,44 @@ panel-resizer {
font-size: 0;
}
/* Required for BrowserWindow titleBarStyle: 'hiddenInset' */
.mac-desktop #navigation,
.mac-desktop #navigation .section-title-bar,
.mac-desktop #items-title-bar,
.mac-desktop #editor-title-bar,
.mac-desktop #lock-screen {
/* https://github.com/electron/electron/issues/37789 */
.mac-desktop #navigation {
-webkit-app-region: drag;
}
.mac-desktop #navigation-content {
-webkit-app-region: no-drag;
}
.mac-desktop #navigation-content .section-title-bar .title {
-webkit-app-region: drag;
}
.mac-desktop #items-title-bar {
-webkit-app-region: drag;
}
.mac-desktop #items-title-bar input,
.mac-desktop #items-title-bar button {
-webkit-app-region: no-drag;
}
.mac-desktop #editor-title-bar {
-webkit-app-region: drag;
}
.mac-desktop #editor-title-bar input,
.mac-desktop #editor-title-bar button {
-webkit-app-region: no-drag;
}
.mac-desktop [data-dialog]::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 36px;
-webkit-app-region: drag;
}

View File

@@ -34,21 +34,21 @@
"hoistingLimits": "workspaces"
},
"dependencies": {
"@electron/remote": "^2.0.9",
"@electron/remote": "^2.0.12",
"@standardnotes/domain-core": "^1.34.1",
"@standardnotes/electron-clear-data": "1.1.1",
"@standardnotes/web": "workspace:*",
"axios": "^1.1.3",
"compare-versions": "^5.0.1",
"axios": "^1.4.0",
"compare-versions": "^6.1.0",
"decrypt": "github:standardnotes/decrypt#master",
"dotenv": "^16.0.3",
"electron": "22.3.24",
"dotenv": "^16.3.1",
"electron": "27.0.0",
"electron-log": "^4.4.8",
"electron-updater": "^5.3.0",
"electron-updater": "^6.1.4",
"fs-extra": "^11.1.1",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mobx": "^6.7.0"
"mobx": "^6.10.2"
},
"devDependencies": {
"@babel/core": "*",