Skip to content

Commit

Permalink
Merge e878d70 into 89c43b2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lee committed Sep 25, 2019
2 parents 89c43b2 + e878d70 commit 6ebe498
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 173 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/ImportGame-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Import Game', () => {
cy.visit('/')
})

it.skip('Should import the game state from a JSON file.', () => {
it('Should import the game state from a JSON file.', () => {
cy.get('#view-speeddial').trigger('mouseover', { force: true })
cy.get('button[title="Import Game"]')
.click()
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"react-ga": "^2.6.0",
"react-redux": "^7.1.0",
"react-scripts": "3.1.0",
"react-tooltip": "^3.10.0",
"redux": "^4.0.4",
"redux-thunk": "^2.3.0",
"styled-components": "^4.3.2",
Expand Down
9 changes: 0 additions & 9 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import { initializeApplication } from './redux/actions/world'
import View from './views/View'
import { Box } from 'grommet'
import { setView } from './redux/actions/ui'
import TravelTimer from './components/TravelTimer'
import CashDisplay from './components/CashDisplay'
import ImportButton from './components/ImportButton'
import ViewSpeeddial from './components/ViewSpeeddial'

/**
Expand All @@ -21,13 +18,7 @@ const App = ({ handleInitializeApplication, planets }) => {

return (
<Box fill>
{/* <TravelTimer /> */}
<ViewSpeeddial />

{/* <CashDisplay />
<ImportButton />
</Box> */}
{/* </Box> */}
<Box pad={{ left: '100px', top: '25px', right: '25px', bottom: '25px' }}>
<View />
</Box>
Expand Down
10 changes: 5 additions & 5 deletions src/components/ImportButton.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { createRef } from 'react'
import React, { Fragment, createRef } from 'react'
import PropTypes from 'prop-types'
import { Box, Button } from 'grommet'
import { connect } from 'react-redux'
import { replaceShip } from '../redux/actions/ship'
import { replaceUI } from '../redux/actions/ui'
import { replaceUser } from '../redux/actions/user'
import { replaceWorld } from '../redux/actions/world'
import Icon from '@material-ui/core/Icon'

/**
* Allows the user to import their game from an exported file.
Expand Down Expand Up @@ -34,8 +34,8 @@ const ImportButton = ({ handleImportGame }) => {
}

return (
<Box>
<Button label="Import Game" onClick={handleImportGameClick} plain />
<Fragment>
<Icon className="fas fa-download" onClick={handleImportGameClick} />
<input
accept=".json"
data-testid="input-import"
Expand All @@ -44,7 +44,7 @@ const ImportButton = ({ handleImportGame }) => {
style={{ display: 'none' }}
type="file"
/>
</Box>
</Fragment>
)
}

Expand Down
96 changes: 0 additions & 96 deletions src/components/Sidebar.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/components/ViewSpeeddial.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SpeedDial, SpeedDialAction, SpeedDialIcon } from '@material-ui/lab'
import Icon from '@material-ui/core/Icon'
import { setView } from '../redux/actions/ui'
import { exportGame } from '../util/main'
import ImportButton from './ImportButton'

const useStyles = makeStyles(theme => ({
exampleWrapper: {
Expand Down Expand Up @@ -48,7 +49,7 @@ const ViewSpeeddial = ({ handleViewChange }) => {
onClick: () => handleViewChange('Ship')
},
{
icon: <Icon className="fas fa-download" />,
icon: <ImportButton />,
name: 'Import Game',
onClick: () => {}
},
Expand Down
50 changes: 0 additions & 50 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,6 @@ body {
margin: 0;
}

.bm-item {
display: inline-block;
text-decoration: none;
margin-bottom: 10px;
color: #d1d1d1;
transition: color 0.2s;
}

.bm-item:hover {
color: white;
}

.bm-burger-button {
position: fixed;
width: 36px;
height: 30px;
left: 36px;
top: 36px;
}

.bm-burger-bars {
background: #373a47;
}

.bm-cross-button {
display: none;
}

.bm-cross {
background: #bdc3c7;
}

.bm-menu {
background: #373a47;
padding: 2.5em 1.5em 0;
font-size: 1.15em;
}

.bm-morph-shape {
fill: #373a47;
}

.bm-item-list {
color: #b8b7ad;
}

.bm-overlay {
background: rgba(0, 0, 0, 0.3);
}

.links line {
stroke: #999;
stroke-opacity: 0.6;
Expand Down
12 changes: 2 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3432,7 +3432,7 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

classnames@^2.2.5, classnames@^2.2.6:
classnames@^2.2.6:
version "2.2.6"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==
Expand Down Expand Up @@ -10891,7 +10891,7 @@ prop-types-exact@^1.2.0:
object.assign "^4.1.0"
reflect.ownkeys "^0.2.0"

prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
Expand Down Expand Up @@ -11347,14 +11347,6 @@ react-test-renderer@^16.0.0-0:
react-is "^16.9.0"
scheduler "^0.15.0"

react-tooltip@^3.10.0:
version "3.11.1"
resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-3.11.1.tgz#7b4ce48ed26a46e996662b19a2afebbfd483513b"
integrity sha512-YCMVlEC2KuHIzOQhPplTK5jmBBwoL+PYJJdJKXj7M/h7oevupd/QSVq6z5U7/ehIGXyHsAqvwpdxexDfyQ0o3A==
dependencies:
classnames "^2.2.5"
prop-types "^15.6.0"

react-transition-group@^4.0.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.3.0.tgz#fea832e386cf8796c58b61874a3319704f5ce683"
Expand Down

0 comments on commit 6ebe498

Please sign in to comment.