mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 12:29:10 +00:00
cleanup
- remove unused components - cleanup style
This commit is contained in:
@@ -22,7 +22,7 @@ export default function EditableText(props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.block} {...rest}>
|
<div className={style.block}>
|
||||||
<span className={style.title}>{label}</span>
|
<span className={style.title}>{label}</span>
|
||||||
<Editable
|
<Editable
|
||||||
onChange={(v) => handleChange(v)}
|
onChange={(v) => handleChange(v)}
|
||||||
@@ -30,6 +30,7 @@ export default function EditableText(props) {
|
|||||||
value={text}
|
value={text}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
className={style.inline}
|
className={style.inline}
|
||||||
|
{...rest}
|
||||||
>
|
>
|
||||||
<EditablePreview
|
<EditablePreview
|
||||||
color={text === '' ? '#666' : 'inherit'}
|
color={text === '' ? '#666' : 'inherit'}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
|
|
||||||
import { lazy, useEffect } from 'react';
|
import { lazy, useEffect } from 'react';
|
||||||
import { Heading } from '@chakra-ui/layout';
|
|
||||||
import { Box } from '@chakra-ui/layout';
|
import { Box } from '@chakra-ui/layout';
|
||||||
import { useDisclosure } from '@chakra-ui/hooks';
|
import { useDisclosure } from '@chakra-ui/hooks';
|
||||||
import styles from './Editor.module.css';
|
import styles from './Editor.module.css';
|
||||||
import NumberedText from 'common/components/text/NumberedText';
|
|
||||||
import SettingsModal from 'features/modals/SettingsModal';
|
import SettingsModal from 'features/modals/SettingsModal';
|
||||||
import MenuBar from 'features/menu/MenuBar';
|
import MenuBar from 'features/menu/MenuBar';
|
||||||
|
|
||||||
@@ -53,9 +50,11 @@ export default function Editor() {
|
|||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.info} borderRadius='0.5em' overflowX='auto'>
|
<Box className={styles.info}>
|
||||||
<h1>Info</h1>
|
<h1>Info</h1>
|
||||||
<div className={styles.content}></div>
|
<div className={styles.content}>
|
||||||
|
<Info />
|
||||||
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -161,10 +161,6 @@ const CollapsedBlock = (props) => {
|
|||||||
|
|
||||||
export default function EventBlock(props) {
|
export default function EventBlock(props) {
|
||||||
const { data, selected, delay, index, eventIndex, actionHandler } = props;
|
const { data, selected, delay, index, eventIndex, actionHandler } = props;
|
||||||
|
|
||||||
// const [collapsed, setCollapsed] = useState(checkLocalStorage(data.id));
|
|
||||||
|
|
||||||
// const collapsed = useSelector(itemsAtom, (state) => state === data.id);
|
|
||||||
const [collapsed] = useAtom(
|
const [collapsed] = useAtom(
|
||||||
useMemo(() => SelectCollapse(data.id), [data.id])
|
useMemo(() => SelectCollapse(data.id), [data.id])
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
grid-template-columns: 2em 2em auto auto 1fr auto 3.7em;
|
grid-template-columns: 2em 2em auto auto 1fr auto 3.7em;
|
||||||
grid-template-areas: 'drag indi time time text more btns';
|
grid-template-areas: 'drag indi time time text more btns';
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: baseline;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.expanded {
|
.expanded {
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ import HelpIconBtn from './buttons/HelpIconBtn';
|
|||||||
import UploadIconBtn from './buttons/UploadIconBtn';
|
import UploadIconBtn from './buttons/UploadIconBtn';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
|
|
||||||
const { ipcRenderer } = window.require('electron');
|
// const { ipcRenderer } = window.require('electron');
|
||||||
|
// import { ipcRenderer, remote }from 'electron';
|
||||||
|
|
||||||
export default function MenuBar(props) {
|
export default function MenuBar(props) {
|
||||||
const { onOpen } = props;
|
const { onOpen } = props;
|
||||||
@@ -47,21 +48,23 @@ export default function MenuBar(props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleIPC = (action) => {
|
const handleIPC = (action) => {
|
||||||
switch (action) {
|
if (window.process.type === 'renderer') {
|
||||||
case 'min':
|
switch (action) {
|
||||||
ipcRenderer.send('set-window', 'to-tray');
|
case 'min':
|
||||||
break;
|
window.ipcRenderer.send('set-window', 'to-tray');
|
||||||
case 'max':
|
break;
|
||||||
ipcRenderer.send('set-window', 'to-max');
|
case 'max':
|
||||||
break;
|
window.ipcRenderer.send('set-window', 'to-max');
|
||||||
case 'shutdown':
|
break;
|
||||||
ipcRenderer.send('shutdown', 'now');
|
case 'shutdown':
|
||||||
break;
|
window.ipcRenderer.send('shutdown', 'now');
|
||||||
case 'help':
|
break;
|
||||||
ipcRenderer.send('send-to-link', 'help');
|
case 'help':
|
||||||
break;
|
window.ipcRenderer.send('send-to-link', 'help');
|
||||||
default:
|
break;
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
window.require = require;
|
window.ipcRenderer = require('electron').ipcRenderer;
|
||||||
|
|||||||
+1
-1
@@ -33,6 +33,7 @@ const nodePath =
|
|||||||
// Start OSC Client (Feedback)
|
// Start OSC Client (Feedback)
|
||||||
startOSCClient();
|
startOSCClient();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
loaded = error;
|
loaded = error;
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
@@ -122,7 +123,6 @@ function createWindow() {
|
|||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
createWindow();
|
createWindow();
|
||||||
|
|
||||||
/* ======================================
|
/* ======================================
|
||||||
* CONTEXT MENU CREATION ON REACT SIDE
|
* CONTEXT MENU CREATION ON REACT SIDE
|
||||||
// Create context menu
|
// Create context menu
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ export const getInfo = async (req, res) => {
|
|||||||
res.status(200).send({
|
res.status(200).send({
|
||||||
networkInterfaces: ni,
|
networkInterfaces: ni,
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// Create controller for POST request to '/ontime/db'
|
// Create controller for POST request to '/ontime/db'
|
||||||
// Returns -
|
// Returns -
|
||||||
@@ -184,5 +185,4 @@ export const dbPathToUpload = async (req, res) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
upload(req.body.path, req, res);
|
upload(req.body.path, req, res);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user