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