misc: static appName/version display in client UI

This commit is contained in:
bordun 2021-01-08 14:24:54 +01:00
parent 6f60b5c6a2
commit 9dae9c5c9d
3 changed files with 5 additions and 7 deletions

View file

@ -51,6 +51,6 @@ fs.writeFileSync(path.resolve(__dirname + '/../app/package.json'), JSON.stringif
var clientHtml = fs.readFileSync(path.resolve(__dirname + '/../src/html/client.html'))
.toString()
.replace(/\$\{version\}/g, appJson.version)
.replace(/\$\{([^\}]+)\}/g, (m, p1)=>{return appJson[p1]})
fs.writeFileSync(path.resolve(__dirname + '/../app/client/index.html'), clientHtml)

View file

@ -3,10 +3,7 @@ document.addEventListener('DOMContentLoaded', function(event) {
require('./globals')
require('./stacktrace')
var locales = require('./locales'),
html = require('nanohtml')
DOM.get(document, '#osc-greeting-header')[0].appendChild(html`${PACKAGE.productName} <span class="version">v${PACKAGE.version}</span>`)
var locales = require('./locales')
DOM.init()

View file

@ -29,7 +29,9 @@
</osc-panel-inner>
</osc-panel-container>
<osc-panel-container class="center">
<osc-panel-header id="osc-greeting-header"></osc-panel-header>
<osc-panel-header id="osc-greeting-header">
${productName} <span class="version">v${version}</span>
</osc-panel-header>
<osc-panel-inner id="osc-container"></osc-panel-inner>
</osc-panel-container>
<osc-panel-container class="right">
@ -38,7 +40,6 @@
<osc-panel-inner class="right">
<osc-panel-header></osc-panel-header>
<osc-panel-content class="right" id="osc-inspector"></osc-panel-content>
</osc-panel-inner>
</osc-panel-container>
<osc-modal-container></osc-modal-container>