diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-01-01 12:17:54 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-01-01 12:19:10 +0100 |
commit | b07cbec9496d3b280d3ed8c28c538bb7e37b4edb (patch) | |
tree | d44fcb2e51a1c94c83d62dc14a1129caec4d1c4a /packages/main/src | |
parent | docs: Separate CONTRIBUTING file (diff) | |
download | sophie-b07cbec9496d3b280d3ed8c28c538bb7e37b4edb.tar.gz sophie-b07cbec9496d3b280d3ed8c28c538bb7e37b4edb.tar.zst sophie-b07cbec9496d3b280d3ed8c28c538bb7e37b4edb.zip |
feat: Load browserview contents asynchronously
Also changes the default browserview contents to the gitlab repo.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src')
-rw-r--r-- | packages/main/src/index.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts index 70ee88b..41424ab 100644 --- a/packages/main/src/index.ts +++ b/packages/main/src/index.ts | |||
@@ -289,10 +289,11 @@ async function createWindow(): Promise<unknown> { | |||
289 | callback({ requestHeaders }); | 289 | callback({ requestHeaders }); |
290 | }); | 290 | }); |
291 | 291 | ||
292 | return Promise.all([ | 292 | browserView.webContents.loadURL('https://gitlab.com/say-hi-to-sophie/sophie').catch((err) => { |
293 | mainWindow.loadURL(pageUrl), | 293 | console.error('Failed to load browser', err); |
294 | browserView.webContents.loadURL('https://git.marussy.com/sophie/about'), | 294 | }); |
295 | ]); | 295 | |
296 | return mainWindow.loadURL(pageUrl); | ||
296 | } | 297 | } |
297 | 298 | ||
298 | app.on('second-instance', () => { | 299 | app.on('second-instance', () => { |