diff --git a/database.rules.json b/database.rules.json index 9038b5e..0830ea7 100644 --- a/database.rules.json +++ b/database.rules.json @@ -8,13 +8,13 @@ ".validate": "newData.isNumber() && newData.val() == now" }, "status": { - ".write": "auth != null && auth.uid == data.parent().child('host').val() && data.exists() && newData.exists()", + ".write": "auth != null && auth.uid == data.parent().child('host').val() && newData.exists()", ".validate": "newData.isString() && (data.val() == 'waiting' && newData.val() == 'ingame')" }, "users": { "$userId": { ".write": "auth != null && auth.uid == $userId && data.parent().parent().child('status').val() == 'waiting' && !(root.hasChild('users/' + auth.uid + '/banned') && now < root.child('users/' + auth.uid + '/banned').val())", - ".validate": "!newData.exists() || (newData.isNumber() && newData.val() == now)" + ".validate": "newData.isNumber() && newData.val() == now" } }, "mode": { @@ -101,7 +101,7 @@ }, "connections": { "$connectionId": { - ".validate": "newData.isString() || !newData.exists()" + ".validate": "newData.isString()" } }, "banned": { @@ -118,7 +118,7 @@ ".indexOn": ".value", "$gameId": { ".write": "auth != null && auth.uid == $userId", - ".validate": "!newData.exists() || (newData.isNumber() && newData.val() == root.child('games/' + $gameId + '/createdAt').val())" + ".validate": "newData.isNumber() && newData.val() == root.child('games/' + $gameId + '/createdAt').val()" } } }, diff --git a/src/pages/GamePage.js b/src/pages/GamePage.js index 078fe0b..3e30ce5 100644 --- a/src/pages/GamePage.js +++ b/src/pages/GamePage.js @@ -61,6 +61,7 @@ const useStyles = makeStyles((theme) => ({ width: "calc(100% - 16px)", height: "calc(100% - 16px)", borderRadius: 4, + background: "rgba(0, 0, 0, 0.5)", transition: "opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms", zIndex: 2, justifyContent: "center", @@ -367,12 +368,7 @@ function GamePage({ match }) { {/* Backdrop; active when the game ends or is paused */}