From 55f897b0bd1e71646701f69d8651c7917276655e Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Mon, 14 Jun 2021 15:05:08 +0200 Subject: [PATCH] Small Improvements - update UI on delete all - fix license --- README.md | 1 + client/src/features/info/Info.jsx | 20 +++++++++++++------- client/src/features/info/Info.module.css | 3 ++- client/src/features/info/InfoNif.jsx | 1 + server/package.json | 2 +- server/src/classes/EventTimer.js | 3 +++ 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a1dea0380..b45bd566e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Almost reaching a feature set that we can call v1. Before that: - [ ] Linux version - [ ] Companion integration - [ ] Lower Third Manager +- [ ] Note only event - [ ] URL Aliases (define configurable aliases to ease onsite setup) - [ ] Logging view - [ ] Reach Schedule: way to speedup timer to meet a deadline diff --git a/client/src/features/info/Info.jsx b/client/src/features/info/Info.jsx index 445dfdf51..4f0f51e18 100644 --- a/client/src/features/info/Info.jsx +++ b/client/src/features/info/Info.jsx @@ -18,7 +18,7 @@ export default function Info() { presenterNext: '', noteNext: '', }); - const [selected, setSelected] = useState('-/-'); + const [selected, setSelected] = useState('No events'); const logData = []; // handle incoming messages @@ -38,11 +38,14 @@ export default function Info() { // Handle selection data socket.on('selected', (data) => { - const formatedCurrent = `Event ${ - data.index != null ? data.index + 1 : '-' - }/${data.total != null ? data.total : '-'}`; - - setSelected(formatedCurrent); + if (data.total === 0 || data.total == null) { + setSelected('No events'); + } else { + const formatedCurrent = `Event ${ + data.index != null ? data.index + 1 : '-' + }/${data.total != null ? data.total : '-'}`; + setSelected(formatedCurrent); + } }); // Clear listener @@ -70,7 +73,10 @@ export default function Info() { return ( <> -