2017-09-26 05:40:53 -05:00
|
|
|
'use strict';
|
|
|
|
const { remote } = require('electron');
|
|
|
|
|
|
|
|
renderDom();
|
|
|
|
|
|
|
|
/**
|
2017-09-26 11:04:25 -05:00
|
|
|
* Method that renders application data
|
2017-09-26 05:40:53 -05:00
|
|
|
*/
|
|
|
|
function renderDom() {
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
const applicationName = remote.app.getName() || 'Symphony';
|
|
|
|
const version = remote.app.getVersion();
|
|
|
|
let appName = document.getElementById('app-name');
|
|
|
|
let versionText = document.getElementById('version');
|
|
|
|
let copyright = document.getElementById('copyright');
|
|
|
|
|
|
|
|
appName.innerHTML = applicationName;
|
|
|
|
versionText.innerHTML = version ? `Version ${version} (${version})` : null;
|
|
|
|
copyright.innerHTML = `Copyright © ${new Date().getFullYear()} ${applicationName}`
|
|
|
|
});
|
2017-09-26 11:04:25 -05:00
|
|
|
}
|