mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 15:17:53 -05:00
Configure cloud host and pass it as a prop to the gui.
This commit is contained in:
parent
76d6b66bb1
commit
e771e91164
4 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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: {},
|
||||
|
|
|
@ -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') + '"'
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue