diff --git a/js/components/ascribe_detail/edition_action_panel.js b/js/components/ascribe_detail/edition_action_panel.js index 2dda618a..162427d5 100644 --- a/js/components/ascribe_detail/edition_action_panel.js +++ b/js/components/ascribe_detail/edition_action_panel.js @@ -162,7 +162,7 @@ let EditionActionPanel = React.createClass({ editions={[edition]}/> diff --git a/js/components/ascribe_detail/history_iterator.js b/js/components/ascribe_detail/history_iterator.js index 54d11a5b..413aeb21 100644 --- a/js/components/ascribe_detail/history_iterator.js +++ b/js/components/ascribe_detail/history_iterator.js @@ -5,11 +5,33 @@ import React from 'react'; import Form from '../ascribe_forms/form'; import Property from '../ascribe_forms/property'; +import { replaceSubstringAtIndex } from '../../utils/general_utils'; + + let HistoryIterator = React.createClass({ propTypes: { history: React.PropTypes.array }, + composeHistoryDescription(historicalEvent) { + if(historicalEvent.length === 3) { + // We want to get the capturing group without the quotes, + // which is why we access the match list at index 1 and not 0 + const contractName = historicalEvent[1].match(/\"(.*)\"/)[1]; + const historicalEventDescription = replaceSubstringAtIndex(historicalEvent[1], `"${contractName}"`, ''); + return ( + + {historicalEventDescription} + {contractName} + + ); + } else if(historicalEvent.length === 2) { + return historicalEvent[1]; + } else { + throw new Error('Expected an historical event list with either 3 or 2 items. Got less or more.'); + } + }, + render() { return (
@@ -20,7 +42,7 @@ let HistoryIterator = React.createClass({ key={i} label={ historicalEvent[0] } editable={false}> -
{ historicalEvent[1] }
+
{this.composeHistoryDescription(historicalEvent)}
); })} diff --git a/js/components/ascribe_detail/piece_container.js b/js/components/ascribe_detail/piece_container.js index 59fbfe5c..8cd7df1c 100644 --- a/js/components/ascribe_detail/piece_container.js +++ b/js/components/ascribe_detail/piece_container.js @@ -215,7 +215,8 @@ let PieceContainer = React.createClass({ piece={piece}/> diff --git a/js/components/ascribe_routes/proxy_routes/auth_proxy_handler.js b/js/components/ascribe_routes/proxy_routes/auth_proxy_handler.js index b2d552a7..18104d7b 100644 --- a/js/components/ascribe_routes/proxy_routes/auth_proxy_handler.js +++ b/js/components/ascribe_routes/proxy_routes/auth_proxy_handler.js @@ -8,6 +8,8 @@ import UserActions from '../../../actions/user_actions'; import AppConstants from '../../../constants/application_constants'; +import { InjectInHeadUtils } from '../../../utils/inject_utils'; + const { object } = React.PropTypes; const WHEN_ENUM = ['loggedIn', 'loggedOut']; @@ -53,6 +55,7 @@ export default function AuthProxyHandler({to, when}) { // data from the server if(!UserStore.isLoading()) { this.redirectConditionally(); + this.injectSpecialLoveMessage(); } }, @@ -60,6 +63,23 @@ export default function AuthProxyHandler({to, when}) { UserStore.unlisten(this.onChange); }, + injectSpecialLoveMessage() { + const { currentUser } = this.state; + + if(currentUser && (currentUser.email === 'dimi@mailinator.com' + || currentUser.email === 'trent@ascribe.io' + || currentUser.email === 'wojciech@ascribe.io' + || currentUser.email === 'rod@mailinator.com' + || currentUser.email === 'qisheng.brett.sun@gmail.com' + || currentUser.email === 'sylvain@ascribe.io')) { + if(!InjectInHeadUtils.isPresent('script', AppConstants.fartscroll.sdkUrl)) { + InjectInHeadUtils.inject(AppConstants.fartscroll.sdkUrl).then(() => { + window.fartscroll ? window.fartscroll() : null; + }); + } + } + }, + redirectConditionally() { const { query } = this.props.location; const { redirectAuthenticated, redirect } = query; diff --git a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js index 66564ff3..25552819 100644 --- a/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js +++ b/js/components/ascribe_uploader/ascribe_file_drag_and_drop/file_drag_and_drop_dialog.js @@ -58,8 +58,14 @@ let FileDragAndDropDialog = React.createClass({ return (

{getLangText('Would you rather')}

+ {/* + The frontend in live is hosted under /app, + Since `Link` is appending that base url, if its defined + by itself, we need to make sure to not set it at this point. + Otherwise it will be appended twice. + */} {getLangText('Hash your work')} @@ -69,7 +75,7 @@ let FileDragAndDropDialog = React.createClass({ or {getLangText('Upload and hash your work')} diff --git a/js/components/footer.js b/js/components/footer.js index 2a71f7d0..65088ee2 100644 --- a/js/components/footer.js +++ b/js/components/footer.js @@ -11,7 +11,7 @@ let Footer = React.createClass({


api | - impressum | + {getLangText('imprint')} | {getLangText('terms of service')} | {getLangText('privacy')}

diff --git a/js/components/whitelabel/prize/prize_routes.js b/js/components/whitelabel/prize/prize_routes.js index 1f2c6374..ec0269a5 100644 --- a/js/components/whitelabel/prize/prize_routes.js +++ b/js/components/whitelabel/prize/prize_routes.js @@ -71,7 +71,7 @@ const ROUTES = { component={AuthProxyHandler({to: '/register_piece', when: 'loggedIn'})(SPLoginContainer)} /> + component={AuthProxyHandler({to: '/', when: 'loggedOut'})(LogoutContainer)} /> diff --git a/js/constants/acl_information_text.js b/js/constants/acl_information_text.js index 0672ed4c..6a04d360 100644 --- a/js/constants/acl_information_text.js +++ b/js/constants/acl_information_text.js @@ -16,6 +16,7 @@ export const AclInformationText = { 'acl_consign': ' - Lets someone represent you in dealing with the work, under the terms you agree to.', 'acl_loan': ' - Lets someone use or put the Work on display for a limited amount of time.', 'acl_share': ' - Lets someone view the Work or Edition via email, but does not give rights to publish or display it.', + 'acl_transfer': ' - Changes ownership of an Edition. As with a physical piece Work, Transferring ownership of an Edition does not transfer copyright in the Work.', 'acl_delete': ' - Removes the Work from your Wallet. Note that the previous registration and transfer ' + 'history will still exist on the blockchain and cannot be deleted.', 'acl_create_editions': ' Lets the artist set a fixed number of editions of a work which can then be transferred, guaranteeing each edition is authentic and from the artist.', @@ -27,6 +28,7 @@ export const AclInformationText = { 'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)', 'acl_loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)', 'acl_share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents by email)', + 'acl_transfer': '(e.g. a musician Transfers limited edition 1 of 10 of her new album to a very happy fan)', 'acl_delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)', 'acl_create_editions': '(e.g. A company commissions a visual artists to create three limited edition prints for a giveaway)', 'acl_unconsign': '(e.g. An artist regains full control over their work and releases the consignee of any rights or responsibilities)', diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index 79d00747..c6bf515c 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -124,6 +124,9 @@ const constants = { }, 'twitter': { 'sdkUrl': 'https://platform.twitter.com/widgets.js' + }, + 'fartscroll': { + 'sdkUrl': 'http://code.onion.com/fartscroll.js' } };