Merge branch 'updateAuthAndFetchingLogic' into 'master'

Update auth and fetching logic

See merge request !68
This commit is contained in:
Lucas 2017-05-20 10:35:48 +00:00
commit 9779027d1b
16 changed files with 291 additions and 375 deletions

View File

@ -26,7 +26,6 @@
"react-router-bootstrap": "^0.23.1", "react-router-bootstrap": "^0.23.1",
"react-router-redux": "^4.0.7", "react-router-redux": "^4.0.7",
"redux": "^3.6.0", "redux": "^3.6.0",
"redux-auth-wrapper": "^0.9.0",
"redux-logger": "^2.7.4", "redux-logger": "^2.7.4",
"redux-thunk": "^2.1.0" "redux-thunk": "^2.1.0"
}, },

View File

@ -1,7 +1,6 @@
package movies package movies
import ( import (
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"log" "log"
@ -104,17 +103,8 @@ func RefreshMovieHandler(env *web.Env, w http.ResponseWriter, r *http.Request) e
// SearchMovie will search movie // SearchMovie will search movie
func SearchMovie(env *web.Env, w http.ResponseWriter, r *http.Request) error { func SearchMovie(env *web.Env, w http.ResponseWriter, r *http.Request) error {
var data struct { vars := mux.Vars(r)
Key string `json:"key"` search := vars["search"]
}
err := json.NewDecoder(r.Body).Decode(&data)
if err != nil {
return env.RenderError(w, errors.New("failed to get the search key"))
}
if data.Key == "" {
return env.RenderError(w, errors.New("no given key"))
}
v := auth.GetCurrentUser(r, env.Log) v := auth.GetCurrentUser(r, env.Log)
user, ok := v.(*users.User) user, ok := v.(*users.User)
@ -144,7 +134,7 @@ func SearchMovie(env *web.Env, w http.ResponseWriter, r *http.Request) error {
searchers := env.Config.MovieSearchers searchers := env.Config.MovieSearchers
// Search for the movie with all the Searchers // Search for the movie with all the Searchers
for _, searcher := range searchers { for _, searcher := range searchers {
result, err := searcher.SearchMovie(data.Key, env.Log) result, err := searcher.SearchMovie(search, env.Log)
if err != nil { if err != nil {
env.Log.Errorf("error while searching movie : %s", err) env.Log.Errorf("error while searching movie : %s", err)
continue continue
@ -152,7 +142,7 @@ func SearchMovie(env *web.Env, w http.ResponseWriter, r *http.Request) error {
movies = append(movies, result...) movies = append(movies, result...)
} }
env.Log.Debugf("got %d movies doing search %q", len(movies), data.Key) env.Log.Debugf("got %d movies doing search %q", len(movies), search)
movieList := []*Movie{} movieList := []*Movie{}
// For each movie found, fill the details // For each movie found, fill the details
for _, m := range movies { for _, m := range movies {

View File

@ -123,16 +123,8 @@ func RefreshShowHandler(env *web.Env, w http.ResponseWriter, r *http.Request) er
// SearchShow will search a show // SearchShow will search a show
func SearchShow(env *web.Env, w http.ResponseWriter, r *http.Request) error { func SearchShow(env *web.Env, w http.ResponseWriter, r *http.Request) error {
var data struct { vars := mux.Vars(r)
Key string `json:"key"` search := vars["search"]
}
if err := json.NewDecoder(r.Body).Decode(&data); err != nil {
return env.RenderError(w, errors.New("failed to get the search key"))
}
if data.Key == "" {
return env.RenderError(w, errors.New("no given key"))
}
v := auth.GetCurrentUser(r, env.Log) v := auth.GetCurrentUser(r, env.Log)
user, ok := v.(*users.User) user, ok := v.(*users.User)
@ -144,7 +136,7 @@ func SearchShow(env *web.Env, w http.ResponseWriter, r *http.Request) error {
searchers := env.Config.ShowSearchers searchers := env.Config.ShowSearchers
// Iterate on all the searchers to search for the show // Iterate on all the searchers to search for the show
for _, searcher := range searchers { for _, searcher := range searchers {
result, err := searcher.SearchShow(data.Key, env.Log) result, err := searcher.SearchShow(search, env.Log)
if err != nil { if err != nil {
env.Log.Errorf("error while searching show : %s", err) env.Log.Errorf("error while searching show : %s", err)
continue continue
@ -153,7 +145,7 @@ func SearchShow(env *web.Env, w http.ResponseWriter, r *http.Request) error {
shows = append(shows, result...) shows = append(shows, result...)
} }
env.Log.Debugf("got %d shows doing search %q", len(shows), data.Key) env.Log.Debugf("got %d shows doing search %q", len(shows), search)
client, err := user.NewPapiClient() client, err := user.NewPapiClient()
if err != nil { if err != nil {

View File

@ -38,12 +38,6 @@ export function userLogout() {
} }
} }
export function isUserLoggedIn() {
return {
type: 'IS_USER_LOGGED_IN',
}
}
export function loginUser(username, password) { export function loginUser(username, password) {
return request( return request(
'USER_LOGIN', 'USER_LOGIN',
@ -85,6 +79,15 @@ export function getUserInfos() {
// Movies // Movies
// ====================== // ======================
export function updateLastMovieFetchUrl(url) {
return {
type: 'UPDATE_LAST_MOVIE_FETCH_URL',
payload: {
url: url,
},
}
}
export function selectMovie(imdbId) { export function selectMovie(imdbId) {
return { return {
type: 'SELECT_MOVIE', type: 'SELECT_MOVIE',
@ -99,27 +102,6 @@ export function getMovieExploreOptions() {
) )
} }
export function deleteMovieFromStore(imdbId) {
return {
type: 'DELETE_MOVIE',
imdbId
}
}
export function searchMovies(search) {
return request(
'SEARCH_MOVIES',
configureAxios().post('/movies/search', search)
)
}
export function exploreMovies(source, category) {
return request(
'EXPLORE_MOVIES',
configureAxios().get(`/movies/explore?source=${encodeURI(source)}&category=${encodeURI(category)}`)
)
}
export function getMovieDetails(imdbId) { export function getMovieDetails(imdbId) {
return request( return request(
'MOVIE_GET_DETAILS', 'MOVIE_GET_DETAILS',
@ -127,13 +109,13 @@ export function getMovieDetails(imdbId) {
) )
} }
export function deleteMovie(imdbId) { export function deleteMovie(imdbId, lastFetchUrl) {
return request( return request(
'MOVIE_DELETE', 'MOVIE_DELETE',
configureAxios().delete(`/movies/${imdbId}`), configureAxios().delete(`/movies/${imdbId}`),
[ [
fetchMovies(lastFetchUrl),
addAlertOk("Movie deleted"), addAlertOk("Movie deleted"),
deleteMovieFromStore(imdbId),
], ],
) )
} }
@ -173,7 +155,10 @@ export function updateMovieWishlistStore(imdbId, wishlisted) {
export function fetchMovies(url) { export function fetchMovies(url) {
return request( return request(
'MOVIE_LIST_FETCH', 'MOVIE_LIST_FETCH',
configureAxios().get(url) configureAxios().get(url),
[
updateLastMovieFetchUrl(url),
]
) )
} }
@ -184,14 +169,10 @@ export function fetchMovies(url) {
export function fetchShows(url) { export function fetchShows(url) {
return request( return request(
'SHOW_LIST_FETCH', 'SHOW_LIST_FETCH',
configureAxios().get(url) configureAxios().get(url),
) [
} updateLastShowsFetchUrl(url),
]
export function searchShows(search) {
return request(
'SEARCH_SHOWS',
configureAxios().post('/shows/search', search)
) )
} }
@ -265,13 +246,6 @@ export function updateShowWishlistStore(imdbId, wishlisted, season = null, episo
} }
} }
export function exploreShows(source, category) {
return request(
'EXPLORE_SHOWS',
configureAxios().get(`/shows/explore?source=${encodeURI(source)}&category=${encodeURI(category)}`)
)
}
export function getShowExploreOptions() { export function getShowExploreOptions() {
return request( return request(
'SHOW_GET_EXPLORE_OPTIONS', 'SHOW_GET_EXPLORE_OPTIONS',
@ -286,6 +260,15 @@ export function selectShow(imdbId) {
} }
} }
export function updateLastShowsFetchUrl(url) {
return {
type: 'UPDATE_LAST_SHOWS_FETCH_URL',
payload: {
url: url,
},
}
}
// ====================== // ======================
// AddTorrent // AddTorrent
// ====================== // ======================

View File

@ -22,9 +22,8 @@ import React from 'react'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import { bindActionCreators } from 'redux' import { bindActionCreators } from 'redux'
import { Provider, connect } from 'react-redux' import { Provider, connect } from 'react-redux'
import { Router, Route, IndexRoute, IndexRedirect, Link, hashHistory } from 'react-router' import { Router } from 'react-router'
import { routerActions } from 'react-router-redux' import { routerActions } from 'react-router-redux'
import { UserAuthWrapper } from 'redux-auth-wrapper'
// Root reducer // Root reducer
import rootReducer from './reducers/index' import rootReducer from './reducers/index'
@ -45,21 +44,16 @@ import UserLoginForm from './components/users/login'
import UserEdit from './components/users/edit' import UserEdit from './components/users/edit'
import UserSignUp from './components/users/signup' import UserSignUp from './components/users/signup'
class Main extends React.Component { function Main(props) {
componentWillMount() {
this.props.isUserLoggedIn();
}
render() {
return ( return (
<div> <div>
<NavBar {...this.props}/> <NavBar {...props}/>
<Alert {...this.props}/> <Alert {...props}/>
<div className="container-fluid"> <div className="container-fluid">
{React.cloneElement(this.props.children, this.props)} {React.cloneElement(props.children, props)}
</div> </div>
</div> </div>
); );
}
} }
function mapStateToProps(state) { function mapStateToProps(state) {
@ -77,48 +71,148 @@ function mapDispatchToProps(dispatch) {
const App = connect(mapStateToProps, mapDispatchToProps)(Main); const App = connect(mapStateToProps, mapDispatchToProps)(Main);
// Redirects to /login by default const loginCheck = function(nextState, replace, next, f) {
const UserIsAuthenticated = UserAuthWrapper({ const state = store.getState();
authSelector: state => state.userStore, const isLogged = state.userStore.isLogged;
redirectAction: routerActions.replace, let token = localStorage.getItem('token');
wrapperDisplayName: 'UserIsAuthenticated',
predicate: user => user.isLogged,
failureRedirectPath: '/users/login',
})
// TODO find a better way // Let's check if the user has a token, if he does let's assume he's logged
const MovieListPolochon = (props) => ( // in. If that's not the case he will be logged out on the fisrt query
<MovieList {...props} moviesUrl='/movies/polochon'/> if (token !== "") {
) store.dispatch({
const MovieListWishlisted = (props) => ( type: 'USER_SET_TOKEN',
<MovieList {...props} moviesUrl='/wishlist/movies'/> payload: {
) token: token,
},
});
}
const ShowListPolochon = (props) => ( if (!isLogged && token === "") {
<ShowList {...props} showsUrl='/shows/polochon'/> replace('/users/login');
) } else {
const ShowListWishlisted = (props) => ( f();
<ShowList {...props} showsUrl='/wishlist/shows'/> }
)
next();
}
const routes = {
path: '/',
component: App,
indexRoute: {onEnter: ({params}, replace) => replace('/movies/explore/yts/seeds')},
childRoutes: [
{ path: '/users/login' , component: UserLoginForm },
{ path: '/users/signup' , component: UserSignUp },
{ path: '/users/edit' , component: UserEdit },
{ path: '/users/signup' , component: UserSignUp },
{
path: '/users/logout',
onEnter: function(nextState, replace, next) {
store.dispatch(actionCreators.userLogout());
replace('/users/login');
next();
},
},
{
path: '/movies/search/:search',
component: MovieList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchMovies(`/movies/search/${nextState.params.search}`));
});
},
},
{
path: '/movies/polochon',
component: MovieList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchMovies('/movies/polochon'));
});
},
},
{
path: '/movies/explore/:source/:category',
component: MovieList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
var state = store.getState();
// Fetch the explore options
if (Object.keys(state.movieStore.exploreOptions).length === 0) {
store.dispatch(actionCreators.getMovieExploreOptions());
}
store.dispatch(actionCreators.fetchMovies(
`/movies/explore?source=${encodeURI(nextState.params.source)}&category=${encodeURI(nextState.params.category)}`
));
});
},
},
{
path: '/movies/wishlist',
component: MovieList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchMovies('/wishlist/movies'));
});
},
},
{
path: '/shows/search/:search',
component: ShowList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchShows(`/shows/search/${nextState.params.search}`));
});
},
},
{
path: '/shows/polochon',
component: ShowList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchShows('/shows/polochon'));
});
},
},
{
path: '/shows/wishlist',
component: ShowList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchShows('/wishlist/shows'));
});
},
},
{
path: '/shows/details/:imdbId',
component: ShowDetails,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
store.dispatch(actionCreators.fetchShows(`/shows/search/${nextState.params.imdbId}`));
});
},
},
{
path: '/shows/explore/:source/:category',
component: ShowList,
onEnter: function(nextState, replace, next) {
loginCheck(nextState, replace, next, function() {
var state = store.getState();
// Fetch the explore options
if (Object.keys(state.showStore.exploreOptions).length === 0) {
store.dispatch(actionCreators.getShowExploreOptions());
}
store.dispatch(actionCreators.fetchShows(
`/shows/explore?source=${encodeURI(nextState.params.source)}&category=${encodeURI(nextState.params.category)}`
));
});
},
},
],
}
ReactDOM.render(( ReactDOM.render((
<Provider store={store}> <Provider store={store}>
<Router history={history}> <Router history={history} routes={routes} />
<Route path="/" component={App}>
<IndexRedirect to="/movies/explore/yts/seeds" />
<Route path="/users/login" component={UserLoginForm} />
<Route path="/users/signup" component={UserSignUp} />
<Route path="/users/edit" component={UserIsAuthenticated(UserEdit)} />
<Route path="/movies/search/:search" component={UserIsAuthenticated(MovieList)} />
<Route path="/movies/polochon" component={UserIsAuthenticated(MovieListPolochon)} />
<Route path="/movies/explore/:source/:category" component={UserIsAuthenticated(MovieList)} />
<Route path="/movies/wishlist" component={UserIsAuthenticated(MovieListWishlisted)} />
<Route path="/shows/search/:search" component={UserIsAuthenticated(ShowList)} />
<Route path="/shows/polochon" component={UserIsAuthenticated(ShowListPolochon)} />
<Route path="/shows/wishlist" component={UserIsAuthenticated(ShowListWishlisted)} />
<Route path="/shows/details/:imdbId" component={UserIsAuthenticated(ShowDetails)} />
<Route path="/shows/explore/:source/:category" component={UserIsAuthenticated(ShowList)} />
</Route>
</Router>
</Provider> </Provider>
),document.getElementById('app')); ),document.getElementById('app'));

View File

@ -43,7 +43,7 @@ export class DeleteButton extends React.Component {
} }
handleClick(e) { handleClick(e) {
e.preventDefault(); e.preventDefault();
this.props.deleteFunc(this.props.resourceId); this.props.deleteFunc(this.props.resourceId, this.props.lastFetchUrl);
} }
render() { render() {
return ( return (

View File

@ -4,28 +4,17 @@ import { Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'
export default class ExplorerOptions extends React.Component { export default class ExplorerOptions extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
if (Object.keys(this.props.options).length === 0) {
this.props.fetchOptions();
}
// Initial explore
if (this.propsValid(props)) {
props.explore(props.params.source, props.params.category);
}
this.handleSourceChange = this.handleSourceChange.bind(this); this.handleSourceChange = this.handleSourceChange.bind(this);
this.handleCategoryChange = this.handleCategoryChange.bind(this); this.handleCategoryChange = this.handleCategoryChange.bind(this);
} }
handleSourceChange(event) { handleSourceChange(event) {
let source = event.target.value; let source = event.target.value;
let category = this.props.options[event.target.value][0]; let category = this.props.options[event.target.value][0];
this.props.explore(source, category);
this.props.router.push(`/${this.props.type}/explore/${source}/${category}`); this.props.router.push(`/${this.props.type}/explore/${source}/${category}`);
} }
handleCategoryChange(event) { handleCategoryChange(event) {
let source = this.props.params.source; let source = this.props.params.source;
let category = event.target.value; let category = event.target.value;
this.props.explore(source, category);
this.props.router.push(`/${this.props.type}/explore/${source}/${category}`); this.props.router.push(`/${this.props.type}/explore/${source}/${category}`);
} }
propsValid(props) { propsValid(props) {
@ -38,25 +27,6 @@ export default class ExplorerOptions extends React.Component {
} }
return true; return true;
} }
componentWillUpdate(nextProps, nextState) {
// Check props
if (!this.propsValid(nextProps)) {
return
}
// No previous params
if (!this.props.params.source && !this.props.params.category) {
this.props.explore(this.props.params.source, this.props.params.category);
return;
}
// Explore params changed
if ((this.props.params.source !== nextProps.params.source)
|| (this.props.params.category !== nextProps.params.category)) {
this.props.explore(nextProps.params.source, nextProps.params.category);
return;
}
}
prettyName(name) { prettyName(name) {
return name.replace("_", " ") return name.replace("_", " ")
.split(" ") .split(" ")

View File

@ -15,11 +15,8 @@ const DEFAULT_ADD_EXTRA_ITEMS = 30;
export default class ListPosters extends React.Component { export default class ListPosters extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
items: 0,
hasMore: false,
};
this.loadMore = this.loadMore.bind(this); this.loadMore = this.loadMore.bind(this);
this.state = this.getNextState(props);
} }
loadMore() { loadMore() {
// Nothing to do if the app is loading // Nothing to do if the app is loading
@ -35,7 +32,7 @@ export default class ListPosters extends React.Component {
} }
getNextState(props) { getNextState(props) {
let totalListSize = props.data.length; let totalListSize = props.data.length;
let currentListSize = this.state.items; let currentListSize = (this.state && this.state.items) ? this.state.items : 0;
let nextListSize = currentListSize + DEFAULT_ADD_EXTRA_ITEMS; let nextListSize = currentListSize + DEFAULT_ADD_EXTRA_ITEMS;
let hasMore = true; let hasMore = true;
@ -93,9 +90,7 @@ export default class ListPosters extends React.Component {
display={!displayFilter} display={!displayFilter}
params={this.props.params} params={this.props.params}
router={this.props.router} router={this.props.router}
fetchOptions={this.props.fetchExploreOptions}
options={this.props.exploreOptions} options={this.props.exploreOptions}
explore={this.props.explore}
/> />
<Posters <Posters
elmts={elmts} elmts={elmts}

View File

@ -14,6 +14,7 @@ export default function ActionsButton(props) {
{props.hasMovie && {props.hasMovie &&
<DeleteButton <DeleteButton
resourceId={props.movieId} resourceId={props.movieId}
lastFetchUrl={props.lastFetchUrl}
deleteFunc={props.deleteMovie} deleteFunc={props.deleteMovie}
isUserAdmin={props.isUserAdmin} isUserAdmin={props.isUserAdmin}
/> />

View File

@ -21,6 +21,8 @@ function MovieButtons(props) {
wishlisted={props.movie.wishlisted} wishlisted={props.movie.wishlisted}
addToWishlist={props.addToWishlist} addToWishlist={props.addToWishlist}
deleteFromWishlist={props.deleteFromWishlist} deleteFromWishlist={props.deleteFromWishlist}
lastFetchUrl={props.lastFetchUrl}
fetchMovies={props.fetchMovies}
/> />
{props.movie.torrents && {props.movie.torrents &&
@ -43,11 +45,6 @@ export default class MovieList extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
} }
componentWillMount() {
if (this.props.moviesUrl) {
this.props.fetchMovies(this.props.moviesUrl);
}
}
render() { render() {
const movies = this.props.movieStore.movies; const movies = this.props.movieStore.movies;
const selectedMovieId = this.props.movieStore.selectedImdbId; const selectedMovieId = this.props.movieStore.selectedImdbId;
@ -87,6 +84,8 @@ export default class MovieList extends React.Component {
isUserAdmin={this.props.userStore.isAdmin} isUserAdmin={this.props.userStore.isAdmin}
addToWishlist={this.props.addMovieToWishlist} addToWishlist={this.props.addMovieToWishlist}
deleteFromWishlist={this.props.deleteMovieFromWishlist} deleteFromWishlist={this.props.deleteMovieFromWishlist}
fetchMovies={this.props.fetchMovies}
lastFetchUrl={this.props.movieStore.lastFetchUrl}
/> />
</ListDetails> </ListDetails>
} }

View File

@ -1,10 +1,6 @@
import React from 'react' import React from 'react'
import { store } from '../store'
import { isUserLoggedIn } from '../actions/actionCreators'
import { Nav, Navbar, NavItem, NavDropdown, MenuItem } from 'react-bootstrap' import { Nav, Navbar, NavItem, NavDropdown, MenuItem } from 'react-bootstrap'
import { LinkContainer } from 'react-router-bootstrap' import { LinkContainer } from 'react-router-bootstrap'
import { Control, Form } from 'react-redux-form';
export default function NavBar(props) { export default function NavBar(props) {
return ( return (
@ -20,31 +16,18 @@ export default function NavBar(props) {
<MoviesDropdown username={props.userStore.username} /> <MoviesDropdown username={props.userStore.username} />
<ShowsDropdown username={props.userStore.username} /> <ShowsDropdown username={props.userStore.username} />
<WishlistDropdown username={props.userStore.username} /> <WishlistDropdown username={props.userStore.username} />
<UserDropdown <UserDropdown username={props.userStore.username} />
username={props.userStore.username}
logout={props.userLogout}
/>
<Search <Search
model="movieStore"
model="movieStore.search"
placeholder="Search movies" placeholder="Search movies"
router={props.router} router={props.router}
search={props.movieStore.search}
searchFunc={props.searchMovies}
path='/movies/search' path='/movies/search'
pathMatch='movies' pathMatch='movies'
params={props.params}
/> />
<Search <Search
model="showStore"
model="showStore.search"
placeholder="Search shows" placeholder="Search shows"
router={props.router} router={props.router}
search={props.showStore.search}
searchFunc={props.searchShows}
path='/shows/search' path='/shows/search'
pathMatch='shows' pathMatch='shows'
params={props.params}
/> />
</Navbar.Collapse> </Navbar.Collapse>
</Navbar> </Navbar>
@ -56,54 +39,30 @@ class Search extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.handleSearch = this.handleSearch.bind(this); this.handleSearch = this.handleSearch.bind(this);
this.search(this.props);
} }
handleSearch() { handleSearch(ev) {
if (this.props.search === "") { ev.preventDefault();
return; this.props.router.push(`${this.props.path}/${encodeURI(this.input.value)}`);
}
this.search(this.props);
this.props.router.push(`${this.props.path}/${encodeURI(this.props.search)}`);
} }
isActive() { isActive() {
const location = this.props.router.getCurrentLocation().pathname; const location = this.props.router.getCurrentLocation().pathname;
return (location.indexOf(this.props.pathMatch) !== -1) return (location.indexOf(this.props.pathMatch) !== -1)
} }
search(props) {
if (!this.isActive()) {
return;
}
// Search from the props if defined
if (props.search !== "") {
props.searchFunc({ key: props.search });
return;
}
// Search from the url params
if (props.params
&& props.params.search
&& props.params.search !== "") {
props.searchFunc({ key: props.params.search });
return;
}
}
render() { render() {
if (!this.isActive()) { if (!this.isActive()) {
return null; return null;
} }
return( return(
<Navbar.Form pullRight> <div className="navbar-form navbar-right">
<Form model={this.props.model} className="input-group" onSubmit={this.handleSearch}> <form className="input-group" onSubmit={(ev) => this.handleSearch(ev)}>
<Control.text <input
model={this.props.model}
className="form-control" className="form-control"
placeholder={this.props.placeholder} placeholder={this.props.placeholder}
updateOn="change" ref={(input) => this.input = input}
/> />
</Form> </form>
</Navbar.Form> </div>
); );
} }
} }
@ -152,7 +111,7 @@ function UserDropdown(props) {
<LinkContainer to="/users/edit"> <LinkContainer to="/users/edit">
<MenuItem>Edit</MenuItem> <MenuItem>Edit</MenuItem>
</LinkContainer> </LinkContainer>
<LinkContainer to="/users/logout" onClick={props.logout}> <LinkContainer to="/users/logout">
<MenuItem>Logout</MenuItem> <MenuItem>Logout</MenuItem>
</LinkContainer> </LinkContainer>
</NavDropdown> </NavDropdown>

View File

@ -5,8 +5,8 @@ const defaultState = {
perPage: 30, perPage: 30,
selectedImdbId: "", selectedImdbId: "",
fetchingDetails: false, fetchingDetails: false,
lastFetchUrl: "",
exploreOptions: {}, exploreOptions: {},
search: "",
}; };
export default function movieStore(state = defaultState, action) { export default function movieStore(state = defaultState, action) {
@ -26,24 +26,8 @@ export default function movieStore(state = defaultState, action) {
return Object.assign({}, state, { return Object.assign({}, state, {
movies: action.payload.data, movies: action.payload.data,
selectedImdbId: selectedImdbId, selectedImdbId: selectedImdbId,
loading: false, filter: defaultState.filter,
}) perPage: defaultState.perPage,
case 'EXPLORE_MOVIES_PENDING':
return Object.assign({}, state, {
loading: true,
})
case 'EXPLORE_MOVIES_FULFILLED':
return Object.assign({}, state, {
movies: action.payload.data,
loading: false,
})
case 'SEARCH_MOVIES_PENDING':
return Object.assign({}, state, {
loading: true,
})
case 'SEARCH_MOVIES_FULFILLED':
return Object.assign({}, state, {
movies: action.payload.data,
loading: false, loading: false,
}) })
case 'MOVIE_GET_DETAILS_PENDING': case 'MOVIE_GET_DETAILS_PENDING':
@ -63,9 +47,9 @@ export default function movieStore(state = defaultState, action) {
return Object.assign({}, state, { return Object.assign({}, state, {
exploreOptions: action.payload.data, exploreOptions: action.payload.data,
}) })
case 'DELETE_MOVIE': case 'UPDATE_LAST_MOVIE_FETCH_URL':
return Object.assign({}, state, { return Object.assign({}, state, {
movies: state.movies.filter((e) => (e.imdb_id !== action.imdbId)), lastFetchUrl: action.payload.url,
}) })
case 'SELECT_MOVIE': case 'SELECT_MOVIE':
// Don't select the movie if we're fetching another movie's details // Don't select the movie if we're fetching another movie's details

View File

@ -7,8 +7,8 @@ const defaultState = {
show: { show: {
seasons: [], seasons: [],
}, },
search: "",
getDetails: false, getDetails: false,
lastShowsFetchUrl: "",
exploreOptions: {}, exploreOptions: {},
}; };
@ -27,6 +27,8 @@ export default function showStore(state = defaultState, action) {
return Object.assign({}, state, { return Object.assign({}, state, {
shows: action.payload.data, shows: action.payload.data,
selectedImdbId: selectedImdbId, selectedImdbId: selectedImdbId,
filter: defaultState.filter,
perPage: defaultState.perPage,
loading: false, loading: false,
}) })
case 'SHOW_GET_DETAILS_PENDING': case 'SHOW_GET_DETAILS_PENDING':
@ -55,15 +57,6 @@ export default function showStore(state = defaultState, action) {
return Object.assign({}, state, { return Object.assign({}, state, {
show: updateEpisode(Object.assign({}, state.show), false, action.payload.data), show: updateEpisode(Object.assign({}, state.show), false, action.payload.data),
}) })
case 'SEARCH_SHOWS_PENDING':
return Object.assign({}, state, {
loading: true,
})
case 'SEARCH_SHOWS_FULFILLED':
return Object.assign({}, state, {
shows: action.payload.data,
loading: false,
})
case 'EXPLORE_SHOWS_PENDING': case 'EXPLORE_SHOWS_PENDING':
return Object.assign({}, state, { return Object.assign({}, state, {
loading: true, loading: true,
@ -82,6 +75,10 @@ export default function showStore(state = defaultState, action) {
shows: updateShowsStoreWishlist(state.shows.slice(), action.payload), shows: updateShowsStoreWishlist(state.shows.slice(), action.payload),
show: updateShowStoreWishlist(Object.assign({}, state.show), action.payload), show: updateShowStoreWishlist(Object.assign({}, state.show), action.payload),
}) })
case 'UPDATE_LAST_SHOWS_FETCH_URL':
return Object.assign({}, state, {
lastShowsFetchUrl: action.payload.url,
})
case 'SELECT_SHOW': case 'SELECT_SHOW':
// Don't select the show if we're fetching another show's details // Don't select the show if we're fetching another show's details
if (state.fetchingDetails) { if (state.fetchingDetails) {

View File

@ -20,12 +20,8 @@ export default function userStore(state = defaultState, action) {
return logoutUser(state) return logoutUser(state)
} }
return updateFromToken(state, action.payload.data.token) return updateFromToken(state, action.payload.data.token)
case 'IS_USER_LOGGED_IN': case 'USER_SET_TOKEN':
let localToken = localStorage.getItem('token'); return updateFromToken(state, action.payload.token)
if (!localToken || localToken === "") {
return state;
}
return updateFromToken(state, localToken)
case 'USER_LOGOUT': case 'USER_LOGOUT':
return logoutUser(state) return logoutUser(state)
case 'GET_USER_FULFILLED': case 'GET_USER_FULFILLED':

View File

@ -20,7 +20,7 @@ func setupRoutes(env *web.Env) {
env.Handle("/movies/polochon", movies.PolochonMoviesHandler).WithRole(users.UserRole).Methods("GET") env.Handle("/movies/polochon", movies.PolochonMoviesHandler).WithRole(users.UserRole).Methods("GET")
env.Handle("/movies/explore", extmedias.ExploreMovies).WithRole(users.UserRole).Methods("GET") env.Handle("/movies/explore", extmedias.ExploreMovies).WithRole(users.UserRole).Methods("GET")
env.Handle("/movies/explore/options", extmedias.MovieExplorerOptions).WithRole(users.UserRole).Methods("GET") env.Handle("/movies/explore/options", extmedias.MovieExplorerOptions).WithRole(users.UserRole).Methods("GET")
env.Handle("/movies/search", movies.SearchMovie).WithRole(users.UserRole).Methods("POST") env.Handle("/movies/search/{search}", movies.SearchMovie).WithRole(users.UserRole).Methods("GET")
env.Handle("/movies/{id:tt[0-9]+}", movies.PolochonDeleteHandler).WithRole(users.UserRole).Methods("DELETE") env.Handle("/movies/{id:tt[0-9]+}", movies.PolochonDeleteHandler).WithRole(users.UserRole).Methods("DELETE")
env.Handle("/movies/{id:tt[0-9]+}/refresh", movies.RefreshMovieHandler).WithRole(users.UserRole).Methods("POST") env.Handle("/movies/{id:tt[0-9]+}/refresh", movies.RefreshMovieHandler).WithRole(users.UserRole).Methods("POST")
env.Handle("/movies/{id:tt[0-9]+}/subtitles/refresh", movies.RefreshMovieSubtitlesHandler).WithRole(users.UserRole).Methods("POST") env.Handle("/movies/{id:tt[0-9]+}/subtitles/refresh", movies.RefreshMovieSubtitlesHandler).WithRole(users.UserRole).Methods("POST")
@ -30,7 +30,7 @@ func setupRoutes(env *web.Env) {
env.Handle("/shows/polochon", shows.PolochonShowsHandler).WithRole(users.UserRole).Methods("GET") env.Handle("/shows/polochon", shows.PolochonShowsHandler).WithRole(users.UserRole).Methods("GET")
env.Handle("/shows/explore", extmedias.ExploreShows).WithRole(users.UserRole).Methods("GET") env.Handle("/shows/explore", extmedias.ExploreShows).WithRole(users.UserRole).Methods("GET")
env.Handle("/shows/explore/options", extmedias.ShowExplorerOptions).WithRole(users.UserRole).Methods("GET") env.Handle("/shows/explore/options", extmedias.ShowExplorerOptions).WithRole(users.UserRole).Methods("GET")
env.Handle("/shows/search", shows.SearchShow).WithRole(users.UserRole).Methods("POST") env.Handle("/shows/search/{search}", shows.SearchShow).WithRole(users.UserRole).Methods("GET")
env.Handle("/shows/{id:tt[0-9]+}", shows.GetDetailsHandler).WithRole(users.UserRole).Methods("GET") env.Handle("/shows/{id:tt[0-9]+}", shows.GetDetailsHandler).WithRole(users.UserRole).Methods("GET")
env.Handle("/shows/{id:tt[0-9]+}/refresh", shows.RefreshShowHandler).WithRole(users.UserRole).Methods("POST") env.Handle("/shows/{id:tt[0-9]+}/refresh", shows.RefreshShowHandler).WithRole(users.UserRole).Methods("POST")
env.Handle("/shows/{id:tt[0-9]+}/seasons/{season:[0-9]+}/episodes/{episode:[0-9]+}", shows.RefreshEpisodeHandler).WithRole(users.UserRole).Methods("POST") env.Handle("/shows/{id:tt[0-9]+}/seasons/{season:[0-9]+}/episodes/{episode:[0-9]+}", shows.RefreshEpisodeHandler).WithRole(users.UserRole).Methods("POST")

187
yarn.lock
View File

@ -1,5 +1,11 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1 # yarn lockfile v1
Base64@~0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028"
abbrev@1: abbrev@1:
version "1.0.9" version "1.0.9"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
@ -735,10 +741,6 @@ base64-js@^1.0.2:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1"
Base64@~0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028"
bcrypt-pbkdf@^1.0.0: bcrypt-pbkdf@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4"
@ -1539,6 +1541,12 @@ glob-watcher@^0.0.6:
dependencies: dependencies:
gaze "^0.5.1" gaze "^0.5.1"
glob2base@^0.0.12:
version "0.0.12"
resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
dependencies:
find-index "^0.1.1"
glob@^4.3.1: glob@^4.3.1:
version "4.5.3" version "4.5.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
@ -1567,12 +1575,6 @@ glob@~3.1.21:
inherits "1" inherits "1"
minimatch "~0.2.11" minimatch "~0.2.11"
glob2base@^0.0.12:
version "0.0.12"
resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
dependencies:
find-index "^0.1.1"
global-modules@^0.2.3: global-modules@^0.2.3:
version "0.2.3" version "0.2.3"
resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d"
@ -1765,7 +1767,7 @@ hoek@2.x.x:
version "2.16.3" version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
hoist-non-react-statics@^1.0.3, hoist-non-react-statics@^1.2.0, hoist-non-react-statics@1.2.0: hoist-non-react-statics@^1.0.3, hoist-non-react-statics@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
@ -1848,14 +1850,14 @@ inflight@^1.0.4:
once "^1.3.0" once "^1.3.0"
wrappy "1" wrappy "1"
inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
inherits@1: inherits@1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
inherits@2.0.1: inherits@2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
@ -1872,18 +1874,12 @@ interpret@^1.0.0:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" 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.0.0, invariant@^2.1.0, invariant@^2.2.0, invariant@^2.2.1, invariant@~2.2.1:
version "2.2.1" version "2.2.1"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.1.tgz#b097010547668c7e337028ebe816ebe36c8a8d54" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.1.tgz#b097010547668c7e337028ebe816ebe36c8a8d54"
dependencies: dependencies:
loose-envify "^1.0.0" loose-envify "^1.0.0"
invariant@^2.1.0, invariant@~2.2.1:
version "2.2.2"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
dependencies:
loose-envify "^1.0.0"
is-absolute-url@^2.0.0: is-absolute-url@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.0.0.tgz#9c4b20b0e5c0cbef9a479a367ede6f991679f359" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.0.0.tgz#9c4b20b0e5c0cbef9a479a367ede6f991679f359"
@ -2032,14 +2028,14 @@ is-windows@^0.2.0:
version "0.2.0" version "0.2.0"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
isarray@0.0.1: isarray@0.0.1:
version "0.0.1" version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
isexe@^1.1.1: isexe@^1.1.1:
version "1.1.2" version "1.1.2"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0"
@ -2186,7 +2182,7 @@ load-script@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4" resolved "https://registry.yarnpkg.com/load-script/-/load-script-1.0.0.tgz#0491939e0bee5643ee494a7e3da3d2bac70c6ca4"
loader-utils@^0.2.11, loader-utils@^0.2.5, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5, loader-utils@0.2.x: loader-utils@0.2.x, loader-utils@^0.2.11, loader-utils@^0.2.5, loader-utils@^0.2.7, loader-utils@~0.2.2, loader-utils@~0.2.5:
version "0.2.16" version "0.2.16"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.16.tgz#f08632066ed8282835dff88dfb52704765adee6d"
dependencies: dependencies:
@ -2265,7 +2261,7 @@ lodash.isarray@^3.0.0:
version "3.0.4" version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
lodash.isempty@^4.2.1, lodash.isempty@4.4.0: lodash.isempty@^4.2.1:
version "4.4.0" version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" resolved "https://registry.yarnpkg.com/lodash.isempty/-/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e"
@ -2322,18 +2318,10 @@ lodash.templatesettings@^3.0.0:
lodash._reinterpolate "^3.0.0" lodash._reinterpolate "^3.0.0"
lodash.escape "^3.0.0" lodash.escape "^3.0.0"
lodash@^4.10.0: lodash@^4.10.0, lodash@^4.2.0, lodash@^4.2.1:
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
lodash@^4.2.0:
version "4.16.6" version "4.16.6"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777"
lodash@^4.2.1:
version "4.17.0"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.0.tgz#93f4466e5ab73e5a1f1216c34eea11535f0a8df5"
lodash@~1.0.1: lodash@~1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
@ -2431,14 +2419,14 @@ mime-types@^2.1.12, mime-types@~2.1.7:
dependencies: dependencies:
mime-db "~1.24.0" mime-db "~1.24.0"
mime@^1.2.11:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
mime@1.2.x: mime@1.2.x:
version "1.2.11" version "1.2.11"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10" resolved "https://registry.yarnpkg.com/mime/-/mime-1.2.11.tgz#58203eed86e3a5ef17aed2b7d9ebd47f0a60dd10"
mime@^1.2.11:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
minimatch@^2.0.1: minimatch@^2.0.1:
version "2.0.10" version "2.0.10"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
@ -2458,19 +2446,15 @@ minimatch@~0.2.11:
lru-cache "2" lru-cache "2"
sigmund "~1.0.0" sigmund "~1.0.0"
minimist@0.0.8, minimist@~0.0.1:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
minimist@~0.0.1: "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.5.1" version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies: dependencies:
@ -3024,14 +3008,14 @@ prr@~0.0.0:
version "0.0.0" version "0.0.0"
resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a"
punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
punycode@1.3.2: punycode@1.3.2:
version "1.3.2" version "1.3.2"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
q@^1.1.2: q@^1.1.2:
version "1.4.1" version "1.4.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e"
@ -3040,14 +3024,7 @@ qs@~6.3.0:
version "6.3.0" version "6.3.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"
query-string@^4.1.0, query-string@^4.2.2: query-string@^4.1.0, query-string@^4.2.2, query-string@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.2.3.tgz#9f27273d207a25a8ee4c7b8c74dcd45d556db822"
dependencies:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"
query-string@^4.2.3:
version "4.3.1" version "4.3.1"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.1.tgz#54baada6713eafc92be75c47a731f2ebd09cd11d" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.1.tgz#54baada6713eafc92be75c47a731f2ebd09cd11d"
dependencies: dependencies:
@ -3191,27 +3168,6 @@ read-pkg@^1.0.0:
normalize-package-data "^2.3.2" normalize-package-data "^2.3.2"
path-type "^1.0.0" path-type "^1.0.0"
readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.9:
version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "0.0.1"
string_decoder "~0.10.x"
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2:
version "2.2.1"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.1.tgz#c459a6687ad6195f936b959870776edef27a7655"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
"readable-stream@>=1.0.33-1 <1.1.0-0": "readable-stream@>=1.0.33-1 <1.1.0-0":
version "1.0.34" version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
@ -3221,10 +3177,20 @@ readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.9:
isarray "0.0.1" isarray "0.0.1"
string_decoder "~0.10.x" string_decoder "~0.10.x"
readable-stream@~2.0.0: readable-stream@^1.0.27-1, readable-stream@^1.1.13, readable-stream@~1.1.9:
version "2.0.6" version "1.1.14"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
dependencies: dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "0.0.1"
string_decoder "~0.10.x"
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@~2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0"
dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0" core-util-is "~1.0.0"
inherits "~2.0.1" inherits "~2.0.1"
isarray "~1.0.0" isarray "~1.0.0"
@ -3232,11 +3198,10 @@ readable-stream@~2.0.0:
string_decoder "~0.10.x" string_decoder "~0.10.x"
util-deprecate "~1.0.1" util-deprecate "~1.0.1"
readable-stream@~2.1.4: readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.0.0:
version "2.1.5" version "2.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
dependencies: dependencies:
buffer-shims "^1.0.0"
core-util-is "~1.0.0" core-util-is "~1.0.0"
inherits "~2.0.1" inherits "~2.0.1"
isarray "~1.0.0" isarray "~1.0.0"
@ -3289,13 +3254,6 @@ redux:
loose-envify "^1.1.0" loose-envify "^1.1.0"
symbol-observable "^1.0.2" symbol-observable "^1.0.2"
redux-auth-wrapper:
version "0.9.0"
resolved "https://registry.yarnpkg.com/redux-auth-wrapper/-/redux-auth-wrapper-0.9.0.tgz#4456a73f44ea8b1e996906127feffac890ba6913"
dependencies:
hoist-non-react-statics "1.2.0"
lodash.isempty "4.4.0"
redux-logger: redux-logger:
version "2.7.4" version "2.7.4"
resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-2.7.4.tgz#891e5d29e7f111d08b5781a237b9965b5858c7f8" resolved "https://registry.yarnpkg.com/redux-logger/-/redux-logger-2.7.4.tgz#891e5d29e7f111d08b5781a237b9965b5858c7f8"
@ -3411,7 +3369,7 @@ right-align@^0.1.1:
dependencies: dependencies:
align-text "^0.1.1" align-text "^0.1.1"
rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: rimraf@2, rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4:
version "2.5.4" version "2.5.4"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
dependencies: dependencies:
@ -3425,11 +3383,11 @@ sax@~1.2.1:
version "1.2.1" version "1.2.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a"
semver@^4.1.0: "semver@2 || 3 || 4 || 5", semver@^4.1.0:
version "4.3.6" version "4.3.6"
resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
semver@~5.3.0, "semver@2 || 3 || 4 || 5": semver@~5.3.0:
version "5.3.0" version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
@ -3545,10 +3503,6 @@ strict-uri-encode@^1.0.0:
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
string_decoder@~0.10.25, string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
string-width@^1.0.1: string-width@^1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@ -3557,6 +3511,10 @@ string-width@^1.0.1:
is-fullwidth-code-point "^1.0.0" is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0" strip-ansi "^3.0.0"
string_decoder@~0.10.25, string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
stringstream@~0.0.4: stringstream@~0.0.4:
version "0.0.5" version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@ -3647,10 +3605,6 @@ tar@~2.2.1:
fstream "^1.0.2" fstream "^1.0.2"
inherits "2" inherits "2"
through@^2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
through2@^0.6.1: through2@^0.6.1:
version "0.6.5" version "0.6.5"
resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
@ -3665,6 +3619,10 @@ through2@^2.0.0:
readable-stream "~2.0.0" readable-stream "~2.0.0"
xtend "~4.0.0" xtend "~4.0.0"
through@^2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
tildify@^1.0.0: tildify@^1.0.0:
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
@ -3778,7 +3736,7 @@ util-deprecate@~1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
util@~0.10.3, util@0.10.3: util@0.10.3, util@~0.10.3:
version "0.10.3" version "0.10.3"
resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
dependencies: dependencies:
@ -3936,19 +3894,19 @@ window-size@0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
wordwrap@0.0.2: wordwrap@0.0.2:
version "0.0.2" version "0.0.2"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
wrappy@1: wrappy@1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
xtend@^4.0.0, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0: "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0:
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
@ -3960,4 +3918,3 @@ yargs@~3.10.0:
cliui "^2.1.0" cliui "^2.1.0"
decamelize "^1.0.0" decamelize "^1.0.0"
window-size "0.1.0" window-size "0.1.0"