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
23f7e563
Commit
23f7e563
authored
Jun 17, 2021
by
Paul Kaplan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include deleted studio banner
parent
43b8b74d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
2 deletions
+39
-2
src/redux/studio.js
src/redux/studio.js
+6
-2
src/views/studio/l10n.json
src/views/studio/l10n.json
+2
-0
src/views/studio/studio-deleted.jsx
src/views/studio/studio-deleted.jsx
+22
-0
src/views/studio/studio.jsx
src/views/studio/studio.jsx
+2
-0
src/views/studio/studio.scss
src/views/studio/studio.scss
+7
-0
No files found.
src/redux/studio.js
View file @
23f7e563
...
@@ -26,6 +26,7 @@ const getInitialState = () => ({
...
@@ -26,6 +26,7 @@ const getInitialState = () => ({
followers
:
0
,
followers
:
0
,
managers
:
0
,
managers
:
0
,
owner
:
null
,
owner
:
null
,
public
:
null
,
// BEWARE: classroomId is only loaded if the user is an educator
// BEWARE: classroomId is only loaded if the user is an educator
classroomId
:
null
,
classroomId
:
null
,
...
@@ -111,6 +112,7 @@ const selectIsFetchingInfo = state => state.studio.infoStatus === Status.FETCHIN
...
@@ -111,6 +112,7 @@ const selectIsFetchingInfo = state => state.studio.infoStatus === Status.FETCHIN
const
selectIsFollowing
=
state
=>
state
.
studio
.
following
;
const
selectIsFollowing
=
state
=>
state
.
studio
.
following
;
const
selectIsFetchingRoles
=
state
=>
state
.
studio
.
rolesStatus
===
Status
.
FETCHING
;
const
selectIsFetchingRoles
=
state
=>
state
.
studio
.
rolesStatus
===
Status
.
FETCHING
;
const
selectClassroomId
=
state
=>
state
.
studio
.
classroomId
;
const
selectClassroomId
=
state
=>
state
.
studio
.
classroomId
;
const
selectStudioPublic
=
state
=>
state
.
studio
.
public
;
// Thunks
// Thunks
const
getInfo
=
()
=>
((
dispatch
,
getState
)
=>
{
const
getInfo
=
()
=>
((
dispatch
,
getState
)
=>
{
...
@@ -133,7 +135,8 @@ const getInfo = () => ((dispatch, getState) => {
...
@@ -133,7 +135,8 @@ const getInfo = () => ((dispatch, getState) => {
followers
:
body
.
stats
.
followers
,
followers
:
body
.
stats
.
followers
,
managers
:
body
.
stats
.
managers
,
managers
:
body
.
stats
.
managers
,
projectCount
:
body
.
stats
.
projects
,
projectCount
:
body
.
stats
.
projects
,
owner
:
body
.
owner
owner
:
body
.
owner
,
public
:
body
.
public
}));
}));
});
});
});
});
...
@@ -202,5 +205,6 @@ module.exports = {
...
@@ -202,5 +205,6 @@ module.exports = {
selectIsFetchingInfo
,
selectIsFetchingInfo
,
selectIsFetchingRoles
,
selectIsFetchingRoles
,
selectIsFollowing
,
selectIsFollowing
,
selectClassroomId
selectClassroomId
,
selectStudioPublic
};
};
src/views/studio/l10n.json
View file @
23f7e563
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
"studio.tabNavCommentsWithCount"
:
"Comments {commentCount}"
,
"studio.tabNavCommentsWithCount"
:
"Comments {commentCount}"
,
"studio.tabNavActivity"
:
"Activity"
,
"studio.tabNavActivity"
:
"Activity"
,
"studio.showingDeleted"
:
"Showing Deleted Studio"
,
"studio.title"
:
"Title"
,
"studio.title"
:
"Title"
,
"studio.description"
:
"Description"
,
"studio.description"
:
"Description"
,
"studio.thumbnail"
:
"Thumbnail"
,
"studio.thumbnail"
:
"Thumbnail"
,
...
...
src/views/studio/studio-deleted.jsx
0 → 100644
View file @
23f7e563
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
{
connect
}
from
'
react-redux
'
;
import
{
FormattedMessage
}
from
'
react-intl
'
;
import
{
selectStudioPublic
}
from
'
../../redux/studio
'
;
const
StudioDeleted
=
({
deleted
})
=>
{
if
(
!
deleted
)
return
null
;
return
(<
div
className=
"studio-deleted studio-info-box studio-info-box-error"
>
<
FormattedMessage
id=
"studio.showingDeleted"
/>
</
div
>);
};
StudioDeleted
.
propTypes
=
{
deleted
:
PropTypes
.
bool
};
export
default
connect
(
state
=>
({
deleted
:
selectStudioPublic
(
state
)
===
false
})
)(
StudioDeleted
);
src/views/studio/studio.jsx
View file @
23f7e563
...
@@ -25,6 +25,7 @@ import StudioActivity from './studio-activity.jsx';
...
@@ -25,6 +25,7 @@ import StudioActivity from './studio-activity.jsx';
import
StudioCuratorInvite
from
'
./studio-curator-invite.jsx
'
;
import
StudioCuratorInvite
from
'
./studio-curator-invite.jsx
'
;
import
StudioMeta
from
'
./studio-meta.jsx
'
;
import
StudioMeta
from
'
./studio-meta.jsx
'
;
import
StudioAdminPanel
from
'
./studio-admin-panel.jsx
'
;
import
StudioAdminPanel
from
'
./studio-admin-panel.jsx
'
;
import
StudioDeleted
from
'
./studio-deleted.jsx
'
;
import
{
import
{
projects
,
projects
,
...
@@ -57,6 +58,7 @@ const StudioShell = ({isAdmin, showCuratorMuteError, muteExpiresAtMs, studioLoad
...
@@ -57,6 +58,7 @@ const StudioShell = ({isAdmin, showCuratorMuteError, muteExpiresAtMs, studioLoad
studioLoadFailed
?
studioLoadFailed
?
<
NotAvailable
/>
:
<
NotAvailable
/>
:
<
div
className=
"studio-shell"
>
<
div
className=
"studio-shell"
>
<
StudioDeleted
/>
<
StudioMeta
/>
<
StudioMeta
/>
<
div
className=
"studio-info"
>
<
div
className=
"studio-info"
>
<
StudioInfo
/>
<
StudioInfo
/>
...
...
src/views/studio/studio.scss
View file @
23f7e563
...
@@ -46,6 +46,13 @@ $radius: 8px;
...
@@ -46,6 +46,13 @@ $radius: 8px;
}
}
}
}
.studio-deleted
{
/* Always make this box take up all the columns */
grid-column
:
1
/
-1
;
padding
:
1rem
;
box-sizing
:
border-box
;
}
.studio-info
{
.studio-info
{
justify-self
:
center
;
justify-self
:
center
;
width
:
300px
;
width
:
300px
;
...
...
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