Improve the web viewer UI [WIP] (#333)

* functional but style is bad

* banner. sidebar. tabs for controls/scene/camera_path/logs. websocket text field

* moved window. toggle scene button. next step: lint/clean code

* websocket and webrtc reconnection on url change

* reconnection on websocket change seems robust

* cleaned up errors and organized code

* fixing lint
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-09-06 00:36:48 -07:00
1 parent 32517f4587
commit 4c77c4e7c0
28 files changed
+1136 -294

No files matched your search

@@ -0,0 +1,30 @@
import * as React from 'react';
import { TextField } from '@mui/material';
import { useDispatch, useSelector } from 'react-redux';
export default function WebSocketUrlField() {
const websocket_url = useSelector(
(state) => state.websocketState.websocket_url,
);
const dispatch = useDispatch();
const websocket_url_onchange = (event) => {
const value = event.target.value;
dispatch({
type: 'write',
path: 'websocketState/websocket_url',
data: value,
});
};
return (
<TextField
className="WebSocketUrlField"
label="WebSocket URL"
variant="outlined"
value={websocket_url}
onChange={websocket_url_onchange}
/>
);
}