From 0d2ccff43a5139db516d439d007c79d46c0c1647 Mon Sep 17 00:00:00 2001 From: Norman Fomferra Date: Tue, 20 Mar 2018 14:29:48 +0100 Subject: [PATCH] simplified splash --- app/splash.html | 29 ++++++++++++----------------- src/main/main.ts | 8 +++++--- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/app/splash.html b/app/splash.html index 1aef31c..9216566 100644 --- a/app/splash.html +++ b/app/splash.html @@ -2,23 +2,18 @@ -
- - Loading Cate, please wait... +
+ +
diff --git a/src/main/main.ts b/src/main/main.ts index c7f5744..4de3d33 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -268,10 +268,10 @@ class CateDesktopApp { if (this.webAPIStartTime === null) { // Set start time, unless it has already been done this.resetWebAPIStartTime(); + this.showSplashMessage('Waiting for Cate service...'); } log.info(`Waiting for response from Cate service ${this.webAPIRestUrl}`); - this.showSplashMessage('Waiting for Cate service response...'); request(this.webAPIRestUrl, this.webAPIAccessTimeout) .then((response: string) => { log.info('Connected to Cate service. Response: ', response); @@ -281,6 +281,7 @@ class CateDesktopApp { const delta = this.webAPIStartTimeDelta; const deltaStr = delta.toFixed(2); log.info(`No response from Cate service after ${deltaStr} seconds: ${err}`); + this.showSplashMessage(`Waiting for Cate service (${deltaStr}s)`); let callback = () => { if (delta > this.webAPIStartTimeout) { log.error(`Failed to start Cate service within ${deltaStr} seconds.`, err); @@ -456,8 +457,8 @@ class CateDesktopApp { private showSplashWindow(callback: () => void) { this.splashWindow = new electron.BrowserWindow({ - width: 830, - height: 320, + width: 300, + height: 300, center: true, show: true, useContentSize: true, @@ -467,6 +468,7 @@ class CateDesktopApp { parent: this.mainWindow }); + this.splashWindow.setIgnoreMouseEvents(true); this.splashWindow.on('closed', () => { this.splashWindow = null; });