-
Notifications
You must be signed in to change notification settings - Fork 0
/
about.js
41 lines (25 loc) · 1.03 KB
/
about.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/****************************************************************************
* about.js
* openacousticdevices.info
* June 2017
*****************************************************************************/
'use strict';
/* global document */
const electron = require('electron');
const {app, process} = require('@electron/remote');
const nightMode = require('./nightMode.js');
const versionDisplay = document.getElementById('version-display');
const electronVersionDisplay = document.getElementById('electron-version-display');
const websiteLink = document.getElementById('website-link');
versionDisplay.textContent = 'Version ' + app.getVersion();
electronVersionDisplay.textContent = 'Running on Electron version ' + process.versions.electron;
electron.ipcRenderer.on('night-mode', (e, nm) => {
if (nm !== undefined) {
nightMode.setNightMode(nm);
} else {
nightMode.toggle();
}
});
websiteLink.addEventListener('click', function () {
electron.shell.openExternal('https://openacousticdevices.info');
});