migrate about_start to not use jquery
parent
f164302617
commit
475c92eeb4
@ -0,0 +1,29 @@
|
||||
// Add version and commit hash
|
||||
|
||||
global.setTimeout(() => {
|
||||
const version = document.getElementsByClassName('version').item(0);
|
||||
|
||||
const commit = document.getElementsByClassName('commitHash').item(0);
|
||||
const environment = document.getElementsByClassName('environment').item(0);
|
||||
|
||||
// Add debugging metadata - environment if not production, app instance name
|
||||
const states = [];
|
||||
|
||||
if (window.getEnvironment() !== 'production') {
|
||||
states.push(window.getEnvironment());
|
||||
}
|
||||
if (window.getAppInstance()) {
|
||||
states.push(window.getAppInstance());
|
||||
}
|
||||
if (version) {
|
||||
version.innerHTML = `v${window.getVersion()}`;
|
||||
}
|
||||
|
||||
if (commit) {
|
||||
commit.innerHTML = window.getCommitHash() || '';
|
||||
}
|
||||
|
||||
if (environment) {
|
||||
environment.innerHTML = states.join(' - ');
|
||||
}
|
||||
}, 1000);
|
@ -1,26 +0,0 @@
|
||||
/* global $: false */
|
||||
|
||||
// Add version and commit hash
|
||||
$('.version').text(`v${window.getVersion()}`);
|
||||
$('.commitHash').text(window.getCommitHash() || '');
|
||||
|
||||
// Add debugging metadata - environment if not production, app instance name
|
||||
const states = [];
|
||||
|
||||
if (window.getEnvironment() !== 'production') {
|
||||
states.push(window.getEnvironment());
|
||||
}
|
||||
if (window.getAppInstance()) {
|
||||
states.push(window.getAppInstance());
|
||||
}
|
||||
|
||||
$('.environment').text(states.join(' - '));
|
||||
|
||||
// Install the 'dismiss with escape key' handler
|
||||
// $(document).on('keyup', e => {
|
||||
// 'use strict';
|
||||
|
||||
// if (e.keyCode === 27) {
|
||||
// window.closeAbout();
|
||||
// }
|
||||
// });
|
Loading…
Reference in New Issue