diff --git a/package.json b/package.json
index b7c28d3..7c6ab5d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portAL",
- "version": "1.3.4",
+ "version": "1.4.0",
"private": true,
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.6",
diff --git a/src/pages/GameDetail.js b/src/pages/GameDetail.js
index e50a167..8d6e5e9 100644
--- a/src/pages/GameDetail.js
+++ b/src/pages/GameDetail.js
@@ -76,6 +76,9 @@ const styles = theme => ({
},
close: {
color: '#fff',
+ },
+ spacingRight: {
+ marginRight: 12,
}
});
@@ -136,16 +139,8 @@ class GameDetail extends Component {
};
getUserListItem = (player) => {
- let action = null;
- if(player.profile.id === this.props.portalStore.currentUser.profileID && !this.state.game.ended){
- action = (
- this.signOut()}>
-
-
- )
- }
return
+ history={this.props.history}/>
};
freeSpots = () => {
@@ -161,14 +156,18 @@ class GameDetail extends Component {
}
canSignUp = () => {
- const players = this.state.game.players.map(player => player.profile.id);
- const player = this.props.portalStore.currentUser.profileID;
const future = this.state.game.ended === false;
const emptySpot = this.freeSpots() > 0;
const isDM = this.state.game.dm;
- return isDM && future && players.indexOf(player) === -1 && !this.userIsRunning() && emptySpot;
+ return isDM && future && !this.userIsRunning() && (emptySpot || this.isSignedUp());
};
+ isSignedUp = () => {
+ const players = this.state.game.players.map(player => player.profile.id);
+ const player = this.props.portalStore.currentUser.profileID;
+ return players.indexOf(player) !== -1
+ }
+
hasCharacters = () => {
return this.state.characters.length > 0
};
@@ -338,30 +337,49 @@ class GameDetail extends Component {
{!this.userIsRunning() &&
(
- {(this.canSignUp() && this.hasCharacters()) ? (
-
-
-
-
- ) : (
-
- )}
+ {this.hasCharacters() ?
+ this.canSignUp() && (
+
+ {this.isSignedUp() ? (
+
+
+
+
+ ) : (
+
+ )}
+
+
+ ) :
+ !this.isSignedUp() &&
+ }
)
}
{!this.hasCharacters() && (