mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
Move and rename sluice prize app to 'simple_prize'
This commit is contained in:
parent
3cde6eec95
commit
5adc34faeb
@ -18,7 +18,7 @@ function getPrizeApiUrls(subdomain) {
|
||||
'ratings': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/',
|
||||
'rating': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/',
|
||||
'rating_average': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/average/',
|
||||
'select_piece' : AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/select/',
|
||||
'select_piece': AppPrizeConstants.prizeApiEndpoint + subdomain + '/ratings/${piece_id}/select/',
|
||||
'notes': AppPrizeConstants.prizeApiEndpoint + subdomain + '/notes/',
|
||||
'note': AppPrizeConstants.prizeApiEndpoint + subdomain + '/notes/${piece_id}/'
|
||||
|
||||
|
@ -3,58 +3,67 @@
|
||||
import React from 'react';
|
||||
import { Route, IndexRoute } from 'react-router';
|
||||
|
||||
import Landing from './components/prize_landing';
|
||||
import LoginContainer from './components/prize_login_container';
|
||||
import LogoutContainer from '../../../components/logout_container';
|
||||
import SignupContainer from './components/prize_signup_container';
|
||||
import PasswordResetContainer from '../../../components/password_reset_container';
|
||||
import PrizeRegisterPiece from './components/prize_register_piece';
|
||||
import PrizePieceList from './components/prize_piece_list';
|
||||
import PrizePieceContainer from './components/ascribe_detail/prize_piece_container';
|
||||
import EditionContainer from '../../ascribe_detail/edition_container';
|
||||
import SettingsContainer from './components/prize_settings_container';
|
||||
import CoaVerifyContainer from '../../../components/coa_verify_container';
|
||||
import ErrorNotFoundPage from '../../../components/error_not_found_page';
|
||||
import SPLanding from './simple_prize/components/prize_landing';
|
||||
import SPLoginContainer from './simple_prize/components/prize_login_container';
|
||||
import SPSignupContainer from './simple_prize/components/prize_signup_container';
|
||||
import SPRegisterPiece from './simple_prize/components/prize_register_piece';
|
||||
import SPPieceList from './simple_prize/components/prize_piece_list';
|
||||
import SPPieceContainer from './simple_prize/components/ascribe_detail/prize_piece_container';
|
||||
import SPSettingsContainer from './simple_prize/components/prize_settings_container';
|
||||
import SPApp from './simple_prize/prize_app';
|
||||
|
||||
import App from './prize_app';
|
||||
import EditionContainer from '../../ascribe_detail/edition_container';
|
||||
import LogoutContainer from '../../logout_container';
|
||||
import PasswordResetContainer from '../../password_reset_container';
|
||||
import CoaVerifyContainer from '../../coa_verify_container';
|
||||
import ErrorNotFoundPage from '../../error_not_found_page';
|
||||
|
||||
import AuthProxyHandler from '../../../components/ascribe_routes/proxy_routes/auth_proxy_handler';
|
||||
|
||||
|
||||
function getRoutes() {
|
||||
return (
|
||||
<Route path='/' component={App}>
|
||||
<IndexRoute component={Landing} />
|
||||
const ROUTES = {
|
||||
'sluice': (
|
||||
<Route path='/' component={SPApp}>
|
||||
<IndexRoute component={SPLanding} />
|
||||
<Route
|
||||
path='login'
|
||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(LoginContainer)} />
|
||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SPLoginContainer)} />
|
||||
<Route
|
||||
path='logout'
|
||||
component={AuthProxyHandler({to: '/', when: 'loggedOut'})(LogoutContainer)}/>
|
||||
<Route
|
||||
path='signup'
|
||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SignupContainer)} />
|
||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SPSignupContainer)} />
|
||||
<Route
|
||||
path='password_reset'
|
||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(PasswordResetContainer)} />
|
||||
<Route
|
||||
path='settings'
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(SettingsContainer)}/>
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(SPSettingsContainer)}/>
|
||||
<Route
|
||||
path='register_piece'
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(PrizeRegisterPiece)}
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(SPRegisterPiece)}
|
||||
headerTitle='+ NEW WORK'/>
|
||||
<Route
|
||||
path='collection'
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(PrizePieceList)}
|
||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(SPPieceList)}
|
||||
headerTitle='COLLECTION'/>
|
||||
|
||||
<Route path='pieces/:pieceId' component={PrizePieceContainer} />
|
||||
<Route path='pieces/:pieceId' component={SPPieceContainer} />
|
||||
<Route path='editions/:editionId' component={EditionContainer} />
|
||||
<Route path='verify' component={CoaVerifyContainer} />
|
||||
<Route path='*' component={ErrorNotFoundPage} />
|
||||
</Route>
|
||||
);
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
function getRoutes(commonRoutes, subdomain) {
|
||||
if(subdomain in ROUTES) {
|
||||
return ROUTES[subdomain];
|
||||
} else {
|
||||
throw new Error('Subdomain wasn\'t specified in the wallet app.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
import Q from 'q';
|
||||
|
||||
import PrizeFetcher from '../fetchers/prize_fetcher';
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
import Q from 'q';
|
||||
|
||||
import PrizeJuryFetcher from '../fetchers/prize_jury_fetcher';
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
import Q from 'q';
|
||||
|
||||
import PrizeRatingFetcher from '../fetchers/prize_rating_fetcher';
|
@ -4,25 +4,25 @@ import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
import StarRating from 'react-star-rating';
|
||||
|
||||
import PieceListActions from '../../../../../actions/piece_list_actions';
|
||||
import PieceListStore from '../../../../../stores/piece_list_store';
|
||||
import PieceListActions from '../../../../../../actions/piece_list_actions';
|
||||
import PieceListStore from '../../../../../../stores/piece_list_store';
|
||||
|
||||
import PrizeRatingActions from '../../actions/prize_rating_actions';
|
||||
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
import UserStore from '../../../../../../stores/user_store';
|
||||
|
||||
import InputCheckbox from '../../../../ascribe_forms/input_checkbox';
|
||||
import InputCheckbox from '../../../../../ascribe_forms/input_checkbox';
|
||||
|
||||
import AccordionListItemPiece from '../../../../ascribe_accordion_list/accordion_list_item_piece';
|
||||
import AccordionListItemPiece from '../../../../../ascribe_accordion_list/accordion_list_item_piece';
|
||||
|
||||
import GlobalNotificationModel from '../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../actions/global_notification_actions';
|
||||
import GlobalNotificationModel from '../../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
|
||||
|
||||
import AclProxy from '../../../../acl_proxy';
|
||||
import AclProxy from '../../../../../acl_proxy';
|
||||
import SubmitToPrizeButton from './../ascribe_buttons/submit_to_prize_button';
|
||||
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../../../utils/lang_utils';
|
||||
import { mergeOptions } from '../../../../../../utils/general_utils';
|
||||
|
||||
|
||||
let AccordionListItemPrize = React.createClass({
|
@ -3,10 +3,10 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import ModalWrapper from '../../../../ascribe_modal/modal_wrapper';
|
||||
import PieceSubmitToPrizeForm from '../../../../ascribe_forms/form_submit_to_prize';
|
||||
import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
|
||||
import PieceSubmitToPrizeForm from '../../../../../ascribe_forms/form_submit_to_prize';
|
||||
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { getLangText } from '../../../../../../utils/lang_utils';
|
||||
|
||||
let SubmitToPrizeButton = React.createClass({
|
||||
propTypes: {
|
@ -6,41 +6,41 @@ import Moment from 'moment';
|
||||
|
||||
import StarRating from 'react-star-rating';
|
||||
|
||||
import PieceActions from '../../../../../actions/piece_actions';
|
||||
import PieceStore from '../../../../../stores/piece_store';
|
||||
import PieceActions from '../../../../../../actions/piece_actions';
|
||||
import PieceStore from '../../../../../../stores/piece_store';
|
||||
|
||||
import PieceListStore from '../../../../../stores/piece_list_store';
|
||||
import PieceListActions from '../../../../../actions/piece_list_actions';
|
||||
import PieceListStore from '../../../../../../stores/piece_list_store';
|
||||
import PieceListActions from '../../../../../../actions/piece_list_actions';
|
||||
|
||||
import PrizeRatingActions from '../../actions/prize_rating_actions';
|
||||
import PrizeRatingStore from '../../stores/prize_rating_store';
|
||||
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
import UserStore from '../../../../../../stores/user_store';
|
||||
|
||||
import Piece from '../../../../../components/ascribe_detail/piece';
|
||||
import Note from '../../../../../components/ascribe_detail/note';
|
||||
import Piece from '../../../../../../components/ascribe_detail/piece';
|
||||
import Note from '../../../../../../components/ascribe_detail/note';
|
||||
|
||||
import AscribeSpinner from '../../../../ascribe_spinner';
|
||||
import AscribeSpinner from '../../../../../ascribe_spinner';
|
||||
|
||||
import Form from '../../../../../components/ascribe_forms/form';
|
||||
import Property from '../../../../../components/ascribe_forms/property';
|
||||
import InputTextAreaToggable from '../../../../../components/ascribe_forms/input_textarea_toggable';
|
||||
import CollapsibleParagraph from '../../../../../components/ascribe_collapsible/collapsible_paragraph';
|
||||
import Form from '../../../../../../components/ascribe_forms/form';
|
||||
import Property from '../../../../../../components/ascribe_forms/property';
|
||||
import InputTextAreaToggable from '../../../../../../components/ascribe_forms/input_textarea_toggable';
|
||||
import CollapsibleParagraph from '../../../../../../components/ascribe_collapsible/collapsible_paragraph';
|
||||
|
||||
import InputCheckbox from '../../../../ascribe_forms/input_checkbox';
|
||||
import LoanForm from '../../../../ascribe_forms/form_loan';
|
||||
import ListRequestActions from '../../../../ascribe_forms/list_form_request_actions';
|
||||
import ModalWrapper from '../../../../ascribe_modal/modal_wrapper';
|
||||
import InputCheckbox from '../../../../../ascribe_forms/input_checkbox';
|
||||
import LoanForm from '../../../../../ascribe_forms/form_loan';
|
||||
import ListRequestActions from '../../../../../ascribe_forms/list_form_request_actions';
|
||||
import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
|
||||
|
||||
import GlobalNotificationModel from '../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../actions/global_notification_actions';
|
||||
import GlobalNotificationModel from '../../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../../actions/global_notification_actions';
|
||||
|
||||
import DetailProperty from '../../../../ascribe_detail/detail_property';
|
||||
import DetailProperty from '../../../../../ascribe_detail/detail_property';
|
||||
|
||||
import ApiUrls from '../../../../../constants/api_urls';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
import ApiUrls from '../../../../../../constants/api_urls';
|
||||
import { mergeOptions } from '../../../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../../utils/dom_utils';
|
||||
|
||||
|
||||
/**
|
@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import constants from '../../../../constants/application_constants';
|
||||
import constants from '../../../../../constants/application_constants';
|
||||
|
||||
|
||||
let Hero = React.createClass({
|
@ -11,11 +11,11 @@ import ButtonGroup from 'react-bootstrap/lib/ButtonGroup';
|
||||
|
||||
import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
|
||||
|
||||
import UserStore from '../../../../stores/user_store';
|
||||
import UserActions from '../../../../actions/user_actions';
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
import UserActions from '../../../../../actions/user_actions';
|
||||
|
||||
import { mergeOptions } from '../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
|
||||
let Landing = React.createClass({
|
||||
|
@ -3,10 +3,10 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
|
||||
import LoginForm from '../../../ascribe_forms/form_login';
|
||||
import LoginForm from '../../../../ascribe_forms/form_login';
|
||||
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
|
||||
|
||||
let LoginContainer = React.createClass({
|
@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import PieceList from '../../../piece_list';
|
||||
import PieceList from '../../../../piece_list';
|
||||
|
||||
import UserActions from '../../../../actions/user_actions';
|
||||
import UserStore from '../../../../stores/user_store';
|
||||
import UserActions from '../../../../../actions/user_actions';
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
|
||||
import PrizeActions from '../actions/prize_actions';
|
||||
import PrizeStore from '../stores/prize_store';
|
||||
@ -15,9 +15,9 @@ import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
|
||||
|
||||
import AccordionListItemPrize from './ascribe_accordion_list/accordion_list_item_prize';
|
||||
|
||||
import { mergeOptions } from '../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
|
||||
let PrizePieceList = React.createClass({
|
||||
propTypes: {
|
@ -5,13 +5,13 @@ import React from 'react';
|
||||
import PrizeActions from '../actions/prize_actions';
|
||||
import PrizeStore from '../stores/prize_store';
|
||||
|
||||
import RegisterPiece from '../../../register_piece';
|
||||
import Property from '../../../ascribe_forms/property';
|
||||
import InputTextAreaToggable from '../../../ascribe_forms/input_textarea_toggable';
|
||||
import InputCheckbox from '../../../ascribe_forms/input_checkbox';
|
||||
import RegisterPiece from '../../../../register_piece';
|
||||
import Property from '../../../../ascribe_forms/property';
|
||||
import InputTextAreaToggable from '../../../../ascribe_forms/input_textarea_toggable';
|
||||
import InputCheckbox from '../../../../ascribe_forms/input_checkbox';
|
||||
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
|
||||
|
||||
let PrizeRegisterPiece = React.createClass({
|
@ -2,29 +2,29 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import UserStore from '../../../../stores/user_store';
|
||||
import UserActions from '../../../../actions/user_actions';
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
import UserActions from '../../../../../actions/user_actions';
|
||||
import PrizeActions from '../actions/prize_actions';
|
||||
import PrizeStore from '../stores/prize_store';
|
||||
import PrizeJuryActions from '../actions/prize_jury_actions';
|
||||
import PrizeJuryStore from '../stores/prize_jury_store';
|
||||
|
||||
import SettingsContainer from '../../../ascribe_settings/settings_container';
|
||||
import CollapsibleParagraph from '../../../ascribe_collapsible/collapsible_paragraph';
|
||||
import SettingsContainer from '../../../../ascribe_settings/settings_container';
|
||||
import CollapsibleParagraph from '../../../../ascribe_collapsible/collapsible_paragraph';
|
||||
|
||||
import Form from '../../../ascribe_forms/form';
|
||||
import Property from '../../../ascribe_forms/property';
|
||||
import Form from '../../../../ascribe_forms/form';
|
||||
import Property from '../../../../ascribe_forms/property';
|
||||
|
||||
import ActionPanel from '../../../ascribe_panel/action_panel';
|
||||
import ActionPanel from '../../../../ascribe_panel/action_panel';
|
||||
|
||||
import GlobalNotificationModel from '../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../actions/global_notification_actions';
|
||||
import GlobalNotificationModel from '../../../../../models/global_notification_model';
|
||||
import GlobalNotificationActions from '../../../../../actions/global_notification_actions';
|
||||
|
||||
import AscribeSpinner from '../../../ascribe_spinner';
|
||||
import ApiUrls from '../../../../constants/api_urls';
|
||||
import AscribeSpinner from '../../../../ascribe_spinner';
|
||||
import ApiUrls from '../../../../../constants/api_urls';
|
||||
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
|
||||
|
||||
let Settings = React.createClass({
|
@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
import React from 'react';
|
||||
import SignupForm from '../../../ascribe_forms/form_signup';
|
||||
import SignupForm from '../../../../ascribe_forms/form_signup';
|
||||
|
||||
import { getLangText } from '../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../utils/dom_utils';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { setDocumentTitle } from '../../../../../utils/dom_utils';
|
||||
|
||||
let SignupContainer = React.createClass({
|
||||
propTypes: {
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import requests from '../../../../utils/requests';
|
||||
import requests from '../../../../../utils/requests';
|
||||
|
||||
|
||||
let PrizeFetcher = {
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import requests from '../../../../utils/requests';
|
||||
import requests from '../../../../../utils/requests';
|
||||
|
||||
|
||||
let PrizeJuryFetcher = {
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import requests from '../../../../utils/requests';
|
||||
import requests from '../../../../../utils/requests';
|
||||
|
||||
|
||||
let PrizeRatingFetcher = {
|
@ -2,11 +2,11 @@
|
||||
|
||||
import React from 'react';
|
||||
import Hero from './components/prize_hero';
|
||||
import Header from '../../header';
|
||||
import Footer from '../../footer';
|
||||
import GlobalNotification from '../../global_notification';
|
||||
import Header from '../../../header';
|
||||
import Footer from '../../../footer';
|
||||
import GlobalNotification from '../../../global_notification';
|
||||
|
||||
import { getSubdomain } from '../../../utils/general_utils';
|
||||
import { getSubdomain } from '../../../../utils/general_utils';
|
||||
|
||||
|
||||
let PrizeApp = React.createClass({
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
|
||||
import PrizeJuryActions from '../actions/prize_jury_actions';
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
|
||||
import PrizeRatingActions from '../actions/prize_rating_actions';
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
import { alt } from '../../../../alt';
|
||||
import { alt } from '../../../../../alt';
|
||||
|
||||
import PrizeActions from '../actions/prize_actions';
|
||||
|
Loading…
Reference in New Issue
Block a user