mirror of
https://github.com/Wessel/Roommapper.git
synced 2026-07-23 08:17:12 +02:00
docs: Add to devlog
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 15 KiB |
@@ -24,7 +24,7 @@
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
<title>Roommapper</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
|
||||
@@ -37,7 +37,8 @@ export default class ControlField extends React.Component {
|
||||
body: JSON.stringify({ task: task })
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => this.setState({ result: JSON.stringify(data) }))
|
||||
.then(data => this.setState({
|
||||
result: data.message ? data.message : JSON.stringify(data) }))
|
||||
.catch(this.handleError);
|
||||
}
|
||||
|
||||
@@ -45,9 +46,24 @@ export default class ControlField extends React.Component {
|
||||
return (
|
||||
<div className='control'>
|
||||
<div className='control-buttons'>
|
||||
<Button type='primary' onClick={() => this.handleClick(tasks.START)}>Start</Button>
|
||||
<Button type='primary' onClick={() => this.handleClick(tasks.MAP)}>Map</Button>
|
||||
<Button type='primary' danger onClick={() => this.handleClick(tasks.STOP)}>Stop</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => this.handleClick(tasks.START)}
|
||||
>
|
||||
Start
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => this.handleClick(tasks.MAP)}
|
||||
>
|
||||
Map
|
||||
</Button>
|
||||
<Button
|
||||
type='primary' danger
|
||||
onClick={() => this.handleClick(tasks.STOP)}
|
||||
>
|
||||
Stop
|
||||
</Button>
|
||||
</div>
|
||||
<Card
|
||||
className='output-field'
|
||||
|
||||
@@ -34,11 +34,16 @@ const App = () => {
|
||||
}}
|
||||
theme='dark'
|
||||
>
|
||||
<Menu theme="dark" mode="inline" defaultSelectedKeys={['map']} items={menuItems} />
|
||||
<Menu
|
||||
theme="dark"
|
||||
mode="inline"
|
||||
defaultSelectedKeys={['map']}
|
||||
items={menuItems}
|
||||
/>
|
||||
</Sider>
|
||||
<Layout
|
||||
theme='dark'
|
||||
style={{ marginLeft: 200 }}
|
||||
theme='dark'
|
||||
style={{ marginLeft: 200 }}
|
||||
>
|
||||
<Content
|
||||
style={{ margin: '24px 16px 0', overflow: 'initial' }}
|
||||
|
||||
@@ -33,7 +33,7 @@ export default class MapCanvas extends React.Component {
|
||||
this.draw();
|
||||
}
|
||||
|
||||
async getLinePoints(search = 'id', field = '8a97354d-d4ac-43c6-8b32-528cc24e3ede') {
|
||||
async getLinePoints() {
|
||||
try {
|
||||
const { searchOption, inputValue } = this.state;
|
||||
const url = `${API_ENDPOINT}/database?${searchOption}=${inputValue}`;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
}
|
||||
|
||||
.map-canvas {
|
||||
border: 1px solid red;
|
||||
border: 2px solid #008080;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.map-choice {
|
||||
|
||||
Reference in New Issue
Block a user