mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-03 06:28:01 +00:00
Compare commits
5 Commits
v2.0.0-beta1
...
v.1.10.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 974a239b67 | |||
| 48bfe477f0 | |||
| 7d2b88b626 | |||
| 409bc65427 | |||
| 0ff6556e4d |
@@ -188,3 +188,4 @@ jobs:
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ontime:${{ env.RELEASE_VERSION }} , ${{ secrets.DOCKERHUB_USERNAME }}/ontime:latest
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime-ui",
|
||||
"version": "1.9.7",
|
||||
"version": "1.9.9",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@chakra-ui/react": "^2.3.2",
|
||||
|
||||
@@ -11,6 +11,7 @@ export const useFetch = (namespace, fn) => {
|
||||
const { data, status, isError, refetch } = useQuery(namespace, fn, {
|
||||
refetchInterval: refetchIntervalMs,
|
||||
cacheTime: Infinity,
|
||||
networkMode: 'always',
|
||||
});
|
||||
|
||||
return { data, status, isError, refetch };
|
||||
|
||||
@@ -9,6 +9,7 @@ import { EVENTS_TABLE } from '../api/apiConstants';
|
||||
export default function useMutateEvents(mutation){
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation(mutation, {
|
||||
networkMode: 'always',
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
queryClient.cancelQueries(EVENTS_TABLE, { exact: true });
|
||||
|
||||
@@ -30,6 +30,7 @@ export default function EventListWrapper() {
|
||||
const [events, setEvents] = useState(null);
|
||||
|
||||
const addEvent = useMutation(requestPost, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -76,6 +77,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const updateEvent = useMutation(requestPut, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -103,6 +105,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const patchEvent = useMutation(requestPatch, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (newEvent) => {
|
||||
// cancel ongoing queries
|
||||
@@ -134,6 +137,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const deleteEvent = useMutation(requestDelete, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (eventId) => {
|
||||
// cancel ongoing queries
|
||||
@@ -163,6 +167,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const deleteAllEvents = useMutation(requestDeleteAll, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async () => {
|
||||
// cancel ongoing queries
|
||||
@@ -192,6 +197,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const applyDelay = useMutation(requestApplyDelay, {
|
||||
networkMode: 'always',
|
||||
// Mutation finished, failed or successful
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries(EVENTS_TABLE);
|
||||
@@ -199,6 +205,7 @@ export default function EventListWrapper() {
|
||||
});
|
||||
|
||||
const reorderEvent = useMutation(requestReorder, {
|
||||
networkMode: 'always',
|
||||
// we optimistically update here
|
||||
onMutate: async (data) => {
|
||||
// cancel ongoing queries
|
||||
|
||||
@@ -23,8 +23,17 @@ const formatOptions = {
|
||||
export default function Timer(props) {
|
||||
const { general, pres, title, time, viewSettings } = props;
|
||||
const { shouldRender } = useRuntimeStylesheet(viewSettings?.overrideStyles && overrideStylesURL);
|
||||
const [elapsed, setElapsed] = useState(true);
|
||||
|
||||
const [searchParams] = useSearchParams();
|
||||
const [elapsed, setElapsed] = useState(() => {
|
||||
// eg. http://localhost:3000/timer?progress=up
|
||||
// Check for user options
|
||||
// progress: selector
|
||||
// Should be 'up' or 'down'
|
||||
const progress = searchParams.get('progress');
|
||||
return progress === 'up';
|
||||
});
|
||||
|
||||
const [isMirrored] = useAtom(mirrorViewersAtom);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -36,17 +45,6 @@ export default function Timer(props) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// eg. http://localhost:3000/timer?progress=up
|
||||
// Check for user options
|
||||
// progress: selector
|
||||
// Should be 'up' or 'down'
|
||||
const progress = searchParams.get('progress');
|
||||
if (progress === 'up') {
|
||||
setElapsed(true);
|
||||
} else if (progress === 'down') {
|
||||
setElapsed(false);
|
||||
}
|
||||
|
||||
const clock = formatTime(time.clock, formatOptions);
|
||||
const showOverlay = pres.text !== '' && pres.visible;
|
||||
const isPlaying = time.playstate !== 'pause';
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime",
|
||||
"version": "1.9.7",
|
||||
"version": "1.10.2",
|
||||
"author": "Carlos Valente",
|
||||
"description": "Time keeping for live events",
|
||||
"repository": "https://github.com/cpvalente/ontime",
|
||||
|
||||
Reference in New Issue
Block a user