1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

wait for auth with cute doggy

This commit is contained in:
irismarie 2021-02-23 11:44:51 +01:00
parent 0ab78cc40f
commit a31a82292a
3 changed files with 10 additions and 13 deletions

BIN
src/img/dog-waiting-bw.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -112,6 +112,13 @@ body {
}
}
.verticalhorizontal {
display: flex;
justify-content: center;
align-items: center;
height: 800px;
}
/**
* Menus
*/

View file

@ -21,10 +21,6 @@ import AppDispatcher from '../common/app-dispatcher';
import LoginStore from './login-store'
import { Container } from 'flux/utils';
import NotificationsDataManager from '../common/data-managers/notifications-data-manager';
import NotificationsFactory from "../common/data-managers/notifications-factory";
class LoginComplete extends React.Component {
constructor(props) {
@ -83,9 +79,7 @@ class LoginComplete extends React.Component {
}
countDown() {
console.log("count down, seconds:");
let seconds = this.state.secondsToWait - 1;
console.log(seconds);
this.setState({secondsToWait: seconds});
// waiting time over, stop counting down
@ -95,20 +89,16 @@ class LoginComplete extends React.Component {
}
render() {
console.log("render, seconds to wait:");
console.log(this.state.secondsToWait);
if (this.state.currentUser && this.state.currentUser !== "") {
console.log("user:");
console.log(this.state.currentUser);
this.stopTimer();
return (<Redirect to="/home" />);
}
else if (this.state.secondsToWait == 0) {
this.stopTimer();
return (<Redirect to="/login" />);
} else { // authenticating failed
//NotificationsFactory.LOAD_ERROR('Backend did not return user after external auth');
return (<p>Authenticating.. {this.state.secondsToWait}</p>);
} else {
return (<div class="verticalhorizontal">
<img style={{height: 300}}src={require('../img/dog-waiting-bw.jpg').default} alt="Waiting Dog" /></div>);
}
}
}