From 55f800202ec0626eb6846a2f9903596a66a2b9cd Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 13 Jan 2019 08:33:03 +0300 Subject: [PATCH] now spash screen version is taken from the actual version.js Signed-off-by: Alex A. Naanou --- ui (gen4)/e.js | 4 ++++ ui (gen4)/features/app.js | 5 +++++ ui (gen4)/splash.html | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ui (gen4)/e.js b/ui (gen4)/e.js index 1c7cccfc..cea6bd3d 100644 --- a/ui (gen4)/e.js +++ b/ui (gen4)/e.js @@ -16,6 +16,8 @@ var path = require('path') var url = require('url') //var fs = require('fs') +var VERSION = require('./version').version + //--------------------------------------------------------------------- @@ -66,6 +68,8 @@ function createWindow(){ // see if the splash screen is disabled... .executeJavaScript('localStorage.disableSplashScreen') .then(function(disabled){ + splash.webContents + .executeJavaScript(`document.getElementById("version").innerText = "${VERSION}"`) disabled ? splash.destroy() : splash.show() }) }) diff --git a/ui (gen4)/features/app.js b/ui (gen4)/features/app.js index be57664b..142ea116 100755 --- a/ui (gen4)/features/app.js +++ b/ui (gen4)/features/app.js @@ -17,6 +17,7 @@ try{ electron = requirejs('electron') } catch(e){ } +var VERSION = require('version').version var actions = require('lib/actions') var features = require('lib/features') @@ -309,7 +310,11 @@ var ElectronHostActions = actions.Actions({ protocol: 'file:', slashes: true })) + splash.once('ready-to-show', function(){ + splash.webContents + .executeJavaScript( + `document.getElementById("version").innerText = "${VERSION}"`) splash.show() }) diff --git a/ui (gen4)/splash.html b/ui (gen4)/splash.html index c54e2ab0..be8088df 100644 --- a/ui (gen4)/splash.html +++ b/ui (gen4)/splash.html @@ -49,7 +49,7 @@ body {
ImageGrid.Viewer - v4.0.0a + v0.0.0