2018-07-07 00:48:14 +00:00
|
|
|
/* global $: false */
|
|
|
|
|
2018-07-03 22:33:50 +00:00
|
|
|
// Add version
|
|
|
|
$('.version').text(`v${window.getVersion()}`);
|
|
|
|
|
|
|
|
// 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
|
2018-07-07 00:48:14 +00:00
|
|
|
$(document).on('keyup', e => {
|
|
|
|
'use strict';
|
|
|
|
|
2018-07-03 22:33:50 +00:00
|
|
|
if (e.keyCode === 27) {
|
|
|
|
window.closeAbout();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// Localize the privacy string
|
|
|
|
$('.privacy').text(window.i18n('privacyPolicy'));
|