diff --git a/.travis.yml b/.travis.yml index 479e987fd..c9fb8efb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,11 @@ env: - BACKPACK_HOST_VAR=BACKPACK_HOST_$TRAVIS_BRANCH - BACKPACK_HOST=${!BACKPACK_HOST_VAR} - BACKPACK_HOST=${BACKPACK_HOST:-$BACKPACK_HOST_STAGING} + - CLOUDDATA_HOST_master=clouddata.scratch.mit.edu + - CLOUDDATA_HOST_STAGING=varserver2.scratch.ly + - CLOUDDATA_HOST_VAR=CLOUDDATA_HOST_$TRAVIS_BRANCH + - CLOUDDATA_HOST=${!CLOUDDATA_HOST_VAR} + - CLOUDDATA_HOST=${CLOUDDATA_HOST:-$CLOUDDATA_HOST_STAGING} - ROOT_URL_master=https://scratch.mit.edu - ROOT_URL_STAGING=https://scratch.ly - ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index 4e9789ce6..ec08d692f 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -48,6 +48,7 @@ const PreviewPresentation = ({ canDeleteComments, canReport, canRestoreComments, + cloudHost, comments, editable, extensions, @@ -163,6 +164,7 @@ const PreviewPresentation = ({ backpackOptions={backpackOptions} basePath="/" className="guiPlayer" + cloudHost={cloudHost} isFullScreen={isFullScreen} previewInfoVisible="false" projectHost={projectHost} @@ -438,6 +440,7 @@ PreviewPresentation.propTypes = { canDeleteComments: PropTypes.bool, canReport: PropTypes.bool, canRestoreComments: PropTypes.bool, + cloudHost: PropTypes.string, comments: PropTypes.arrayOf(PropTypes.object), editable: PropTypes.bool, extensions: PropTypes.arrayOf(PropTypes.object), diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx index 7239f5436..1b4769a5c 100644 --- a/src/views/preview/preview.jsx +++ b/src/views/preview/preview.jsx @@ -405,6 +405,7 @@ class Preview extends React.Component { canDeleteComments={this.props.isAdmin || this.props.userOwnsProject} canReport={this.props.canReport} canRestoreComments={this.props.isAdmin} + cloudHost={this.props.cloudHost} comments={this.props.comments} editable={this.props.isEditable} extensions={this.state.extensions} @@ -458,6 +459,7 @@ class Preview extends React.Component { canSave={this.props.canSave} canShare={this.props.canShare} className="gui" + cloudHost={this.props.cloudHost} enableCommunity={this.props.enableCommunity} isShared={this.props.isShared} projectHost={this.props.projectHost} @@ -493,6 +495,7 @@ Preview.propTypes = { canReport: PropTypes.bool, canSave: PropTypes.bool, canShare: PropTypes.bool, + cloudHost: PropTypes.string, comments: PropTypes.arrayOf(PropTypes.object), enableCommunity: PropTypes.bool, faved: PropTypes.bool, @@ -558,6 +561,7 @@ Preview.defaultProps = { host: process.env.BACKPACK_HOST, visible: true }, + cloudHost: process.env.CLOUDDATA_HOST, projectHost: process.env.PROJECT_HOST, sessionStatus: sessionActions.Status.NOT_FETCHED, user: {}, diff --git a/webpack.config.js b/webpack.config.js index ca7377562..f10a056d0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -167,6 +167,7 @@ module.exports = { 'process.env.API_HOST': '"' + (process.env.API_HOST || 'https://api.scratch.mit.edu') + '"', 'process.env.ASSET_HOST': '"' + (process.env.ASSET_HOST || 'https://assets.scratch.mit.edu') + '"', 'process.env.BACKPACK_HOST': '"' + (process.env.BACKPACK_HOST || 'https://backpack.scratch.mit.edu') + '"', + 'process.env.CLOUDDATA_HOST': '"' + (process.env.CLOUDDATA_HOST || 'clouddata.scratch.mit.edu') + '"', 'process.env.PROJECT_HOST': '"' + (process.env.PROJECT_HOST || 'https://projects.scratch.mit.edu') + '"', 'process.env.SCRATCH_ENV': '"' + (process.env.SCRATCH_ENV || 'development') + '"' }),