small QOL improvements (#37)

* feat: selected event if is first

* style: fix wrap

- remove wrap tag (broken in firefox)

* feat: add more text to notes

this is a quick fix and does not replace the real deal.
using a text input makes it difficult to edit, this should be revised with a textarea on note field

* upgrade electron

* Stage timer in /sm has placeholder when not running

* fix style issue where clock would move depending on whether there are events selected

* ensure ontime logo and text have a minimum readable size

* fix scrollbar styling

* clean debugging logs

* link to latest release

using gitreleases.dev service for this.
this is a temporary fix until we have a release (in opposition to pre-release) so we can use githubs latest link

* scale gracefully

* fixed error with naming of maxChar
This commit is contained in:
Carlos Valente
2021-11-09 22:31:55 +01:00
committed by GitHub
parent 207612e3b8
commit 8d8bbef546
12 changed files with 66 additions and 45 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
"license": "AGPL-3.0-only",
"main": "main.js",
"devDependencies": {
"electron": "^13.1.2",
"electron": "^13.6.1",
"electron-builder": "^22.11.3",
"eslint": "^7.26.0",
"eslint-config-airbnb": "^18.2.1",
+9 -2
View File
@@ -546,6 +546,9 @@ export class EventTimer extends Timer {
const events = eventlist.filter((e) => e.type === 'event');
const numEvents = events.length;
// is this the first event
let first = this.numEvents === 0;
// set general
this._eventlist = events;
this.numEvents = numEvents;
@@ -556,8 +559,11 @@ export class EventTimer extends Timer {
return;
}
// handle reload selected
if (this.selectedEventId != null) {
// auto load if is the only event
if (first) {
this.loadEvent(0);
} else if (this.selectedEventId != null) {
// handle reload selected
// Look for event (order might have changed)
const eventIndex = this._eventlist.findIndex(
(e) => e.id === this.selectedEventId
@@ -574,6 +580,7 @@ export class EventTimer extends Timer {
const type = this._startedAt != null ? 'reload' : 'load';
this.loadEvent(eventIndex, type);
}
this.broadcastState();
}
+1 -1
View File
@@ -1757,7 +1757,7 @@ electron-to-chromium@^1.3.878:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.884.tgz#0cd8c3a80271fd84a81f284c60fb3c9ecb33c166"
integrity sha512-kOaCAa+biA98PwH5BpCkeUeTL6mCeg8p3Q3OhqzPyqhu/5QUnWAN2wr/3IK8xMQxIV76kfoQpP+Bn/wij/jXrg==
electron@^13.1.2:
electron@^13.6.1:
version "13.6.1"
resolved "https://registry.yarnpkg.com/electron/-/electron-13.6.1.tgz#f61c4f269b57c7dc27e0d5476216a988caa9c752"
integrity sha512-rZ6Y7RberigruefQpWOiI4bA9ppyT88GQF8htY6N1MrAgal5RrBc+Mh92CcGU7zT9QO+XO3DarSgZafNTepffQ==