Skip to content

Commit

Permalink
fix: Add more informative game load text (#1545)
Browse files Browse the repository at this point in the history
* Update text on game load

* Update snapshots
  • Loading branch information
faucomte97 committed Jun 28, 2021
1 parent e79433d commit 83f5579
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 30 deletions.
54 changes: 27 additions & 27 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion game_frontend/public/handlebars_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@

<script>
var appData = {
urlForAimmoDashboard: "{% url_for_aimmo_dashboard %}"
urlForAimmoDashboard: "{% url_for_aimmo_dashboard %}",
urlContact: "{% url 'help' %}"
};
</script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ exports[`<GameView /> shows the loading screen when the game is loading 1`] = `
color="inherit"
variant="body1"
>
Building game world...
We are building your game... ⏱
</Styled(WithStyles(ForwardRef(Typography)))>
<Styled(WithStyles(ForwardRef(Typography)))
color="inherit"
variant="body1"
>
If the game doesn’t load after 60 seconds, please
<a
href=""
>
contact us
</a>
.
</Styled(WithStyles(ForwardRef(Typography)))>
</styled.div>
<canvas
Expand Down
8 changes: 7 additions & 1 deletion game_frontend/src/components/GameView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const PositionedFindMeButton = styled(FindMeButton)`
right: ${props => props.theme.spacing(3)}px;
`

const appData = window.appData
const urlContact = (appData && appData.urlContact) ? appData.urlContact : ''

export default class GameView extends Component {
static propTypes = {
connectToGame: PropTypes.func,
Expand Down Expand Up @@ -95,7 +98,10 @@ export default class GameView extends Component {
<LoadingBackgroundOverlay>
<CircularProgress color='inherit' />
<LoadingText variant='body1' color='inherit'>
Building game world...
We are building your game... ⏱
</LoadingText>
<LoadingText variant='body1' color='inherit'>
If the game doesn’t load after 60 seconds, please <a href={urlContact}>contact us</a>.
</LoadingText>
</LoadingBackgroundOverlay>
)
Expand Down

0 comments on commit 83f5579

Please sign in to comment.