Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
a3c929db
Commit
a3c929db
authored
Aug 16, 2018
by
Ray Schamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish setup of backpack, assets, projects hosts
parent
d5384123
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
.travis.yml
.travis.yml
+5
-0
README.md
README.md
+2
-0
src/views/preview/preview.jsx
src/views/preview/preview.jsx
+11
-7
No files found.
.travis.yml
View file @
a3c929db
...
@@ -23,6 +23,11 @@ env:
...
@@ -23,6 +23,11 @@ env:
-
ASSET_HOST_VAR=ASSET_HOST_$TRAVIS_BRANCH
-
ASSET_HOST_VAR=ASSET_HOST_$TRAVIS_BRANCH
-
ASSET_HOST=${!ASSET_HOST_VAR}
-
ASSET_HOST=${!ASSET_HOST_VAR}
-
ASSET_HOST=${ASSET_HOST:-$ASSET_HOST_STAGING}
-
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_master=https://scratch.mit.edu
-
ROOT_URL_STAGING=https://scratch.ly
-
ROOT_URL_STAGING=https://scratch.ly
-
ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
-
ROOT_URL_VAR=ROOT_URL_$TRAVIS_BRANCH
...
...
README.md
View file @
a3c929db
...
@@ -84,7 +84,9 @@ To stop the process that is making the site available to your web browser (creat
...
@@ -84,7 +84,9 @@ To stop the process that is making the site available to your web browser (creat
| Variable | Default | Description |
| Variable | Default | Description |
| --------------- | ---------------------------------- | ---------------------------------------------- |
| --------------- | ---------------------------------- | ---------------------------------------------- |
|
`API_HOST`
|
`https://api.scratch.mit.edu`
| Hostname for API requests |
|
`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 |
|
`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 |
|
`SENTRY_DSN`
|
`''`
| DSN for Sentry |
|
`FALLBACK`
|
`''`
| Pass-through location for old site |
|
`FALLBACK`
|
`''`
| Pass-through location for old site |
|
`GA_TRACKER`
|
`''`
| Where to log Google Analytics data |
|
`GA_TRACKER`
|
`''`
| Where to log Google Analytics data |
...
...
src/views/preview/preview.jsx
View file @
a3c929db
...
@@ -288,17 +288,13 @@ class Preview extends React.Component {
...
@@ -288,17 +288,13 @@ class Preview extends React.Component {
);
);
}
}
render
()
{
render
()
{
const
backpackOptions
=
{
host
:
process
.
env
.
BACKPACK_HOST
,
visible
:
true
};
return
(
return
(
this
.
props
.
playerMode
?
this
.
props
.
playerMode
?
<
Page
>
<
Page
>
<
PreviewPresentation
<
PreviewPresentation
addToStudioOpen=
{
this
.
state
.
addToStudioOpen
}
addToStudioOpen=
{
this
.
state
.
addToStudioOpen
}
assetHost=
{
this
.
props
.
assetHost
}
assetHost=
{
this
.
props
.
assetHost
}
backpackOptions=
{
backpackOptions
}
backpackOptions=
{
this
.
props
.
backpackOptions
}
comments=
{
this
.
props
.
comments
}
comments=
{
this
.
props
.
comments
}
editable=
{
this
.
state
.
editable
}
editable=
{
this
.
state
.
editable
}
extensions=
{
this
.
state
.
extensions
}
extensions=
{
this
.
state
.
extensions
}
...
@@ -338,7 +334,7 @@ class Preview extends React.Component {
...
@@ -338,7 +334,7 @@ class Preview extends React.Component {
enableCommunity
enableCommunity
hideIntro
hideIntro
assetHost=
{
this
.
props
.
assetHost
}
assetHost=
{
this
.
props
.
assetHost
}
backpackOptions=
{
backpackOptions
}
backpackOptions=
{
this
.
props
.
backpackOptions
}
basePath=
"/"
basePath=
"/"
className=
"gui"
className=
"gui"
projectHost=
{
this
.
props
.
projectHost
}
projectHost=
{
this
.
props
.
projectHost
}
...
@@ -350,6 +346,10 @@ class Preview extends React.Component {
...
@@ -350,6 +346,10 @@ class Preview extends React.Component {
Preview
.
propTypes
=
{
Preview
.
propTypes
=
{
assetHost
:
PropTypes
.
string
.
isRequired
,
assetHost
:
PropTypes
.
string
.
isRequired
,
backpackOptions
:
PropTypes
.
shape
({
host
:
PropTypes
.
string
,
visible
:
PropTypes
.
bool
}),
comments
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
comments
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
faved
:
PropTypes
.
bool
,
faved
:
PropTypes
.
bool
,
fullScreen
:
PropTypes
.
bool
,
fullScreen
:
PropTypes
.
bool
,
...
@@ -366,8 +366,8 @@ Preview.propTypes = {
...
@@ -366,8 +366,8 @@ Preview.propTypes = {
original
:
projectShape
,
original
:
projectShape
,
parent
:
projectShape
,
parent
:
projectShape
,
playerMode
:
PropTypes
.
bool
,
playerMode
:
PropTypes
.
bool
,
projectInfo
:
projectShape
,
projectHost
:
PropTypes
.
string
.
isRequired
,
projectHost
:
PropTypes
.
string
.
isRequired
,
projectInfo
:
projectShape
,
projectStudios
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
projectStudios
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
remixes
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
remixes
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
replies
:
PropTypes
.
objectOf
(
PropTypes
.
array
),
replies
:
PropTypes
.
objectOf
(
PropTypes
.
array
),
...
@@ -394,6 +394,10 @@ Preview.propTypes = {
...
@@ -394,6 +394,10 @@ Preview.propTypes = {
Preview
.
defaultProps
=
{
Preview
.
defaultProps
=
{
assetHost
:
process
.
env
.
ASSET_HOST
,
assetHost
:
process
.
env
.
ASSET_HOST
,
backpackOptions
:
{
host
:
process
.
env
.
BACKPACK_HOST
,
visible
:
true
},
projectHost
:
process
.
env
.
PROJECT_HOST
,
projectHost
:
process
.
env
.
PROJECT_HOST
,
sessionStatus
:
sessionActions
.
Status
.
NOT_FETCHED
,
sessionStatus
:
sessionActions
.
Status
.
NOT_FETCHED
,
user
:
{}
user
:
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment