Update electron to 16.0.4
This commit is contained in:
parent
ba043c422b
commit
bbc13d058e
28 changed files with 491 additions and 2985 deletions
32
app/main.ts
32
app/main.ts
|
@ -23,6 +23,7 @@ import {
|
|||
screen,
|
||||
shell,
|
||||
systemPreferences,
|
||||
desktopCapturer,
|
||||
} from 'electron';
|
||||
import { z } from 'zod';
|
||||
|
||||
|
@ -587,11 +588,10 @@ async function createWindow() {
|
|||
|
||||
if (getEnvironment() === Environment.Test) {
|
||||
mainWindow.loadURL(
|
||||
prepareFileUrl([__dirname, '../test/index.html'], moreKeys)
|
||||
);
|
||||
} else if (getEnvironment() === Environment.TestLib) {
|
||||
mainWindow.loadURL(
|
||||
prepareFileUrl([__dirname, '../libtextsecure/test/index.html'], moreKeys)
|
||||
prepareFileUrl([__dirname, '../test/index.html'], {
|
||||
...moreKeys,
|
||||
argv: JSON.stringify(process.argv),
|
||||
})
|
||||
);
|
||||
} else {
|
||||
mainWindow.loadURL(
|
||||
|
@ -1424,10 +1424,7 @@ app.on('ready', async () => {
|
|||
|
||||
addSensitivePath(userDataPath);
|
||||
|
||||
if (
|
||||
getEnvironment() !== Environment.Test &&
|
||||
getEnvironment() !== Environment.TestLib
|
||||
) {
|
||||
if (getEnvironment() !== Environment.Test) {
|
||||
installFileHandler({
|
||||
protocol: electronProtocol,
|
||||
userDataPath,
|
||||
|
@ -2120,3 +2117,20 @@ ipc.handle('show-save-dialog', async (_event, { defaultPath }) => {
|
|||
defaultPath,
|
||||
});
|
||||
});
|
||||
|
||||
ipc.handle('getScreenCaptureSources', async () => {
|
||||
return desktopCapturer.getSources({
|
||||
fetchWindowIcons: true,
|
||||
thumbnailSize: { height: 102, width: 184 },
|
||||
types: ['window', 'screen'],
|
||||
});
|
||||
});
|
||||
|
||||
if (isTestEnvironment(getEnvironment())) {
|
||||
ipc.handle('ci:test-electron:done', async (_event, info) => {
|
||||
process.stdout.write(
|
||||
`ci:test-electron:done=${JSON.stringify(info)}\n`,
|
||||
() => app.quit()
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue