This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steven Miller
committed
Feb 14, 2018
1 parent
eb5c0a9
commit 7d275b5
Showing
9 changed files
with
18 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,41 @@ | ||
import React, { Component } from 'react' | ||
import { connect } from 'react-redux' | ||
import { getRecording, restart } from '../actions/creators' | ||
import App from '../components/App' | ||
|
||
class AppContainer extends Component { | ||
export default class AppContainer extends Component { | ||
constructor (props) { | ||
super(props) | ||
|
||
this.state = { | ||
selectedTab: 'Nightmare' | ||
selectedTab: 'Nightmare', | ||
recording: [] | ||
} | ||
|
||
this.onSelectTab = this.onSelectTab.bind(this) | ||
this.onRestart = this.onRestart.bind(this) | ||
} | ||
|
||
render () { | ||
return React.createElement(App, { | ||
...this.props, | ||
...this.state, | ||
onSelectTab: this.onSelectTab | ||
onSelectTab: this.onSelectTab, | ||
onRestart: this.onRestart | ||
}) | ||
} | ||
|
||
onSelectTab (selectedTab) { | ||
this.setState({ selectedTab }) | ||
} | ||
|
||
componentDidMount () { | ||
this.props.init() | ||
chrome.storage.sync.get('recording', ({ recording }) => { | ||
this.setState({ recording }) | ||
}) | ||
} | ||
} | ||
|
||
function mapStateToProps (state) { | ||
return { | ||
recording: state.application.recording | ||
onSelectTab (selectedTab) { | ||
this.setState({ selectedTab }) | ||
} | ||
} | ||
|
||
function mapDispatchToProps (dispatch) { | ||
return { | ||
init () { | ||
dispatch(getRecording()) | ||
}, | ||
handleRestart: restart | ||
onRestart () { | ||
chrome.browserAction.setBadgeText({ text: '' }) | ||
chrome.runtime.reload() | ||
window.close() | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(AppContainer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,7 @@ | ||
import 'babel-polyfill' | ||
import React from 'react' | ||
import { render } from 'react-dom' | ||
import { Provider } from 'react-redux' | ||
import configureStore from './configureStore' | ||
import App from './containers/App' | ||
import './base.css' | ||
|
||
const store = configureStore() | ||
|
||
const app = ( | ||
<Provider store={store}> | ||
<App /> | ||
</Provider> | ||
) | ||
|
||
render(app, document.getElementById('root')) | ||
render(<App />, document.getElementById('root')) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1625,10 +1625,6 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: | |
version "1.2.0" | ||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" | ||
|
||
[email protected]: | ||
version "0.3.4" | ||
resolved "https://registry.yarnpkg.com/deep-diff/-/deep-diff-0.3.4.tgz#aac5c39952236abe5f037a2349060ba01b00ae48" | ||
|
||
deep-extend@~0.4.0: | ||
version "0.4.1" | ||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" | ||
|
@@ -2450,10 +2446,6 @@ [email protected]: | |
version "2.16.3" | ||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" | ||
|
||
hoist-non-react-statics@^2.2.1: | ||
version "2.3.1" | ||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0" | ||
|
||
home-or-tmp@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" | ||
|
@@ -2610,7 +2602,7 @@ interpret@^1.0.0: | |
version "1.0.1" | ||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" | ||
|
||
invariant@^2.0.0, invariant@^2.2.0, invariant@^2.2.1: | ||
invariant@^2.2.0: | ||
version "2.2.2" | ||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" | ||
dependencies: | ||
|
@@ -2952,10 +2944,6 @@ loader-utils@^1.0.2: | |
emojis-list "^2.0.0" | ||
json5 "^0.5.0" | ||
|
||
lodash-es@^4.2.0, lodash-es@^4.2.1: | ||
version "4.17.4" | ||
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.4.tgz#dcc1d7552e150a0640073ba9cb31d70f032950e7" | ||
|
||
lodash._reinterpolate@~3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" | ||
|
@@ -2989,7 +2977,7 @@ lodash.uniq@^4.3.0: | |
version "4.5.0" | ||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" | ||
|
||
lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.2: | ||
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.3.0, lodash@~4.17.2: | ||
version "4.17.4" | ||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" | ||
|
||
|
@@ -4091,17 +4079,6 @@ react-event-listener@^0.5.1: | |
prop-types "^15.6.0" | ||
warning "^3.0.0" | ||
|
||
react-redux@^5.0.6: | ||
version "5.0.6" | ||
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946" | ||
dependencies: | ||
hoist-non-react-statics "^2.2.1" | ||
invariant "^2.0.0" | ||
lodash "^4.2.0" | ||
lodash-es "^4.2.0" | ||
loose-envify "^1.1.0" | ||
prop-types "^15.5.10" | ||
|
||
react-scrollbar-size@^2.0.2: | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/react-scrollbar-size/-/react-scrollbar-size-2.1.0.tgz#105e797135cab92b1f9e16f00071db7f29f80754" | ||
|
@@ -4263,37 +4240,6 @@ reduce-function-call@^1.0.1: | |
dependencies: | ||
balanced-match "^0.4.2" | ||
|
||
reduce-reducers@^0.1.0: | ||
version "0.1.2" | ||
resolved "https://registry.yarnpkg.com/reduce-reducers/-/reduce-reducers-0.1.2.tgz#fa1b4718bc5292a71ddd1e5d839c9bea9770f14b" | ||
|
||
redux: | ||
version "3.6.0" | ||
resolved "https://registry.yarnpkg.com/redux/-/redux-3.6.0.tgz#887c2b3d0b9bd86eca2be70571c27654c19e188d" | ||
dependencies: | ||
lodash "^4.2.1" | ||
lodash-es "^4.2.1" | ||
loose-envify "^1.1.0" | ||
symbol-observable "^1.0.2" | ||
|
||
redux-actions: | ||
version "1.2.2" | ||
resolved "https://registry.yarnpkg.com/redux-actions/-/redux-actions-1.2.2.tgz#31f15ba494fe130f05c4a9f486c99cc8725f80cd" | ||
dependencies: | ||
invariant "^2.2.1" | ||
lodash "^4.13.1" | ||
reduce-reducers "^0.1.0" | ||
|
||
redux-logger@^2.8.2: | ||
version "2.8.2" | ||
resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-2.8.2.tgz#52140a89afa1c1d25312cc17649c116650bf7fca" | ||
dependencies: | ||
deep-diff "0.3.4" | ||
|
||
redux-thunk@^2.2.0: | ||
version "2.2.0" | ||
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.2.0.tgz#e615a16e16b47a19a515766133d1e3e99b7852e5" | ||
|
||
regenerate@^1.2.1: | ||
version "1.3.2" | ||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" | ||
|
@@ -4809,10 +4755,6 @@ svgo@^0.7.0: | |
sax "~1.2.1" | ||
whet.extend "~0.9.9" | ||
|
||
symbol-observable@^1.0.2: | ||
version "1.0.4" | ||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" | ||
|
||
[email protected]: | ||
version "0.0.3" | ||
resolved "https://registry.yarnpkg.com/syntax-highlighter/-/syntax-highlighter-0.0.3.tgz#c336ad16cd460b4a4133613e850a83bdc76f48c8" | ||
|