diff --git a/src/splash/index.html b/src/splash/index.html index bf980c8..529178f 100644 --- a/src/splash/index.html +++ b/src/splash/index.html @@ -5,6 +5,8 @@
+
+ \ No newline at end of file diff --git a/src/splash/preload.js b/src/splash/preload.js index a475675..4c847b9 100644 --- a/src/splash/preload.js +++ b/src/splash/preload.js @@ -1,36 +1,28 @@ -"use strict"; +const { app, contextBridge, ipcRenderer } = require('electron'); -const { - app, - contextBridge, - ipcRenderer -} = require('electron'); +const { saferShellOpenExternal } = require('../utils/securityUtils'); -const { - saferShellOpenExternal -} = require('../utils/securityUtils'); contextBridge.exposeInMainWorld('DiscordSplash', { - getReleaseChannel: () => { - const buildInfo = require('../utils/buildInfo'); - - return buildInfo.releaseChannel; - }, signalReady: () => { ipcRenderer.send('DISCORD_SPLASH_SCREEN_READY'); }, + onStateUpdate: callback => { ipcRenderer.on('DISCORD_SPLASH_UPDATE_STATE', (_, state) => { callback(state); }); }, - onQuoteUpdate: callback => { - ipcRenderer.on('DISCORD_SPLASH_SCREEN_QUOTE', (_, quote) => { - callback(quote); - }); - }, + openUrl: saferShellOpenExternal, - quitDiscord: () => { - ipcRenderer.send('DISCORD_SPLASH_SCREEN_QUIT'); + quitDiscord: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_QUIT'), + + getDebugInfo: () => { + const buildInfo = require('../utils/buildInfo'); + + const urlParams = new URLSearchParams(window.location.search); + + return `${buildInfo.releaseChannel} ${buildInfo.version} + OpenAsar ${urlParams.get('oaVersion')}`; } }); \ No newline at end of file diff --git a/src/splash/splashScreen.js b/src/splash/splashScreen.js index 7dc4c5b..8b3468f 100644 --- a/src/splash/splashScreen.js +++ b/src/splash/splashScreen.js @@ -487,7 +487,7 @@ function launchSplashWindow(startMinimized) { pathname: _path.default.join(__dirname, 'index.html') }); - splashWindow.loadURL(splashUrl); + splashWindow.loadURL(splashUrl + '?oaVersion=' + global.oaVersion); log('Splash', `Loading window (with url ${splashUrl})`); }