Commit a3c929db authored by Ray Schamp's avatar Ray Schamp

Finish setup of backpack, assets, projects hosts

parent d5384123
......@@ -23,6 +23,11 @@ env:
- ASSET_HOST_VAR=ASSET_HOST_$TRAVIS_BRANCH
- ASSET_HOST=${!ASSET_HOST_VAR}
- ASSET_HOST=${ASSET_HOST:-$ASSET_HOST_STAGING}
- BACKPACK_HOST_master=https://backpack.scratch.mit.edu
- BACKPACK_HOST_STAGING=https://backpack.scratch.ly
- BACKPACK_HOST_VAR=BACKPACK_HOST_$TRAVIS_BRANCH
- BACKPACK_HOST=${!BACKPACK_HOST_VAR}
- BACKPACK_HOST=${BACKPACK_HOST:-$BACKPACK_HOST_STAGING}
- ROOT_URL_master=https://scratch.mit.edu
- ROOT_URL_STAGING=https://scratch.ly
- ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
......
......@@ -84,7 +84,9 @@ To stop the process that is making the site available to your web browser (creat
| Variable | Default | Description |
| --------------- | ---------------------------------- | ---------------------------------------------- |
| `API_HOST` | `https://api.scratch.mit.edu` | Hostname for API requests |
| `ASSETS_HOST` | `https://assets.scratch.mit.edu` | Hostname for asset requests |
| `BACKPACK_HOST` | `https://backpack.scratch.mit.edu` | Hostname for backpack requests |
| `PROJECTS_HOST` | `https://projects.scratch.mit.edu` | Hostname for project requests |
| `SENTRY_DSN` | `''` | DSN for Sentry |
| `FALLBACK` | `''` | Pass-through location for old site |
| `GA_TRACKER` | `''` | Where to log Google Analytics data |
......
......@@ -288,17 +288,13 @@ class Preview extends React.Component {
);
}
render () {
const backpackOptions = {
host: process.env.BACKPACK_HOST,
visible: true
};
return (
this.props.playerMode ?
<Page>
<PreviewPresentation
addToStudioOpen={this.state.addToStudioOpen}
assetHost={this.props.assetHost}
backpackOptions={backpackOptions}
backpackOptions={this.props.backpackOptions}
comments={this.props.comments}
editable={this.state.editable}
extensions={this.state.extensions}
......@@ -338,7 +334,7 @@ class Preview extends React.Component {
enableCommunity
hideIntro
assetHost={this.props.assetHost}
backpackOptions={backpackOptions}
backpackOptions={this.props.backpackOptions}
basePath="/"
className="gui"
projectHost={this.props.projectHost}
......@@ -350,6 +346,10 @@ class Preview extends React.Component {
Preview.propTypes = {
assetHost: PropTypes.string.isRequired,
backpackOptions: PropTypes.shape({
host: PropTypes.string,
visible: PropTypes.bool
}),
comments: PropTypes.arrayOf(PropTypes.object),
faved: PropTypes.bool,
fullScreen: PropTypes.bool,
......@@ -366,8 +366,8 @@ Preview.propTypes = {
original: projectShape,
parent: projectShape,
playerMode: PropTypes.bool,
projectInfo: projectShape,
projectHost: PropTypes.string.isRequired,
projectInfo: projectShape,
projectStudios: PropTypes.arrayOf(PropTypes.object),
remixes: PropTypes.arrayOf(PropTypes.object),
replies: PropTypes.objectOf(PropTypes.array),
......@@ -394,6 +394,10 @@ Preview.propTypes = {
Preview.defaultProps = {
assetHost: process.env.ASSET_HOST,
backpackOptions: {
host: process.env.BACKPACK_HOST,
visible: true
},
projectHost: process.env.PROJECT_HOST,
sessionStatus: sessionActions.Status.NOT_FETCHED,
user: {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment