From d22cc48565a682d82d957d13e6dc9f63a42bcf60 Mon Sep 17 00:00:00 2001
From: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
Date: Wed, 6 Mar 2024 22:42:20 +0100
Subject: [PATCH] refactor: small tweaks and fixes
---
README.md | 23 ++--
.../components/input/time-input/TimeInput.tsx | 5 +-
.../common/components/state/Empty.module.scss | 2 +-
.../src/common/components/state/Empty.tsx | 4 +-
.../common/utils/__tests__/dateConfig.test.js | 1 +
apps/client/src/common/utils/dateConfig.ts | 6 +-
apps/client/src/externals.ts | 2 +-
.../panel/about-panel/AboutPanel.tsx | 4 +-
.../panel/general-panel/ViewSettingsForm.tsx | 2 +-
.../integrations-panel/IntegrationsPanel.tsx | 2 +-
.../panel/project-panel/ProjectCreateForm.tsx | 2 +-
.../panel/project-panel/ProjectData.tsx | 2 +-
.../ProjectSettingsPanel.tsx | 2 +-
.../panel/sources-panel/GSheetInfo.tsx | 2 +-
.../timer-display/TimerDisplay.module.scss | 2 +-
.../playback/timer-display/TimerDisplay.tsx | 2 +-
.../src/features/editors/Editor.module.scss | 3 +-
.../modals/settings-modal/AliasesForm.tsx | 2 +-
.../modals/settings-modal/ProjectDataForm.tsx | 2 +-
.../client/src/features/overview/Overview.tsx | 34 ++++--
apps/client/src/features/rundown/Rundown.tsx | 2 +-
.../src/features/rundown/RundownEmpty.tsx | 2 +-
.../src/features/rundown/RundownEntry.tsx | 6 +-
.../rundown/RundownExport.module.scss | 10 +-
.../rundown/common/EditableBlockTitle.tsx | 42 +++----
.../event-block/EventBlock.module.scss | 37 +++---
.../rundown/event-block/EventBlock.tsx | 8 +-
.../rundown/event-block/EventBlockInner.tsx | 20 ++--
.../event-block/RundownIndicators.module.scss | 1 +
.../composite/EventBlockPlayback.tsx | 15 ++-
.../EventBlockProgressBar.module.scss | 17 +--
.../composite/EventBlockProgressBar.tsx | 11 +-
.../event-editor/EventEditor.module.scss | 1 +
.../composite/EventEditorTimes.tsx | 2 +-
.../rundown/rundown-header/RundownHeader.tsx | 9 +-
.../time-input-flow/TimeInputFlow.module.scss | 1 +
.../src/features/viewers/timer/Timer.scss | 13 ++
.../src/features/viewers/timer/Timer.tsx | 3 +-
apps/client/src/index.scss | 15 ++-
apps/client/src/theme/_viewerCommon.scss | 4 -
apps/client/src/theme/ontimeTextInputs.ts | 13 ++
apps/client/src/theme/theme.ts | 2 +
apps/electron/package.json | 6 +-
apps/electron/src/menu/applicationMenu.js | 8 +-
.../api-integration/integration.controller.ts | 8 +-
apps/server/src/external/demo/app.js | 2 +-
apps/server/src/external/demo/index.html | 4 +-
apps/server/src/index.ts | 1 +
apps/server/src/services/TimerService.ts | 5 +-
.../src/services/__tests__/timerUtils.test.ts | 113 ++++++++++++++++++
.../project-service/ProjectService.ts | 7 ++
.../runtime-service/RuntimeService.ts | 5 +-
apps/server/src/services/timerUtils.ts | 17 ++-
apps/server/src/setup/index.ts | 3 +-
apps/server/src/setup/loadDb.ts | 35 ++++--
.../src/stores/__tests__/runtimeState.test.ts | 2 +-
apps/server/src/stores/runtimeState.ts | 16 ++-
apps/server/src/utils/parser.ts | 6 +-
e2e/tests/000-upload-showfile.spec.ts | 13 +-
e2e/tests/features/203-delay-block.spec.ts | 8 +-
.../src/definitions/runtime/Runtime.type.ts | 2 +-
61 files changed, 401 insertions(+), 198 deletions(-)
diff --git a/README.md b/README.md
index c0fd400e2..4c6aa97e4 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
[](https://github.com/cpvalente/ontime/actions/workflows/build_v2.yml)
-[](https://www.gnu.org/licenses/gpl-3.0) [](https://ontime.gitbook.io)
+[](https://www.gnu.org/licenses/gpl-3.0)
## Download the latest releases here
@@ -24,6 +24,8 @@ outputs.

+[Read the docs to learn more](https://docs.getontime.no)
+
## Using Ontime
Once installed and running, Ontime starts a background server that is the heart of all processes.
@@ -59,7 +61,7 @@ IP.ADDRESS:4001/editor > the control interface, same as the app
IP.ADDRESS:4001/cuesheet > realtime cuesheets for collaboration
```
-More documentation is available [in our docs](https://ontime.gitbook.io)
+More documentation is available [in our docs](https://docs.getontime.no)
## Feature List (in no specific order)
@@ -84,7 +86,7 @@ More documentation is available [in our docs](https://ontime.gitbook.io)
- WebSockets
- [x] Roll mode: run standalone using the system clock
- [x] [Headless run](#headless-run): run server in a separate machine, configure from a browser locally
-- [x] [Countdown to anything!](https://ontime.gitbook.io/v2/views/countdown): have
+- [x] [Countdown to anything!](https://docs.getontime.no/features/count-to-anything/): have
a countdown to any scheduled event
- [x] Multi-platform (available on Windows, MacOS and Linux)
- [x] [Companion integration](https://bitfocus.io/connections/getontime-ontime)
@@ -120,9 +122,14 @@ Ontime broadcasts its data over WebSockets. This allows you to consume its data
Writing a new view for the browser can be done with basic knowledge of HTML + CSS + Javascript (or any other language
that can run in the browser).
-See [this repository](https://github.com/cpvalente/ontime-viewer-template-v2) with a small template on
-how to get you started and read the docs about
-the [Websocket API](https://ontime.gitbook.io/v2/control-and-feedback/ontime-apis#osc-and-websocket-api)
+We have prepared a few resources to help here:
+- Shipped with Ontime there is a small clock to get you started, it is available at `http://localhost:4001/external/demo` and the [code can be found here](https://github.com/cpvalente/ontime/tree/master/apps/server/src/external/demo)
+- See [this repository](https://github.com/cpvalente/ontime-viewer-template-v2) with a template on
+how to get you started
+- See information about the [Websocket API](https://docs.getontime.no/api/osc-and-ws/)
+
+More information [in the docs](https://docs.getontime.no/features/custom-views/)
+
### Headless runī¸
@@ -130,7 +137,7 @@ You can self-host and run Ontime in a docker image.
The docker image along with documentation is [available Docker Hub at getontime/ontime](https://hub.docker.com/r/getontime/ontime)
-If you want to run this image in a Raspberry Pi, please see [the docs](https://ontime.gitbook.io/v2/additional-notes/use-in-raspberry-pi)
+If you want to run this image in a Raspberry Pi, please see [the docs](https://docs.getontime.no/additional-notes/use-with-rpi/)
## Roadmap
@@ -192,7 +199,7 @@ Information about the project setup can be found in the [development documentati
# Help
-Help is underway! ... and can be found [here](https://ontime.gitbook.io)
+Help is underway! ... and can be found [here](https://docs.getontime.no)
# License
diff --git a/apps/client/src/common/components/input/time-input/TimeInput.tsx b/apps/client/src/common/components/input/time-input/TimeInput.tsx
index b9de8e013..0e8d41bdd 100644
--- a/apps/client/src/common/components/input/time-input/TimeInput.tsx
+++ b/apps/client/src/common/components/input/time-input/TimeInput.tsx
@@ -91,9 +91,6 @@ export default function TimeInput(props: TimeInputProps) {
(event: KeyboardEvent) => {
if (event.key === 'Enter') {
inputRef.current?.blur();
- validateAndSubmit((event.target as HTMLInputElement).value);
- } else if (event.key === 'Tab') {
- validateAndSubmit((event.target as HTMLInputElement).value);
}
if (event.key === 'Escape') {
ignoreChange.current = true;
@@ -101,7 +98,7 @@ export default function TimeInput(props: TimeInputProps) {
resetValue();
}
},
- [resetValue, validateAndSubmit],
+ [resetValue],
);
const onBlurHandler = useCallback(
diff --git a/apps/client/src/common/components/state/Empty.module.scss b/apps/client/src/common/components/state/Empty.module.scss
index 43f5c15af..193862ebc 100644
--- a/apps/client/src/common/components/state/Empty.module.scss
+++ b/apps/client/src/common/components/state/Empty.module.scss
@@ -1,7 +1,7 @@
.emptyContainer {
width: 100%;
text-align: center;
- color: $gray-1350;
+ color: $white-10;
.empty {
width: 100%;
diff --git a/apps/client/src/common/components/state/Empty.tsx b/apps/client/src/common/components/state/Empty.tsx
index cd5f18873..e44146b84 100644
--- a/apps/client/src/common/components/state/Empty.tsx
+++ b/apps/client/src/common/components/state/Empty.tsx
@@ -5,7 +5,7 @@ import EmptyImage from '../../../assets/images/empty.svg?react';
import style from './Empty.module.scss';
interface EmptyProps {
- text: string;
+ text?: string;
style?: CSSProperties;
}
@@ -14,7 +14,7 @@ export default function Empty(props: EmptyProps) {
return (