mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +00:00
fix issue with vite migration (#217)
* hotfix: 1.8.2 issues vite migration * fix: file import options
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime-ui",
|
"name": "ontime-ui",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^2.3.2",
|
"@chakra-ui/react": "^2.3.2",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class ErrorBoundary extends React.Component {
|
|||||||
render() {
|
render() {
|
||||||
if (this.state.errorMessage) {
|
if (this.state.errorMessage) {
|
||||||
return (
|
return (
|
||||||
<div className={style.errorContainer}>
|
<div className={style.errorContainer} data-testid="error-container">
|
||||||
<div>
|
<div>
|
||||||
<p className={style.error}>:/</p>
|
<p className={style.error}>:/</p>
|
||||||
<p>Something went wrong</p>
|
<p>Something went wrong</p>
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
import { memo, useEffect, useState } from 'react';
|
import { memo, useEffect, useState } from 'react';
|
||||||
|
import isEqual from 'react-fast-compare';
|
||||||
import { useSearchParams } from 'react-router-dom';
|
import { useSearchParams } from 'react-router-dom';
|
||||||
|
import { overrideStylesURL } from 'common/api/apiConstants';
|
||||||
|
import { useRuntimeStylesheet } from 'common/hooks/useRuntimeStylesheet';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import { overrideStylesURL } from '../../../common/api/apiConstants';
|
|
||||||
import { useRuntimeStylesheet } from '../../../common/hooks/useRuntimeStylesheet';
|
|
||||||
|
|
||||||
import LowerClean from './LowerClean';
|
import LowerClean from './LowerClean';
|
||||||
import LowerLines from './LowerLines';
|
import LowerLines from './LowerLines';
|
||||||
|
|
||||||
const isEqual = require('react-fast-compare');
|
|
||||||
|
|
||||||
const areEqual = (prevProps, nextProps) => {
|
const areEqual = (prevProps, nextProps) => {
|
||||||
return isEqual(prevProps.title, nextProps.title) && isEqual(prevProps.lower, nextProps.lower);
|
return isEqual(prevProps.title, nextProps.title) && isEqual(prevProps.lower, nextProps.lower);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ describe('validate routes', () => {
|
|||||||
cy.contains('Info');
|
cy.contains('Info');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('renders lower third with no errors', () => {
|
||||||
|
cy.visit('http://localhost:4001/lower');
|
||||||
|
cy.get('[data-testid="error-container"]').should('not.exist');
|
||||||
|
});
|
||||||
|
|
||||||
it('renders studio clock', () => {
|
it('renders studio clock', () => {
|
||||||
cy.visit('http://localhost:4001/studio');
|
cy.visit('http://localhost:4001/studio');
|
||||||
cy.contains('ON AIR');
|
cy.contains('ON AIR');
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime",
|
"name": "ontime",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"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",
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ const uploadAndParse = async (file, req, res, options) => {
|
|||||||
} else if (result.message === 'success') {
|
} else if (result.message === 'success') {
|
||||||
// explicitly write objects
|
// explicitly write objects
|
||||||
if (typeof result !== 'undefined') {
|
if (typeof result !== 'undefined') {
|
||||||
if (!options.onlyEvents) {
|
const uploadAll = options?.onlyEvents === 'false';
|
||||||
|
if (uploadAll) {
|
||||||
const mergedData = DataProvider.safeMerge(data, result.data);
|
const mergedData = DataProvider.safeMerge(data, result.data);
|
||||||
data.event = mergedData.event;
|
data.event = mergedData.event;
|
||||||
data.settings = mergedData.settings;
|
data.settings = mergedData.settings;
|
||||||
|
|||||||
+1282
-1564
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user