From 21590435e719fb7059ba85357043b22a10eb579c Mon Sep 17 00:00:00 2001 From: Blallo Date: Tue, 6 Aug 2019 14:04:27 +0200 Subject: [PATCH] Improved styling in web app. --- bot.z_web/src/Badge.js | 19 +++++++++++-------- bot.z_web/src/IndexPage.js | 6 ++++-- bot.z_web/src/LoginForm.js | 37 ++++++++++++++++++++----------------- bot.z_web/src/Logoff.js | 21 +++++++++++---------- bot.z_web/src/ModalBox.js | 22 ++++++++++++++++++++++ bot.z_web/src/Movements.js | 16 ++++++---------- 6 files changed, 74 insertions(+), 47 deletions(-) create mode 100644 bot.z_web/src/ModalBox.js diff --git a/bot.z_web/src/Badge.js b/bot.z_web/src/Badge.js index b502d80..7338db6 100644 --- a/bot.z_web/src/Badge.js +++ b/bot.z_web/src/Badge.js @@ -1,6 +1,7 @@ import React from 'react'; +import ModalBox from './ModalBox.js'; +import { Button, Spinner } from 'react-bootstrap'; import './App.css'; -import './bootstrap.min.css'; function isCheckedIn(movements) { @@ -68,15 +69,17 @@ class BadgePage extends React.Component { dynButton() { const badge = ( -
- -
+ {this.buttonValue()}} + /> ); const loading = -
- Loading... -
; + + />; if (this.state.loading) { return loading; @@ -89,7 +92,7 @@ class BadgePage extends React.Component { if (this.state.loggedIn) { return this.dynButton(); } else { - return (

You have to login first!

); + return (You have to login first! />); } } } diff --git a/bot.z_web/src/IndexPage.js b/bot.z_web/src/IndexPage.js index d41ac92..411f48b 100644 --- a/bot.z_web/src/IndexPage.js +++ b/bot.z_web/src/IndexPage.js @@ -1,6 +1,6 @@ import React from 'react'; import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; -import {Nav, Navbar} from "react-bootstrap"; +import { Nav, Navbar, Container } from "react-bootstrap"; import LoginForm from './LoginForm.js'; import MovementsPage from './Movements.js'; import BadgePage from './Badge.js'; @@ -27,7 +27,7 @@ class IndexPage extends React.Component { BotZ -