mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Merge pull request #99 from ascribe/AD-1396-log-404-page-views-when-previous-view-was-within-the-app
AD-1396 Log 404 page views when previous view was within the app
This commit is contained in:
commit
2c5b029e08
57
js/components/app_base.js
Normal file
57
js/components/app_base.js
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
import { History } from 'react-router';
|
||||||
|
|
||||||
|
import GlobalNotification from './global_notification';
|
||||||
|
|
||||||
|
import AppConstants from '../constants/application_constants';
|
||||||
|
|
||||||
|
|
||||||
|
export default function AppBase(App) {
|
||||||
|
return React.createClass({
|
||||||
|
displayName: 'AppBase',
|
||||||
|
|
||||||
|
propTypes: {
|
||||||
|
children: React.PropTypes.element.isRequired,
|
||||||
|
history: React.PropTypes.object.isRequired,
|
||||||
|
location: React.PropTypes.object.isRequired,
|
||||||
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
|
||||||
|
},
|
||||||
|
|
||||||
|
mixins: [History],
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
this.history.locationQueue.push(this.props.location);
|
||||||
|
},
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
const { locationQueue } = this.history;
|
||||||
|
locationQueue.unshift(nextProps.location);
|
||||||
|
|
||||||
|
// Limit the number of locations to keep in memory to avoid too much memory usage
|
||||||
|
if (locationQueue.length > AppConstants.locationThreshold) {
|
||||||
|
locationQueue.length = AppConstants.locationThreshold;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { routes } = this.props;
|
||||||
|
|
||||||
|
// The second element of the routes prop given to us by react-router is always the
|
||||||
|
// active second-level component object (ie. after App).
|
||||||
|
const activeRoute = routes[1];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<App
|
||||||
|
{...this.props}
|
||||||
|
activeRoute={activeRoute} />
|
||||||
|
<GlobalNotification />
|
||||||
|
<div id="modal" className="container" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
@ -2,36 +2,32 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import Header from '../components/header';
|
import AppBase from './app_base';
|
||||||
import Footer from '../components/footer';
|
import Footer from './footer';
|
||||||
import GlobalNotification from './global_notification';
|
import Header from './header';
|
||||||
|
|
||||||
|
|
||||||
let AscribeApp = React.createClass({
|
let AscribeApp = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
children: React.PropTypes.oneOfType([
|
activeRoute: React.PropTypes.object.isRequired,
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
children: React.PropTypes.element.isRequired,
|
||||||
React.PropTypes.element
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
|
||||||
]),
|
|
||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { children, routes } = this.props;
|
const { activeRoute, children, routes } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container ascribe-default-app">
|
<div className="ascribe-default-app">
|
||||||
<Header routes={routes} />
|
<Header routes={routes} />
|
||||||
{/* Routes are injected here */}
|
<div className="container ascribe-body">
|
||||||
<div className="ascribe-body">
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
<Footer activeRoute={activeRoute} />
|
||||||
<GlobalNotification />
|
|
||||||
<div id="modal" className="container"></div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default AscribeApp;
|
export default AppBase(AscribeApp);
|
||||||
|
@ -14,7 +14,7 @@ import AppConstants from '../../../constants/application_constants';
|
|||||||
import { AclInformationText } from '../../../constants/acl_information_text';
|
import { AclInformationText } from '../../../constants/acl_information_text';
|
||||||
|
|
||||||
|
|
||||||
export default function ({ action, displayName, title, tooltip }) {
|
export default function AclButton({ action, displayName, title, tooltip }) {
|
||||||
if (AppConstants.aclList.indexOf(action) < 0) {
|
if (AppConstants.aclList.indexOf(action) < 0) {
|
||||||
console.warn('Your specified aclName did not match a an acl class.');
|
console.warn('Your specified aclName did not match a an acl class.');
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { History } from 'react-router';
|
||||||
|
|
||||||
import { getLangText } from '../utils/lang_utils';
|
import { getLangText } from '../utils/lang_utils';
|
||||||
|
|
||||||
@ -10,12 +11,25 @@ let ErrorNotFoundPage = React.createClass({
|
|||||||
message: React.PropTypes.string
|
message: React.PropTypes.string
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mixins: [History],
|
||||||
|
|
||||||
getDefaultProps() {
|
getDefaultProps() {
|
||||||
return {
|
return {
|
||||||
message: getLangText("Oops, the page you are looking for doesn't exist.")
|
message: getLangText("Oops, the page you are looking for doesn't exist.")
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
// The previous page, if any, is the second item in the locationQueue
|
||||||
|
const { locationQueue: [ , previousPage ] } = this.history;
|
||||||
|
|
||||||
|
if (previousPage) {
|
||||||
|
console.logGlobal('Page not found', {
|
||||||
|
previousPath: previousPage.pathname
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="row">
|
<div className="row">
|
||||||
@ -32,4 +46,4 @@ let ErrorNotFoundPage = React.createClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default ErrorNotFoundPage;
|
export default ErrorNotFoundPage;
|
||||||
|
@ -5,8 +5,12 @@ import React from 'react';
|
|||||||
import { getLangText } from '../utils/lang_utils';
|
import { getLangText } from '../utils/lang_utils';
|
||||||
|
|
||||||
let Footer = React.createClass({
|
let Footer = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
activeRoute: React.PropTypes.object.isRequired
|
||||||
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return !this.props.activeRoute.hideFooter ? (
|
||||||
<div className="ascribe-footer hidden-print">
|
<div className="ascribe-footer hidden-print">
|
||||||
<p className="ascribe-sub-sub-statement">
|
<p className="ascribe-sub-sub-statement">
|
||||||
<br />
|
<br />
|
||||||
@ -24,7 +28,7 @@ let Footer = React.createClass({
|
|||||||
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
|
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
) : null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,28 +1,29 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import GlobalNotification from '../../../global_notification';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import Hero from './components/pr_hero';
|
|
||||||
import Header from '../../../header';
|
|
||||||
|
|
||||||
import EventActions from '../../../../actions/event_actions';
|
import EventActions from '../../../../actions/event_actions';
|
||||||
|
|
||||||
import UserStore from '../../../../stores/user_store';
|
import UserStore from '../../../../stores/user_store';
|
||||||
import UserActions from '../../../../actions/user_actions';
|
import UserActions from '../../../../actions/user_actions';
|
||||||
|
|
||||||
|
import Hero from './components/pr_hero';
|
||||||
|
|
||||||
|
import AppBase from '../../../app_base';
|
||||||
|
import Footer from '../../../footer';
|
||||||
|
import Header from '../../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../../utils/general_utils';
|
import { getSubdomain } from '../../../../utils/general_utils';
|
||||||
import { getCookie } from '../../../../utils/fetch_api_utils';
|
import { getCookie } from '../../../../utils/fetch_api_utils';
|
||||||
|
|
||||||
|
|
||||||
let PRApp = React.createClass({
|
let PRApp = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
children: React.PropTypes.oneOfType([
|
activeRoute: React.PropTypes.object.isRequired,
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
children: React.PropTypes.element.isRequired,
|
||||||
React.PropTypes.element
|
history: React.PropTypes.object.isRequired,
|
||||||
]),
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
|
||||||
history: React.PropTypes.object,
|
|
||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
@ -55,36 +56,37 @@ let PRApp = React.createClass({
|
|||||||
this.setState(state);
|
this.setState(state);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { history, children, routes } = this.props;
|
const { activeRoute, children, history, routes } = this.props;
|
||||||
const { currentUser } = this.state;
|
const { currentUser } = this.state;
|
||||||
|
const subdomain = getSubdomain();
|
||||||
|
const path = activeRoute && activeRoute.path;
|
||||||
|
|
||||||
let style = {};
|
let style = {};
|
||||||
let subdomain = getSubdomain();
|
|
||||||
let header;
|
let header;
|
||||||
|
|
||||||
|
|
||||||
if (currentUser && currentUser.email && history.isActive(`/pieces/${getCookie(currentUser.email)}`)) {
|
if (currentUser && currentUser.email && history.isActive(`/pieces/${getCookie(currentUser.email)}`)) {
|
||||||
header = <Hero currentUser={currentUser} />;
|
header = (<Hero currentUser={currentUser} />);
|
||||||
style = { paddingTop: '0 !important' };
|
style = { paddingTop: '0 !important' };
|
||||||
} else if(currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
|
} else if (currentUser && (currentUser.is_admin || currentUser.is_jury || currentUser.is_judge)) {
|
||||||
header = <Header routes={routes} />;
|
header = (<Header routes={routes} />);
|
||||||
} else {
|
} else {
|
||||||
style = { paddingTop: '0 !important' };
|
style = { paddingTop: '0 !important' };
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div
|
||||||
|
style={style}
|
||||||
|
className={classNames('ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
{header}
|
{header}
|
||||||
<div
|
<div className="container ascribe-body">
|
||||||
style={style}
|
{/* Routes are injected here */}
|
||||||
className={'container ascribe-prize-app client--' + subdomain}>
|
|
||||||
{children}
|
{children}
|
||||||
<GlobalNotification />
|
|
||||||
<div id="modal" className="container"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default PRApp;
|
export default AppBase(PRApp);
|
||||||
|
@ -31,74 +31,116 @@ import { AuthPrizeRoleRedirect } from './portfolioreview/components/pr_routes/pr
|
|||||||
const ROUTES = {
|
const ROUTES = {
|
||||||
sluice: (
|
sluice: (
|
||||||
<Route path='/' component={SPApp}>
|
<Route path='/' component={SPApp}>
|
||||||
<IndexRoute component={SPLanding} />
|
<IndexRoute
|
||||||
|
component={SPLanding}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}/>
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}/>
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'/>
|
headerTitle='+ NEW WORK'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
||||||
headerTitle='COLLECTION'/>
|
headerTitle='COLLECTION'
|
||||||
<Route path='pieces/:pieceId' component={SluicePieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={EditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={SluicePieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={EditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
),
|
),
|
||||||
portfolioreview: (
|
portfolioreview: (
|
||||||
<Route path='/' component={PRApp}>
|
<Route path='/' component={PRApp}>
|
||||||
<IndexRoute component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} />
|
<IndexRoute
|
||||||
|
component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}/>
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
|
||||||
headerTitle='SUBMISSIONS'/>
|
headerTitle='SUBMISSIONS'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(
|
component={ProxyHandler(
|
||||||
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
||||||
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
||||||
)(SPLoginContainer)} />
|
)(SPLoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(
|
component={ProxyHandler(
|
||||||
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
||||||
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
||||||
)(SPSignupContainer)} />
|
)(SPSignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(
|
component={ProxyHandler(
|
||||||
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
|
||||||
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
|
||||||
)(PasswordResetContainer)} />
|
)(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}/>
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}
|
||||||
<Route path='pieces/:pieceId' component={SPPieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={EditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={SPPieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={EditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -1,50 +1,49 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import Hero from './components/prize_hero';
|
import Hero from './components/prize_hero';
|
||||||
import Header from '../../../header';
|
|
||||||
|
import AppBase from '../../../app_base';
|
||||||
import Footer from '../../../footer';
|
import Footer from '../../../footer';
|
||||||
import GlobalNotification from '../../../global_notification';
|
import Header from '../../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../../utils/general_utils';
|
import { getSubdomain } from '../../../../utils/general_utils';
|
||||||
|
|
||||||
|
|
||||||
let PrizeApp = React.createClass({
|
let PrizeApp = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
children: React.PropTypes.oneOfType([
|
activeRoute: React.PropTypes.object.isRequired,
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
children: React.PropTypes.element.isRequired,
|
||||||
React.PropTypes.element
|
history: React.PropTypes.object.isRequired,
|
||||||
]),
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
|
||||||
history: React.PropTypes.object,
|
|
||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { history, routes } = this.props;
|
const { activeRoute, children, history, routes } = this.props;
|
||||||
|
const subdomain = getSubdomain();
|
||||||
|
const path = activeRoute && activeRoute.path;
|
||||||
|
|
||||||
let header = null;
|
let header = null;
|
||||||
let subdomain = getSubdomain();
|
|
||||||
|
|
||||||
// The second element of routes is always the active component object, where we can
|
|
||||||
// extract the path.
|
|
||||||
let path = routes[1] ? routes[1].path : null;
|
|
||||||
|
|
||||||
// if the path of the current activeRoute is not defined, then this is the IndexRoute
|
// if the path of the current activeRoute is not defined, then this is the IndexRoute
|
||||||
if (!path || history.isActive('/login') || history.isActive('/signup')) {
|
if (!path || history.isActive('/login') || history.isActive('/signup')) {
|
||||||
header = <Hero />;
|
header = (<Hero />);
|
||||||
} else {
|
} else {
|
||||||
header = <Header routes={routes}/>;
|
header = (<Header routes={routes} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'container ascribe-prize-app client--' + subdomain}>
|
<div className={classNames('ascribe-prize-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
{header}
|
{header}
|
||||||
{this.props.children}
|
<div className="container ascribe-body">
|
||||||
<GlobalNotification />
|
{/* Routes are injected here */}
|
||||||
<div id="modal" className="container"></div>
|
{children}
|
||||||
<Footer />
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default PrizeApp;
|
export default AppBase(PrizeApp);
|
||||||
|
@ -36,7 +36,7 @@ let Vivi23Landing = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="container ascribe-form-wrapper vivi23-landing">
|
<div className="ascribe-form-wrapper vivi23-landing">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-xs-12">
|
<div className="col-xs-12">
|
||||||
<div className="row vivi23-landing--header">
|
<div className="row vivi23-landing--header">
|
||||||
|
@ -57,7 +57,7 @@ let CylandLanding = React.createClass({
|
|||||||
setDocumentTitle('CYLAND MediaArtLab');
|
setDocumentTitle('CYLAND MediaArtLab');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container ascribe-form-wrapper cyland-landing">
|
<div className="ascribe-form-wrapper cyland-landing">
|
||||||
<div className="row">
|
<div className="row">
|
||||||
<div className="col-xs-12">
|
<div className="col-xs-12">
|
||||||
<div className="row" style={{border: '1px solid #CCC', padding: '2em'}}>
|
<div className="row" style={{border: '1px solid #CCC', padding: '2em'}}>
|
||||||
|
@ -1,57 +1,51 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Header from '../../header';
|
|
||||||
import Footer from '../../footer';
|
|
||||||
|
|
||||||
import GlobalNotification from '../../global_notification';
|
|
||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
import AppBase from '../../app_base';
|
||||||
|
import Footer from '../../footer';
|
||||||
|
import Header from '../../header';
|
||||||
|
|
||||||
import { getSubdomain } from '../../../utils/general_utils';
|
import { getSubdomain } from '../../../utils/general_utils';
|
||||||
|
|
||||||
|
|
||||||
let WalletApp = React.createClass({
|
let WalletApp = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
children: React.PropTypes.oneOfType([
|
activeRoute: React.PropTypes.object.isRequired,
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
children: React.PropTypes.element.isRequired,
|
||||||
React.PropTypes.element
|
history: React.PropTypes.object.isRequired,
|
||||||
]),
|
routes: React.PropTypes.arrayOf(React.PropTypes.object).isRequired
|
||||||
history: React.PropTypes.object,
|
|
||||||
routes: React.PropTypes.arrayOf(React.PropTypes.object)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { activeRoute, children, history, routes } = this.props;
|
||||||
|
const subdomain = getSubdomain();
|
||||||
|
const path = activeRoute && activeRoute.path;
|
||||||
|
|
||||||
let header = null;
|
let header = null;
|
||||||
let subdomain = getSubdomain();
|
|
||||||
const { history, routes, children } = this.props;
|
|
||||||
|
|
||||||
// The second element of routes is always the active component object, where we can
|
|
||||||
// extract the path.
|
|
||||||
let path = routes[1] ? routes[1].path : null;
|
|
||||||
|
|
||||||
// if the path of the current activeRoute is not defined, then this is the IndexRoute
|
// if the path of the current activeRoute is not defined, then this is the IndexRoute
|
||||||
if ((!path || history.isActive('/login') || history.isActive('/signup') || history.isActive('/contract_notifications'))
|
if ((!path || history.isActive('/login') || history.isActive('/signup') ||
|
||||||
&& (['cyland', 'ikonotv', 'lumenus', '23vivi']).indexOf(subdomain) > -1) {
|
history.isActive('/contract_notifications')) &&
|
||||||
header = (<div className="hero"/>);
|
(['cyland', 'ikonotv', 'lumenus', '23vivi']).includes(subdomain)) {
|
||||||
|
header = (<div className="hero" />);
|
||||||
} else {
|
} else {
|
||||||
header = <Header routes={routes} />;
|
header = (<Header routes={routes} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
|
// In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however,
|
||||||
// we split the path by the first occurring slash and take the first splitter.
|
// we split the path by the first occurring slash and take the first splitter.
|
||||||
return (
|
return (
|
||||||
<div className={classNames('ascribe-wallet-app', 'route--' + (path ? path.split('/')[0] : 'landing'))}>
|
<div className={classNames('ascribe-wallet-app', `route--${(path ? path.split('/')[0] : 'landing')}`)}>
|
||||||
<div className='container'>
|
{header}
|
||||||
{header}
|
<div className="container ascribe-body">
|
||||||
|
{/* Routes are injected here */}
|
||||||
{children}
|
{children}
|
||||||
<GlobalNotification />
|
|
||||||
<div id="modal" className="container"></div>
|
|
||||||
<Footer />
|
|
||||||
</div>
|
</div>
|
||||||
|
<Footer activeRoute={activeRoute} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default WalletApp;
|
export default AppBase(WalletApp);
|
||||||
|
@ -48,193 +48,302 @@ import WalletApp from './wallet_app';
|
|||||||
let ROUTES = {
|
let ROUTES = {
|
||||||
'cyland': (
|
'cyland': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={CylandLanding} />
|
<IndexRoute
|
||||||
|
component={CylandLanding}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'
|
headerTitle='+ NEW WORK'
|
||||||
aclName='acl_wallet_submit' />
|
aclName='acl_wallet_submit'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
|
||||||
headerTitle='COLLECTION'
|
headerTitle='COLLECTION'
|
||||||
disableOn='noPieces' />
|
disableOn='noPieces'
|
||||||
<Route path='editions/:editionId' component={EditionContainer} />
|
hideFooter />
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
<Route
|
||||||
<Route path='pieces/:pieceId' component={CylandPieceContainer} />
|
path='editions/:editionId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={EditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='pieces/:pieceId'
|
||||||
|
component={CylandPieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
),
|
),
|
||||||
'cc': (
|
'cc': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK' />
|
headerTitle='+ NEW WORK'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
||||||
headerTitle='COLLECTION'
|
headerTitle='COLLECTION'
|
||||||
disableOn='noPieces' />
|
disableOn='noPieces'
|
||||||
<Route path='pieces/:pieceId' component={PieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={EditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={PieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={EditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
),
|
),
|
||||||
'ikonotv': (
|
'ikonotv': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={IkonotvLanding} />
|
<IndexRoute
|
||||||
|
component={IkonotvLanding}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='request_loan'
|
path='request_loan'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
|
||||||
headerTitle='SEND NEW CONTRACT'
|
headerTitle='SEND NEW CONTRACT'
|
||||||
aclName='acl_create_contractagreement' />
|
aclName='acl_create_contractagreement'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'
|
headerTitle='+ NEW WORK'
|
||||||
aclName='acl_wallet_submit' />
|
aclName='acl_wallet_submit'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
|
||||||
headerTitle='COLLECTION'
|
headerTitle='COLLECTION'
|
||||||
disableOn='noPieces' />
|
disableOn='noPieces'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_notifications'
|
path='contract_notifications'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)}
|
||||||
<Route path='pieces/:pieceId' component={IkonotvPieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={EditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={IkonotvPieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={EditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
),
|
),
|
||||||
'lumenus': (
|
'lumenus': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} />
|
<IndexRoute
|
||||||
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'
|
headerTitle='+ NEW WORK'
|
||||||
aclName='acl_wallet_submit' />
|
aclName='acl_wallet_submit'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
|
||||||
headerTitle='COLLECTION'
|
headerTitle='COLLECTION'
|
||||||
disableOn='noPieces' />
|
disableOn='noPieces'
|
||||||
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={MarketPieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={MarketEditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
),
|
),
|
||||||
'23vivi': (
|
'23vivi': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
|
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='logout'
|
path='logout'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='signup'
|
path='signup'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='password_reset'
|
path='password_reset'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'
|
headerTitle='+ NEW WORK'
|
||||||
aclName='acl_wallet_submit' />
|
aclName='acl_wallet_submit'
|
||||||
|
hideFooter />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
|
||||||
headerTitle='COLLECTION'
|
headerTitle='COLLECTION'
|
||||||
disableOn='noPieces' />
|
disableOn='noPieces'
|
||||||
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
hideFooter />
|
||||||
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
<Route
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
path='pieces/:pieceId'
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
component={MarketPieceContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='editions/:editionId'
|
||||||
|
component={MarketEditionContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='coa_verify'
|
||||||
|
component={CoaVerifyContainer}
|
||||||
|
hideFooter />
|
||||||
|
<Route
|
||||||
|
path='*'
|
||||||
|
component={ErrorNotFoundPage}
|
||||||
|
hideFooter />
|
||||||
</Route>
|
</Route>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -73,6 +73,8 @@ const constants = {
|
|||||||
'IVARO', 'SIAE', 'JASPAR-SPDA', 'AKKA/LAA', 'LATGA-A', 'SOMAAP', 'ARTEGESTION', 'CARIER', 'BONO', 'APSAV',
|
'IVARO', 'SIAE', 'JASPAR-SPDA', 'AKKA/LAA', 'LATGA-A', 'SOMAAP', 'ARTEGESTION', 'CARIER', 'BONO', 'APSAV',
|
||||||
'SPA', 'GESTOR', 'VISaRTA', 'RAO', 'LITA', 'DALRO', 'VeGaP', 'BUS', 'ProLitteris', 'AGADU', 'AUTORARTE', 'BUBEDRA', 'BBDA', 'BCDA', 'BURIDA', 'ADAVIS', 'BSDA'],
|
'SPA', 'GESTOR', 'VISaRTA', 'RAO', 'LITA', 'DALRO', 'VeGaP', 'BUS', 'ProLitteris', 'AGADU', 'AUTORARTE', 'BUBEDRA', 'BBDA', 'BCDA', 'BURIDA', 'ADAVIS', 'BSDA'],
|
||||||
|
|
||||||
|
'locationThreshold': 10,
|
||||||
|
|
||||||
'searchThreshold': 500,
|
'searchThreshold': 500,
|
||||||
|
|
||||||
'supportedThumbnailFileFormats': [
|
'supportedThumbnailFileFormats': [
|
||||||
|
@ -7,8 +7,12 @@ import AppConstants from './constants/application_constants';
|
|||||||
|
|
||||||
|
|
||||||
// Remove the trailing slash if present
|
// Remove the trailing slash if present
|
||||||
let baseUrl = AppConstants.baseUrl.replace(/\/$/, '');
|
const baseUrl = AppConstants.baseUrl.replace(/\/$/, '');
|
||||||
|
|
||||||
export default useBasename(useQueries(createBrowserHistory))({
|
const history = useBasename(useQueries(createBrowserHistory))({
|
||||||
basename: baseUrl
|
basename: baseUrl
|
||||||
});
|
});
|
||||||
|
|
||||||
|
history.locationQueue = [];
|
||||||
|
|
||||||
|
export default history;
|
||||||
|
10
js/routes.js
10
js/routes.js
@ -6,7 +6,7 @@ import { Route } from 'react-router';
|
|||||||
import getPrizeRoutes from './components/whitelabel/prize/prize_routes';
|
import getPrizeRoutes from './components/whitelabel/prize/prize_routes';
|
||||||
import getWalletRoutes from './components/whitelabel/wallet/wallet_routes';
|
import getWalletRoutes from './components/whitelabel/wallet/wallet_routes';
|
||||||
|
|
||||||
import App from './components/ascribe_app';
|
import AscribeApp from './components/ascribe_app';
|
||||||
|
|
||||||
import PieceList from './components/piece_list';
|
import PieceList from './components/piece_list';
|
||||||
import PieceContainer from './components/ascribe_detail/piece_container';
|
import PieceContainer from './components/ascribe_detail/piece_container';
|
||||||
@ -29,14 +29,14 @@ import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_ha
|
|||||||
|
|
||||||
|
|
||||||
const COMMON_ROUTES = (
|
const COMMON_ROUTES = (
|
||||||
<Route path='/' component={App}>
|
<Route path='/' component={AscribeApp}>
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
|
||||||
<Route
|
<Route
|
||||||
path='register_piece'
|
path='register_piece'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)}
|
||||||
headerTitle='+ NEW WORK'/>
|
headerTitle='+ NEW WORK' />
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
|
||||||
@ -55,10 +55,10 @@ const COMMON_ROUTES = (
|
|||||||
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
|
||||||
<Route
|
<Route
|
||||||
path='settings'
|
path='settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}/>
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
|
||||||
<Route
|
<Route
|
||||||
path='contract_settings'
|
path='contract_settings'
|
||||||
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}/>
|
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
|
||||||
<Route path='coa_verify' component={CoaVerifyContainer} />
|
<Route path='coa_verify' component={CoaVerifyContainer} />
|
||||||
<Route path='*' component={ErrorNotFoundPage} />
|
<Route path='*' component={ErrorNotFoundPage} />
|
||||||
</Route>
|
</Route>
|
||||||
|
@ -13,8 +13,10 @@
|
|||||||
"build": "gulp build --production",
|
"build": "gulp build --production",
|
||||||
"start": "node server.js",
|
"start": "node server.js",
|
||||||
"test": "npm run sauce-test",
|
"test": "npm run sauce-test",
|
||||||
|
|
||||||
"sauce-test": "mocha ./test/integration/tests/",
|
"sauce-test": "mocha ./test/integration/tests/",
|
||||||
"tunnel": "node ./test/integration/tunnel.js",
|
"tunnel": "node ./test/integration/tunnel.js",
|
||||||
|
|
||||||
"vi-clean": "rm -rf ./gemini-report",
|
"vi-clean": "rm -rf ./gemini-report",
|
||||||
"vi-phantom": "phantomjs --webdriver=4444",
|
"vi-phantom": "phantomjs --webdriver=4444",
|
||||||
"vi-update": "gemini update -c ./test/gemini/.gemini.yml",
|
"vi-update": "gemini update -c ./test/gemini/.gemini.yml",
|
||||||
|
62
phantomjs/launch_app_and_login.js
Normal file
62
phantomjs/launch_app_and_login.js
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var liveEnv = 'https://www.ascribe.io/app/login';
|
||||||
|
// Note that if you are trying to access staging, you will need to use
|
||||||
|
// the --ignore-ssl-errors=true flag on phantomjs
|
||||||
|
var stagingEnv = 'https://www.ascribe.ninja/app/login';
|
||||||
|
var localEnv = 'http://localhost.com:3000/login';
|
||||||
|
|
||||||
|
var page = require('webpage').create();
|
||||||
|
page.open(localEnv, function(status) {
|
||||||
|
var attemptedToLogIn;
|
||||||
|
var loginCheckInterval;
|
||||||
|
|
||||||
|
console.log('Status: ' + status);
|
||||||
|
|
||||||
|
if (status === 'success') {
|
||||||
|
console.log('Attempting to log in...');
|
||||||
|
|
||||||
|
attemptedToLogIn = page.evaluate(function () {
|
||||||
|
try {
|
||||||
|
var inputForm = document.querySelector('.ascribe-login-wrapper');
|
||||||
|
var email = inputForm.querySelector('input[type=email]');
|
||||||
|
var password = inputForm.querySelector('input[type=password]');
|
||||||
|
var submitBtn = inputForm.querySelector('button[type=submit]');
|
||||||
|
|
||||||
|
email.value = 'dimi@mailinator.com';
|
||||||
|
password.value = '0000000000';
|
||||||
|
submitBtn.click();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (ex) {
|
||||||
|
console.log('Error while trying to find login elements, not logging in.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (attemptedToLogIn) {
|
||||||
|
loginCheckInterval = setInterval(function () {
|
||||||
|
var loggedIn = page.evaluate(function () {
|
||||||
|
// When they log in, they are taken to the collections page.
|
||||||
|
// When the piece list is loaded, the accordion list is either available or
|
||||||
|
// shows a placeholder, so let's check for these elements to determine
|
||||||
|
// when login is finished
|
||||||
|
return !!(document.querySelector('.ascribe-accordion-list:not(.ascribe-loading-position)') ||
|
||||||
|
document.querySelector('.ascribe-accordion-list-placeholder'));
|
||||||
|
});
|
||||||
|
|
||||||
|
if (loggedIn) {
|
||||||
|
clearInterval(loginCheckInterval);
|
||||||
|
console.log('Successfully logged in.');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
console.log('Something happened while trying to log in, aborting...');
|
||||||
|
phantom.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
console.log('Failed to load page, exiing...');
|
||||||
|
phantom.exit();
|
||||||
|
}
|
||||||
|
});
|
@ -1,9 +1,10 @@
|
|||||||
|
@import 'simple_prize/simple_prize_variables';
|
||||||
@import 'simple_prize/simple_prize_custom_style';
|
@import 'simple_prize/simple_prize_custom_style';
|
||||||
|
@import 'sluice/sluice_custom_style';
|
||||||
@import 'portfolioreview/portfolioreview_custom_style';
|
@import 'portfolioreview/portfolioreview_custom_style';
|
||||||
|
|
||||||
.ascribe-prize-app {
|
.ascribe-prize-app {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
min-height: 100vh;
|
|
||||||
padding-top: 70px;
|
padding-top: 70px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ $pr--nav-fg-prim-color: black;
|
|||||||
$pr--button-color: $pr--nav-fg-prim-color;
|
$pr--button-color: $pr--nav-fg-prim-color;
|
||||||
|
|
||||||
.client--portfolioreview {
|
.client--portfolioreview {
|
||||||
|
|
||||||
.btn-wide,
|
.btn-wide,
|
||||||
.btn-default {
|
.btn-default {
|
||||||
background-color: $pr--button-color;
|
background-color: $pr--button-color;
|
||||||
@ -90,7 +89,7 @@ $pr--button-color: $pr--nav-fg-prim-color;
|
|||||||
|
|
||||||
.register-piece--info {
|
.register-piece--info {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
h1, h2 {
|
h1, h2 {
|
||||||
font-variant: small-caps;
|
font-variant: small-caps;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
$sluice--nav-bg-color: #fcfcfc;
|
|
||||||
$sluice--nav-fg-prim-color: #1E1E1E;
|
|
||||||
$sluice--button-color: $sluice--nav-fg-prim-color;
|
|
||||||
|
|
||||||
.wp {
|
.wp {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
@ -37,10 +33,10 @@ $sluice--button-color: $sluice--nav-fg-prim-color;
|
|||||||
|
|
||||||
|
|
||||||
.rating-container {
|
.rating-container {
|
||||||
color: lighten($sluice--nav-fg-prim-color, 80%) !important;
|
color: lighten($simple-prize--nav-fg-prim-color, 80%) !important;
|
||||||
.rating-stars {
|
.rating-stars {
|
||||||
width: 25px;
|
width: 25px;
|
||||||
color: $sluice--nav-fg-prim-color !important;
|
color: $simple-prize--nav-fg-prim-color !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,186 +68,3 @@ $sluice--button-color: $sluice--nav-fg-prim-color;
|
|||||||
padding: 0.7em;
|
padding: 0.7em;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.client--sluice {
|
|
||||||
.navbar-default {
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
box-shadow: none;
|
|
||||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
.navbar-nav > li > a,
|
|
||||||
.navbar-nav > li > .active a {
|
|
||||||
color: $sluice--nav-fg-prim-color;
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
.navbar-nav > li > a:hover {
|
|
||||||
color: lighten($sluice--nav-fg-prim-color, 40%);
|
|
||||||
}
|
|
||||||
.navbar-nav > .active a,
|
|
||||||
.navbar-nav > .active a:hover,
|
|
||||||
.navbar-nav > .active a:focus {
|
|
||||||
color: $sluice--nav-fg-prim-color;
|
|
||||||
border-bottom-color: $sluice--nav-fg-prim-color;
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
.dropdown-menu > li > a:hover,
|
|
||||||
.dropdown-menu > li > a:focus {
|
|
||||||
color: lighten($sluice--nav-fg-prim-color, 40%);
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
.navbar-nav > .open > a,
|
|
||||||
.navbar-nav > .open > a:hover,
|
|
||||||
.navbar-nav > .open > a:focus,
|
|
||||||
.dropdown-menu > .active > a,
|
|
||||||
.dropdown-menu > .active > a:hover,
|
|
||||||
.dropdown-menu > .active > a:focus {
|
|
||||||
color: lighten($sluice--nav-fg-prim-color, 40%);
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
.dropdown-menu {
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu > li > a {
|
|
||||||
color: $sluice--nav-fg-prim-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggle .icon-bar {
|
|
||||||
background-color: $sluice--nav-fg-prim-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggle:hover,
|
|
||||||
.navbar-toggle:focus {
|
|
||||||
background-color: $sluice--nav-bg-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--sluice .ascribe-footer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.client--sluice .icon-ascribe-search{
|
|
||||||
color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--sluice .ascribe-piece-list-toolbar .btn-ascribe-add{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// disabled buttons
|
|
||||||
.client--sluice {
|
|
||||||
.btn-default.disabled,
|
|
||||||
.btn-default.disabled:hover,
|
|
||||||
.btn-default.disabled:focus,
|
|
||||||
.btn-default.disabled.focus,
|
|
||||||
.btn-default.disabled:active,
|
|
||||||
.btn-default.disabled.active,
|
|
||||||
.btn-default[disabled],
|
|
||||||
.btn-default[disabled]:hover,
|
|
||||||
.btn-default[disabled]:focus,
|
|
||||||
.btn-default[disabled].focus,
|
|
||||||
.btn-default[disabled]:active,
|
|
||||||
.btn-default[disabled].active,
|
|
||||||
fieldset[disabled] .btn-default,
|
|
||||||
fieldset[disabled] .btn-default:hover,
|
|
||||||
fieldset[disabled] .btn-default:focus,
|
|
||||||
fieldset[disabled] .btn-default.focus,
|
|
||||||
fieldset[disabled] .btn-default:active,
|
|
||||||
fieldset[disabled] .btn-default.active {
|
|
||||||
background-color: darken($sluice--button-color, 20%);
|
|
||||||
border-color: darken($sluice--button-color, 20%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// buttons!
|
|
||||||
// thought of the day:
|
|
||||||
// "every great atrocity is the result of people just following orders"
|
|
||||||
.client--sluice {
|
|
||||||
.ascribe-piece-list-toolbar-filter-widget button {
|
|
||||||
color: $sluice--button-color !important;
|
|
||||||
background-color: transparent !important;
|
|
||||||
border-color: transparent !important;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:active {
|
|
||||||
background-color: $sluice--button-color !important;
|
|
||||||
border-color: $sluice--button-color !important;
|
|
||||||
color: white !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-wide,
|
|
||||||
.btn-default {
|
|
||||||
background-color: $sluice--button-color;
|
|
||||||
border-color: $sluice--button-color;
|
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:active,
|
|
||||||
&:focus,
|
|
||||||
&:active:hover,
|
|
||||||
&:active:focus,
|
|
||||||
&:active.focus,
|
|
||||||
&.active:hover,
|
|
||||||
&.active:focus,
|
|
||||||
&.active.focus {
|
|
||||||
background-color: lighten($sluice--button-color, 20%);
|
|
||||||
border-color: lighten($sluice--button-color, 20%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.open > .btn-default.dropdown-toggle:hover,
|
|
||||||
.open > .btn-default.dropdown-toggle:focus,
|
|
||||||
.open > .btn-default.dropdown-toggle.focus,
|
|
||||||
.open > .btn-default.dropdown-toggle.dropdown-toggle {
|
|
||||||
background-color: darken($sluice--button-color, 20%);
|
|
||||||
border-color: darken($sluice--button-color, 20%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager li > a, .pager li > span {
|
|
||||||
background-color: $sluice--button-color;
|
|
||||||
border-color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager li.disabled > a,
|
|
||||||
.pager li.disabled > span {
|
|
||||||
background-color: $sluice--button-color !important;
|
|
||||||
border-color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// spinner!
|
|
||||||
.client--sluice {
|
|
||||||
.btn-spinner {
|
|
||||||
color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
.spinner-circle {
|
|
||||||
border-color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
.spinner-inner {
|
|
||||||
color: $sluice--button-color;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// intercom stuff
|
|
||||||
.client--sluice {
|
|
||||||
#intercom-container .intercom-launcher-button {
|
|
||||||
background-color: $sluice--button-color !important;;
|
|
||||||
border-color: $sluice--button-color !important;;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// notifications
|
|
||||||
.client--sluice .ascribe-global-notification-success {
|
|
||||||
background-color: lighten($sluice--button-color, 50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
// progress bar
|
|
||||||
.client--sluice .ascribe-progress-bar > .progress-bar {
|
|
||||||
background-color: $sluice--button-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--sluice .acl-information-dropdown-list .title {
|
|
||||||
color: $sluice--button-color;
|
|
||||||
}
|
|
@ -0,0 +1,3 @@
|
|||||||
|
$simple-prize--nav-bg-color: #fcfcfc;
|
||||||
|
$simple-prize--nav-fg-prim-color: #1E1E1E;
|
||||||
|
$simple-prize--button-color: $simple-prize--nav-fg-prim-color;
|
182
sass/whitelabel/prize/sluice/sluice_custom_style.scss
Normal file
182
sass/whitelabel/prize/sluice/sluice_custom_style.scss
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
.client--sluice {
|
||||||
|
.navbar-default {
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
box-shadow: none;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.navbar-nav > li > a,
|
||||||
|
.navbar-nav > li > .active a {
|
||||||
|
color: $simple-prize--nav-fg-prim-color;
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
.navbar-nav > li > a:hover {
|
||||||
|
color: lighten($simple-prize--nav-fg-prim-color, 40%);
|
||||||
|
}
|
||||||
|
.navbar-nav > .active a,
|
||||||
|
.navbar-nav > .active a:hover,
|
||||||
|
.navbar-nav > .active a:focus {
|
||||||
|
color: $simple-prize--nav-fg-prim-color;
|
||||||
|
border-bottom-color: $simple-prize--nav-fg-prim-color;
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
.dropdown-menu > li > a:hover,
|
||||||
|
.dropdown-menu > li > a:focus {
|
||||||
|
color: lighten($simple-prize--nav-fg-prim-color, 40%);
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
.navbar-nav > .open > a,
|
||||||
|
.navbar-nav > .open > a:hover,
|
||||||
|
.navbar-nav > .open > a:focus,
|
||||||
|
.dropdown-menu > .active > a,
|
||||||
|
.dropdown-menu > .active > a:hover,
|
||||||
|
.dropdown-menu > .active > a:focus {
|
||||||
|
color: lighten($simple-prize--nav-fg-prim-color, 40%);
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
.dropdown-menu {
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown-menu > li > a {
|
||||||
|
color: $simple-prize--nav-fg-prim-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-toggle .icon-bar {
|
||||||
|
background-color: $simple-prize--nav-fg-prim-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-toggle:hover,
|
||||||
|
.navbar-toggle:focus {
|
||||||
|
background-color: $simple-prize--nav-bg-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.client--sluice .ascribe-footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.client--sluice .icon-ascribe-search{
|
||||||
|
color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.client--sluice .ascribe-piece-list-toolbar .btn-ascribe-add{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
// disabled buttons
|
||||||
|
.client--sluice {
|
||||||
|
.btn-default.disabled,
|
||||||
|
.btn-default.disabled:hover,
|
||||||
|
.btn-default.disabled:focus,
|
||||||
|
.btn-default.disabled.focus,
|
||||||
|
.btn-default.disabled:active,
|
||||||
|
.btn-default.disabled.active,
|
||||||
|
.btn-default[disabled],
|
||||||
|
.btn-default[disabled]:hover,
|
||||||
|
.btn-default[disabled]:focus,
|
||||||
|
.btn-default[disabled].focus,
|
||||||
|
.btn-default[disabled]:active,
|
||||||
|
.btn-default[disabled].active,
|
||||||
|
fieldset[disabled] .btn-default,
|
||||||
|
fieldset[disabled] .btn-default:hover,
|
||||||
|
fieldset[disabled] .btn-default:focus,
|
||||||
|
fieldset[disabled] .btn-default.focus,
|
||||||
|
fieldset[disabled] .btn-default:active,
|
||||||
|
fieldset[disabled] .btn-default.active {
|
||||||
|
background-color: darken($simple-prize--button-color, 20%);
|
||||||
|
border-color: darken($simple-prize--button-color, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// buttons!
|
||||||
|
// thought of the day:
|
||||||
|
// "every great atrocity is the result of people just following orders"
|
||||||
|
.client--sluice {
|
||||||
|
.ascribe-piece-list-toolbar-filter-widget button {
|
||||||
|
color: $simple-prize--button-color !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
border-color: transparent !important;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active {
|
||||||
|
background-color: $simple-prize--button-color !important;
|
||||||
|
border-color: $simple-prize--button-color !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-wide,
|
||||||
|
.btn-default {
|
||||||
|
background-color: $simple-prize--button-color;
|
||||||
|
border-color: $simple-prize--button-color;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus,
|
||||||
|
&:active:hover,
|
||||||
|
&:active:focus,
|
||||||
|
&:active.focus,
|
||||||
|
&.active:hover,
|
||||||
|
&.active:focus,
|
||||||
|
&.active.focus {
|
||||||
|
background-color: lighten($simple-prize--button-color, 20%);
|
||||||
|
border-color: lighten($simple-prize--button-color, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.open > .btn-default.dropdown-toggle:hover,
|
||||||
|
.open > .btn-default.dropdown-toggle:focus,
|
||||||
|
.open > .btn-default.dropdown-toggle.focus,
|
||||||
|
.open > .btn-default.dropdown-toggle.dropdown-toggle {
|
||||||
|
background-color: darken($simple-prize--button-color, 20%);
|
||||||
|
border-color: darken($simple-prize--button-color, 20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager li > a, .pager li > span {
|
||||||
|
background-color: $simple-prize--button-color;
|
||||||
|
border-color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pager li.disabled > a,
|
||||||
|
.pager li.disabled > span {
|
||||||
|
background-color: $simple-prize--button-color !important;
|
||||||
|
border-color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// spinner!
|
||||||
|
.client--sluice {
|
||||||
|
.btn-spinner {
|
||||||
|
color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
.spinner-circle {
|
||||||
|
border-color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
.spinner-inner {
|
||||||
|
color: $simple-prize--button-color;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// intercom stuff
|
||||||
|
.client--sluice {
|
||||||
|
#intercom-container .intercom-launcher-button {
|
||||||
|
background-color: $simple-prize--button-color !important;;
|
||||||
|
border-color: $simple-prize--button-color !important;;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// notifications
|
||||||
|
.client--sluice .ascribe-global-notification-success {
|
||||||
|
background-color: lighten($simple-prize--button-color, 50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
// progress bar
|
||||||
|
.client--sluice .ascribe-progress-bar > .progress-bar {
|
||||||
|
background-color: $simple-prize--button-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.client--sluice .acl-information-dropdown-list .title {
|
||||||
|
color: $simple-prize--button-color;
|
||||||
|
}
|
@ -13,6 +13,7 @@ $vivi23--highlight-color: #de2600;
|
|||||||
/** Landing page **/
|
/** Landing page **/
|
||||||
.route--landing {
|
.route--landing {
|
||||||
display: table;
|
display: table;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
> .container {
|
> .container {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
@ -20,8 +21,13 @@ $vivi23--highlight-color: #de2600;
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.vivi23-landing {
|
.vivi23-landing {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
padding: 0 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,10 +253,6 @@ $vivi23--highlight-color: #de2600;
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ascribe-footer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ascribe-accordion-list-table-toggle:hover {
|
.ascribe-accordion-list-table-toggle:hover {
|
||||||
color: $vivi23--fg-color;
|
color: $vivi23--fg-color;
|
||||||
}
|
}
|
||||||
|
@ -55,16 +55,11 @@ $cc--button-color: $cc--nav-fg-prim-color;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.client--cc .ascribe-footer {
|
.client--cc .icon-ascribe-search {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.client--cc .icon-ascribe-search{
|
|
||||||
color: $cc--button-color;
|
color: $cc--button-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client--cc .ascribe-piece-list-toolbar .btn-ascribe-add{
|
.client--cc .ascribe-piece-list-toolbar .btn-ascribe-add {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,4 +218,4 @@ $cc--button-color: $cc--nav-fg-prim-color;
|
|||||||
|
|
||||||
.client--cc .upload-button-wrapper > span {
|
.client--cc .upload-button-wrapper > span {
|
||||||
color: $cc--button-color;
|
color: $cc--button-color;
|
||||||
}
|
}
|
||||||
|
@ -56,10 +56,6 @@ $cyland--button-sec-color: #515151;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.client--cyland .ascribe-footer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--cyland .icon-ascribe-search {
|
.client--cyland .icon-ascribe-search {
|
||||||
color: $cyland--button-color;
|
color: $cyland--button-color;
|
||||||
}
|
}
|
||||||
@ -171,6 +167,7 @@ $cyland--button-sec-color: #515151;
|
|||||||
.client--cyland {
|
.client--cyland {
|
||||||
.route--landing {
|
.route--landing {
|
||||||
display: table;
|
display: table;
|
||||||
|
min-height: 100vh;
|
||||||
|
|
||||||
> .container {
|
> .container {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
@ -178,8 +175,13 @@ $cyland--button-sec-color: #515151;
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.cyland-landing {
|
.cyland-landing {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
padding: 0 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,24 +108,36 @@ $ikono--font: 'Helvetica Neue', 'Helvetica', sans-serif !important;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.client--ikonotv {
|
||||||
|
.route--landing,
|
||||||
|
.route--login,
|
||||||
|
.route--signup {
|
||||||
|
background-color: $ikono--landing-bg-color;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route--login,
|
||||||
|
.route--signup {
|
||||||
|
.ascribe-form-bordered {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.client--ikonotv .route--landing {
|
.client--ikonotv .route--landing {
|
||||||
background-color: $ikono--landing-bg-color;
|
|
||||||
animation: color-loop 20s;
|
animation: color-loop 20s;
|
||||||
-o-animation: color-loop 20s infinite;
|
-o-animation: color-loop 20s infinite;
|
||||||
-ms-animation: color-loop 20s infinite;
|
-ms-animation: color-loop 20s infinite;
|
||||||
-moz-animation: color-loop 20s infinite;
|
-moz-animation: color-loop 20s infinite;
|
||||||
-webkit-animation: color-loop 20s infinite;
|
-webkit-animation: color-loop 20s infinite;
|
||||||
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5em 1em;
|
padding: 5em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.client--ikonotv .route--login,
|
.client--ikonotv .route--login,
|
||||||
.client--ikonotv .route--signup {
|
.client--ikonotv .route--signup {
|
||||||
background-color: $ikono--landing-bg-color;
|
|
||||||
|
|
||||||
.btn-wide {
|
.btn-wide {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 50px auto 0;
|
margin: 50px auto 0;
|
||||||
@ -209,27 +221,11 @@ $ikono--font: 'Helvetica Neue', 'Helvetica', sans-serif !important;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.client--ikonotv {
|
.client--ikonotv .icon-ascribe-search {
|
||||||
.route--login,
|
|
||||||
.route--signup {
|
|
||||||
.ascribe-form-bordered {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--ikonotv .ascribe-login-wrapper {
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--ikonotv .ascribe-footer {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.client--ikonotv .icon-ascribe-search{
|
|
||||||
color: $ikono--button-color;
|
color: $ikono--button-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client--ikonotv .ascribe-piece-list-toolbar .btn-ascribe-add{
|
.client--ikonotv .ascribe-piece-list-toolbar .btn-ascribe-add {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -560,4 +556,4 @@ $ikono--font: 'Helvetica Neue', 'Helvetica', sans-serif !important;
|
|||||||
|
|
||||||
.client--ikonotv .upload-button-wrapper > span {
|
.client--ikonotv .upload-button-wrapper > span {
|
||||||
color: $ikono--button-color;
|
color: $ikono--button-color;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
.ascribe-wallet-app {
|
.ascribe-wallet-app {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
min-height: 100vh;
|
|
||||||
padding-top: 70px;
|
padding-top: 70px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user