Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added client/src/assets/FistsBumping2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions client/src/components/Home.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Header from "./Header"
import SuperheroName from "./SuperheroName"
import SendFiles from "./SendFiles"
import "../styles/button.css";
import "../styles/containers.css";
Expand Down Expand Up @@ -175,7 +174,10 @@ class Home extends React.Component {
date: sensorData.date,
}

APIsend(clientData);
// Enable Spinner while we wait for the APIsend
this.setState({showSpinner: true})
setTimeout(() => {this.setState({showSpinner: false})}, 1000)
APIsend(clientData)

// Update Upload Speed
this.senderInterval = setInterval(() => {
Expand Down Expand Up @@ -250,7 +252,6 @@ class Home extends React.Component {
return (
<div className="App">
{this.state.appState == "Choosing" && <Header />}
{this.state.appState == "Choosing" && <SuperheroName />}

{(this.state.appState == "Choosing" || this.state.appState == "ReadyToSend") &&
<SendFiles
Expand All @@ -273,7 +274,8 @@ class Home extends React.Component {
<WaitForBumpSender
bumpCallback={this.senderBumpCallback}
senderAccPermission={this.state.accPermission}
senderLocationArr = {this.state.locationArr} />
senderLocationArr = {this.state.locationArr}
showSpinner={this.state.showSpinner} />
)}

{this.state.appState == "Choosing" && !this.state.showSpinner && (
Expand Down
19 changes: 0 additions & 19 deletions client/src/components/SuperheroName.js

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/components/WaitForBumpReceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../styles/button.css'
import '../styles/waitforbump.css'
import 'bootstrap/dist/css/bootstrap.min.css'
import PropTypes from 'prop-types';
import FistsBumping from '../assets/FistsBumping.png'
import FistsBumping from '../assets/FistsBumping2.png'

class WaitForBumpReceiver extends React.Component {
componentDidMount() {
Expand Down
28 changes: 18 additions & 10 deletions client/src/components/WaitForBumpSender.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../styles/button.css'
import '../styles/waitforbump.css'
import 'bootstrap/dist/css/bootstrap.min.css'
import PropTypes from 'prop-types';
import FistsBumping from '../assets/FistsBumping.png'
import FistsBumping from '../assets/FistsBumping2.png'

class WaitForBumpSender extends React.Component {
componentDidMount() {
Expand Down Expand Up @@ -43,16 +43,23 @@ class WaitForBumpSender extends React.Component {

render(){ return (
<div className="App">
<button className = "test-button" onClick={this.bamEvent}>
<img src = {FistsBumping} className="fists-bumping-image-size" alt="Fist Bump Waiting Pic"/>
</button>
{
!this.props.showSpinner &&
<div>
<button className = "test-button" onClick={this.bamEvent}>
<img src = {FistsBumping} className="fists-bumping-image-size" alt="Fist Bump Waiting Pic"/>
</button>

<h1 className="text-style">
<br/>
FIST BUMP THE DEVICES
<br/>
TO INITIATE TRANSFER!
</h1>
<h1 className="text-style">
<br/>
FIST BUMP THE DEVICES
<br/>
TO INITIATE TRANSFER!
</h1>
</div>
}



</div>
)}
Expand All @@ -63,6 +70,7 @@ WaitForBumpSender.propTypes = {
bumpCallback: PropTypes.func,
senderLocationArr: PropTypes.array,
senderAccPermission: PropTypes.bool,
showSpinner: PropTypes.bool,
};

export default WaitForBumpSender
3 changes: 2 additions & 1 deletion client/src/styles/containers.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ ul{
padding: auto;
}
.fileListContainer{
min-height: 200px;
/* min-height: 200px; */
max-height: 200px;
margin: auto;
margin-bottom: 1%;
padding: auto;
margin-top: 5%;
}
.fileNameContainer{
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion client/src/styles/waitforbump.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
.test-button {
font-size: 23px;
border: none;
padding-top: 3%;
font-weight: 800;
max-width: auto;
min-width: auto;
margin-top: 8%;
transition: transform 0.3s ease;
background-color: rgba(153,153,255,0);
}