now spash screen version is taken from the actual version.js

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-01-13 08:33:03 +03:00
parent f23dc1f780
commit 55f800202e
3 changed files with 10 additions and 1 deletions

View File

@ -16,6 +16,8 @@ var path = require('path')
var url = require('url') var url = require('url')
//var fs = require('fs') //var fs = require('fs')
var VERSION = require('./version').version
//--------------------------------------------------------------------- //---------------------------------------------------------------------
@ -66,6 +68,8 @@ function createWindow(){
// see if the splash screen is disabled... // see if the splash screen is disabled...
.executeJavaScript('localStorage.disableSplashScreen') .executeJavaScript('localStorage.disableSplashScreen')
.then(function(disabled){ .then(function(disabled){
splash.webContents
.executeJavaScript(`document.getElementById("version").innerText = "${VERSION}"`)
disabled ? disabled ?
splash.destroy() splash.destroy()
: splash.show() }) }) : splash.show() }) })

View File

@ -17,6 +17,7 @@ try{
electron = requirejs('electron') electron = requirejs('electron')
} catch(e){ } } catch(e){ }
var VERSION = require('version').version
var actions = require('lib/actions') var actions = require('lib/actions')
var features = require('lib/features') var features = require('lib/features')
@ -309,7 +310,11 @@ var ElectronHostActions = actions.Actions({
protocol: 'file:', protocol: 'file:',
slashes: true slashes: true
})) }))
splash.once('ready-to-show', function(){ splash.once('ready-to-show', function(){
splash.webContents
.executeJavaScript(
`document.getElementById("version").innerText = "${VERSION}"`)
splash.show() splash.show()
}) })

View File

@ -49,7 +49,7 @@ body {
<div class="block"> <div class="block">
<div class="title"> <div class="title">
ImageGrid.Viewer ImageGrid.Viewer
<span>v4.0.0a</span> <span id="version">v0.0.0</span>
</div> </div>
</div> </div>
</body> </body>