Skip to content

Commit

Permalink
Add 1.10.0 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcprince committed Nov 13, 2023
1 parent 88a73fc commit 6efc127
Show file tree
Hide file tree
Showing 44 changed files with 3,965 additions and 1,592 deletions.
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
<div class="row">
<div class="col-lg-12">
<a href id="website-link">www.openacousticdevices.info</a>
<a href id="website-link" style="text-decoration: none;">www.openacousticdevices.info</a>
</div>
</div>
</div>
Expand Down
9 changes: 5 additions & 4 deletions about.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
/* 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 audiomothHidVersionDisplay = document.getElementById('audiomoth-hid-version-display');
const websiteLink = document.getElementById('website-link');
const audiomothHidVersionDisplay = document.getElementById('audiomoth-hid-version-display');

versionDisplay.textContent = 'Version ' + electron.remote.app.getVersion();
electronVersionDisplay.textContent = 'Running on Electron version ' + electron.remote.process.versions.electron;
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) => {
Expand All @@ -36,7 +37,7 @@ electron.ipcRenderer.on('night-mode', (e, nm) => {

});

websiteLink.addEventListener('click', function () {
websiteLink.addEventListener('click', () => {

electron.shell.openExternal('https://openacousticdevices.info');

Expand Down
32 changes: 32 additions & 0 deletions ariaSpeak.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/****************************************************************************
* ariaSpeak.js
* openacousticdevices.info
* May 2023
*****************************************************************************/

/**
* Say something if user is using a screen reader
* @param {string} text Text which should be said if viewed on a screen reader
*/
exports.speak = (text) => {

const element = document.createElement('div');
const id = 'speak-' + Date.now();
element.setAttribute('id', id);
element.setAttribute('aria-live', 'polite');
element.classList.add('visually-hidden');
document.body.appendChild(element);

window.setTimeout(() => {

document.getElementById(id).innerHTML = text;

}, 100);

window.setTimeout(() => {

document.body.removeChild(document.getElementById(id));

}, 1000);

};
7 changes: 3 additions & 4 deletions builder.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

'use strict';

const builder = require('electron-builder');
const Platform = builder.Platform;

var config, target, argTarget;
let config, target;

argTarget = process.argv[2];
const argTarget = process.argv[2];

switch (argTarget) {

Expand Down Expand Up @@ -55,7 +54,7 @@ default:

builder.build({
targets: target,
config: config
config
}).then(function (m) {

console.log('Generated files:');
Expand Down
19 changes: 19 additions & 0 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,22 @@ exports.getFirmwareClassification = (desc) => {

exports.latestFirmwareVersionArray = [1, 8, 0];
exports.latestFirmwareVersionString = '1.8.0';

/* Time zone modes */

exports.TIME_ZONE_MODE_UTC = 0;
exports.TIME_ZONE_MODE_LOCAL = 1;
exports.TIME_ZONE_MODE_CUSTOM = 2;
exports.TIME_ZONE_MODE_STRINGS = ['UTC', 'LOCAL', 'CUSTOM'];

/* Calculation values */

exports.UINT32_MAX = 0xFFFFFFFF;
exports.UINT16_MAX = 0xFFFF;

exports.MILLISECONDS_IN_SECOND = 1000;

exports.SECONDS_IN_MINUTE = 60;
exports.SECONDS_IN_DAY = 86400;

exports.MINUTES_IN_HOUR = 60;
25 changes: 23 additions & 2 deletions index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@font-face {
font-family: 'Ubuntu';
src: url('./ubuntu.mono.ttf');
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
Expand All @@ -13,6 +18,7 @@ input[type=number]::-webkit-outer-spin-button {

.table>tbody>tr>td,
.table>tbody>tr>th {
border-color: transparent;
border-top: none;
}

Expand All @@ -21,11 +27,12 @@ input[type=number]::-webkit-outer-spin-button {
}

.grey {
color:#808080;
color: #D3D3D3;
}

.mono-text {
font-variant-numeric: tabular-nums;
font-family: 'Ubuntu';
font-size: 27px;
}

input {
Expand All @@ -35,3 +42,17 @@ input {
span {
font-variant-numeric: tabular-nums;
}

.groupBorder {
border: #cdcdcd thin solid;
padding: 5px;
}

.leftElement {
margin-left: 16px;
}

.rightElement {
margin-right: 16px;
text-align: right;
}
Loading

0 comments on commit 6efc127

Please sign in to comment.