Update web app routes and branding.
This commit is contained in:
parent
357c74ae10
commit
43057351b9
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bot.z_web",
|
"name": "bot.z_web",
|
||||||
"version": "0.1.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "^4.3.1",
|
"bootstrap": "^4.3.1",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 59 KiB |
|
@ -19,7 +19,7 @@
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
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`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>React App</title>
|
<title>BotZ</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"short_name": "React App",
|
"short_name": "BotZ",
|
||||||
"name": "Create React App Sample",
|
"name": "BotZ web interface",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "favicon.ico",
|
"src": "favicon.ico",
|
||||||
|
|
|
@ -2,17 +2,15 @@ import React from 'react';
|
||||||
import IndexPage from './IndexPage.js';
|
import IndexPage from './IndexPage.js';
|
||||||
|
|
||||||
|
|
||||||
const targetUrl = "http://localhost:3003"
|
|
||||||
|
|
||||||
class App extends React.Component {
|
class App extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {targetUrl: targetUrl, loggedIn: false}
|
this.state = {targetUrl: props.targetUrl, loggedIn: false}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
fetch(this.targetUrl, {credentials: 'include'})
|
fetch(this.targetUrl + '/status', {credentials: 'include'})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => this.setState({loggedIn: data.logged_in}));
|
.then(data => this.setState({loggedIn: data.logged_in}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,12 @@ import './index.css';
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import * as serviceWorker from './serviceWorker';
|
import * as serviceWorker from './serviceWorker';
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById('root'));
|
|
||||||
|
const targetUrl = "/api";
|
||||||
|
// // Dev address //
|
||||||
|
// const targetUrl = "http://localhost:3003/api";
|
||||||
|
|
||||||
|
ReactDOM.render(<App targetUrl={targetUrl}/>, document.getElementById('root'));
|
||||||
|
|
||||||
// If you want your app to work offline and load faster, you can change
|
// If you want your app to work offline and load faster, you can change
|
||||||
// unregister() to register() below. Note this comes with some pitfalls.
|
// unregister() to register() below. Note this comes with some pitfalls.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user