diff --git a/app.js b/app.js index c87153a..d057b24 100644 --- a/app.js +++ b/app.js @@ -14,6 +14,7 @@ var express = require('express'), request = require('postman-request'); var app = express(); var apiAccessList = []; +const { exec } = require('child_process'); // pass wallet rpc connection info to nodeapi nodeapi.setWalletDetails(settings.wallet); @@ -782,4 +783,13 @@ if (settings.webserver.tls.enabled == true) { https.createServer(tls_options, app).listen(settings.webserver.tls.port); } +// get the latest git commit id (if exists) +exec('git rev-parse HEAD', (err, stdout, stderr) => { + // check if the commit id was returned + if (stdout != null && stdout != '') { + // set the explorer revision code based on the git commit id + app.set('revision', stdout.substring(0, 7)); + } +}); + module.exports = app; \ No newline at end of file diff --git a/public/css/style.scss b/public/css/style.scss index c09530a..67e88d5 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -518,6 +518,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { margin-bottom: 0.1rem; } .poweredby { + white-space: normal; margin-right: 0.2rem; font-size: 80%; } diff --git a/views/layout.pug b/views/layout.pug index df9e5b7..b36c3f8 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -787,7 +787,7 @@ html(lang='en') ul.nav.justify-content-center li.text-center p - a.nav-link.poweredby.border-0(href='https://github.com/team-exor/eiquidus', target='_blank') eIquidus Explorer v#{settings.explorer_version} + a.nav-link.poweredby.border-0(href='https://github.com/team-exor/eiquidus', target='_blank') eIquidus Explorer v#{settings.explorer_version}#{(settings.revision == null || settings.revision == '' ? '' : `-${settings.revision}`)} .col-4.navbar-nav ui.nav.justify-content-end label#lblBlockcount.badge.nav-link.border-0.float-end