-
Notifications
You must be signed in to change notification settings - Fork 7
/
about.js
44 lines (28 loc) · 1.29 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
42
43
44
/****************************************************************************
* about.js
* openacousticdevices.info
* June 2017
*****************************************************************************/
'use strict';
/* global document */
const electron = require('electron');
const {app, process} = require('@electron/remote');
const audiomoth = require('audiomoth-hid');
const nightMode = require('./nightMode.js');
const versionDisplay = document.getElementById('version-display');
const electronVersionDisplay = document.getElementById('electron-version-display');
const websiteLink = document.getElementById('website-link');
const audiomothHidVersionDisplay = document.getElementById('audiomoth-hid-version-display');
versionDisplay.textContent = 'Version ' + app.getVersion();
electronVersionDisplay.textContent = 'Running on Electron version ' + process.versions.electron;
audiomothHidVersionDisplay.textContent = 'AudioMoth-HID module ' + audiomoth.version;
electron.ipcRenderer.on('night-mode', (e, nm) => {
if (nm !== undefined) {
nightMode.setNightMode(nm);
} else {
nightMode.toggle();
}
});
websiteLink.addEventListener('click', () => {
electron.shell.openExternal('https://openacousticdevices.info');
});