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
805bd877
Unverified
Commit
805bd877
authored
Nov 14, 2018
by
Paul Kaplan
Committed by
GitHub
Nov 14, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2293 from paulkaplan/hide-backpack-logged-out
Hide backpack for logged out users
parents
9f640ffd
d36b71dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
src/views/preview/presentation.jsx
src/views/preview/presentation.jsx
+6
-6
src/views/preview/preview.jsx
src/views/preview/preview.jsx
+9
-10
No files found.
src/views/preview/presentation.jsx
View file @
805bd877
...
...
@@ -44,12 +44,13 @@ const onKeyPress = e => {
const
PreviewPresentation
=
({
assetHost
,
backpack
Options
,
backpack
Host
,
canAddToStudio
,
canDeleteComments
,
canReport
,
canRestoreComments
,
canShare
,
canUseBackpack
,
cloudHost
,
comments
,
editable
,
...
...
@@ -173,7 +174,8 @@ const PreviewPresentation = ({
<
IntlGUI
isPlayerOnly
assetHost=
{
assetHost
}
backpackOptions=
{
backpackOptions
}
backpackHost=
{
backpackHost
}
backpackVisible=
{
canUseBackpack
}
basePath=
"/"
className=
"guiPlayer"
cloudHost=
{
cloudHost
}
...
...
@@ -444,15 +446,13 @@ const PreviewPresentation = ({
PreviewPresentation
.
propTypes
=
{
addToStudioOpen
:
PropTypes
.
bool
,
assetHost
:
PropTypes
.
string
,
backpackOptions
:
PropTypes
.
shape
({
host
:
PropTypes
.
string
,
visible
:
PropTypes
.
bool
}),
backpackHost
:
PropTypes
.
string
,
canAddToStudio
:
PropTypes
.
bool
,
canDeleteComments
:
PropTypes
.
bool
,
canReport
:
PropTypes
.
bool
,
canRestoreComments
:
PropTypes
.
bool
,
canShare
:
PropTypes
.
bool
,
canUseBackpack
:
PropTypes
.
bool
,
cloudHost
:
PropTypes
.
string
,
comments
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
editable
:
PropTypes
.
bool
,
...
...
src/views/preview/preview.jsx
View file @
805bd877
...
...
@@ -401,12 +401,13 @@ class Preview extends React.Component {
<
PreviewPresentation
addToStudioOpen=
{
this
.
state
.
addToStudioOpen
}
assetHost=
{
this
.
props
.
assetHost
}
backpack
Options=
{
this
.
props
.
backpackOptions
}
backpack
Host=
{
this
.
props
.
backpackHost
}
canAddToStudio=
{
this
.
props
.
canAddToStudio
}
canDeleteComments=
{
this
.
props
.
isAdmin
||
this
.
props
.
userOwnsProject
}
canReport=
{
this
.
props
.
canReport
}
canRestoreComments=
{
this
.
props
.
isAdmin
}
canShare=
{
this
.
props
.
canShare
}
canUseBackpack=
{
this
.
props
.
canUseBackpack
}
cloudHost=
{
this
.
props
.
cloudHost
}
comments=
{
this
.
props
.
comments
}
editable=
{
this
.
props
.
isEditable
}
...
...
@@ -457,7 +458,8 @@ class Preview extends React.Component {
authorId=
{
this
.
props
.
authorId
}
authorThumbnailUrl=
{
this
.
props
.
authorThumbnailUrl
}
authorUsername=
{
this
.
props
.
authorUsername
}
backpackOptions=
{
this
.
props
.
backpackOptions
}
backpackHost=
{
this
.
props
.
backpackHost
}
backpackVisible=
{
this
.
props
.
canUseBackpack
}
basePath=
"/"
canCreateCopy=
{
this
.
props
.
canCreateCopy
}
canCreateNew=
{
this
.
props
.
canCreateNew
}
...
...
@@ -496,10 +498,7 @@ Preview.propTypes = {
authorThumbnailUrl
:
PropTypes
.
string
,
// If there's no author, this will be false`
authorUsername
:
PropTypes
.
oneOfType
([
PropTypes
.
string
,
PropTypes
.
bool
]),
backpackOptions
:
PropTypes
.
shape
({
host
:
PropTypes
.
string
,
visible
:
PropTypes
.
bool
}),
backpackHost
:
PropTypes
.
string
,
canAddToStudio
:
PropTypes
.
bool
,
canCreateCopy
:
PropTypes
.
bool
,
canCreateNew
:
PropTypes
.
bool
,
...
...
@@ -507,6 +506,7 @@ Preview.propTypes = {
canReport
:
PropTypes
.
bool
,
canSave
:
PropTypes
.
bool
,
canShare
:
PropTypes
.
bool
,
canUseBackpack
:
PropTypes
.
bool
,
cloudHost
:
PropTypes
.
string
,
comments
:
PropTypes
.
arrayOf
(
PropTypes
.
object
),
enableCommunity
:
PropTypes
.
bool
,
...
...
@@ -570,10 +570,8 @@ Preview.propTypes = {
Preview
.
defaultProps
=
{
assetHost
:
process
.
env
.
ASSET_HOST
,
backpackOptions
:
{
host
:
process
.
env
.
BACKPACK_HOST
,
visible
:
true
},
backpackHost
:
process
.
env
.
BACKPACK_HOST
,
canUseBackpack
:
false
,
cloudHost
:
process
.
env
.
CLOUDDATA_HOST
,
projectHost
:
process
.
env
.
PROJECT_HOST
,
sessionStatus
:
sessionActions
.
Status
.
NOT_FETCHED
,
...
...
@@ -608,6 +606,7 @@ const mapStateToProps = state => {
canReport
:
isLoggedIn
&&
!
userOwnsProject
,
canSave
:
isLoggedIn
&&
userOwnsProject
,
canShare
:
userOwnsProject
&&
state
.
permissions
.
social
,
canUseBackpack
:
isLoggedIn
,
comments
:
state
.
preview
.
comments
,
enableCommunity
:
projectInfoPresent
,
faved
:
state
.
preview
.
faved
,
...
...
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