mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-26 09:29:10 +00:00
fix: issue with timer migration (#223)
* fix: issue with timer migration
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime-ui",
|
"name": "ontime-ui",
|
||||||
"version": "1.9.0",
|
"version": "1.9.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^2.3.2",
|
"@chakra-ui/react": "^2.3.2",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { TableSettingsContext } from '../../common/context/TableSettingsContext'
|
|||||||
import { useFetch } from '../../common/hooks/useFetch';
|
import { useFetch } from '../../common/hooks/useFetch';
|
||||||
import useFullscreen from '../../common/hooks/useFullscreen';
|
import useFullscreen from '../../common/hooks/useFullscreen';
|
||||||
import { useTimerProvider } from '../../common/hooks/useSocketProvider';
|
import { useTimerProvider } from '../../common/hooks/useSocketProvider';
|
||||||
import { formatDisplay } from '../../common/utils/dateConfig';
|
import { formatDisplay, millisToSeconds } from '../../common/utils/dateConfig';
|
||||||
import { formatTime } from '../../common/utils/time';
|
import { formatTime } from '../../common/utils/time';
|
||||||
import { tooltipDelayFast } from '../../ontimeConfig';
|
import { tooltipDelayFast } from '../../ontimeConfig';
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ import PlaybackIcon from './tableElements/PlaybackIcon';
|
|||||||
|
|
||||||
import style from './Table.module.scss';
|
import style from './Table.module.scss';
|
||||||
|
|
||||||
export default function TableHeader({handleCSVExport, featureData}) {
|
export default function TableHeader({ handleCSVExport, featureData }) {
|
||||||
const { followSelected, showSettings, toggleTheme, toggleSettings, toggleFollow } =
|
const { followSelected, showSettings, toggleTheme, toggleSettings, toggleFollow } =
|
||||||
useContext(TableSettingsContext);
|
useContext(TableSettingsContext);
|
||||||
const timer = useTimerProvider();
|
const timer = useTimerProvider();
|
||||||
@@ -32,11 +32,12 @@ export default function TableHeader({handleCSVExport, featureData}) {
|
|||||||
const selected = !featureData.numEvents
|
const selected = !featureData.numEvents
|
||||||
? 'No events'
|
? 'No events'
|
||||||
: `Event ${featureData.selectedEventIndex != null ? featureData.selectedEventIndex + 1 : '-'}/${
|
: `Event ${featureData.selectedEventIndex != null ? featureData.selectedEventIndex + 1 : '-'}/${
|
||||||
featureData.numEvents ? featureData.numEvents : '-'
|
featureData.numEvents ? featureData.numEvents : '-'
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
// prepare presentation variables
|
// prepare presentation variables
|
||||||
const timerNow = `${timer.running < 0 ? '-' : ''}${formatDisplay(timer.running)}`;
|
const isOvertime = timer.current < 0;
|
||||||
|
const timerNow = `${isOvertime ? '-' : ''}${formatDisplay(millisToSeconds(timer.current))}`;
|
||||||
const timeNow = formatTime(timer.clock, {
|
const timeNow = formatTime(timer.clock, {
|
||||||
showSeconds: true,
|
showSeconds: true,
|
||||||
format: 'hh:mm:ss a',
|
format: 'hh:mm:ss a',
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime",
|
"name": "ontime",
|
||||||
"version": "1.9.0",
|
"version": "1.9.1",
|
||||||
"author": "Carlos Valente",
|
"author": "Carlos Valente",
|
||||||
"description": "Time keeping for live events",
|
"description": "Time keeping for live events",
|
||||||
"repository": "https://github.com/cpvalente/ontime",
|
"repository": "https://github.com/cpvalente/ontime",
|
||||||
|
|||||||
Reference in New Issue
Block a user