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
e229d704
Unverified
Commit
e229d704
authored
Sep 24, 2021
by
Sarah Otts
Committed by
GitHub
Sep 24, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6084 from seotts/remove-studio-feature-flag
Remove use of studio-related feature flags
parents
b747dceb
1ee64bf4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
18 deletions
+9
-18
src/redux/session.js
src/redux/session.js
+0
-4
src/views/preview/subactions.jsx
src/views/preview/subactions.jsx
+2
-2
src/views/studio/studio-member-tile.jsx
src/views/studio/studio-member-tile.jsx
+7
-12
No files found.
src/redux/session.js
View file @
e229d704
...
...
@@ -147,10 +147,6 @@ module.exports.selectStudioCommentsGloballyEnabled = state =>
module
.
exports
.
selectMuteStatus
=
state
=>
get
(
state
,
[
'
session
'
,
'
session
'
,
'
permissions
'
,
'
mute_status
'
],
{
muteExpiresAt
:
0
,
offenses
:
[],
showWarning
:
false
});
module
.
exports
.
selectIsMuted
=
state
=>
(
module
.
exports
.
selectMuteStatus
(
state
).
muteExpiresAt
||
0
)
*
1000
>
Date
.
now
();
module
.
exports
.
selectNewStudiosLaunched
=
state
=>
get
(
state
,
[
'
session
'
,
'
session
'
,
'
flags
'
,
'
new_studios_launched
'
],
false
);
module
.
exports
.
selectStudioTransferLaunched
=
state
=>
get
(
state
,
[
'
session
'
,
'
session
'
,
'
flags
'
,
'
studio_transfer_launched
'
],
false
);
module
.
exports
.
selectHasFetchedSession
=
state
=>
state
.
session
.
status
===
module
.
exports
.
Status
.
FETCHED
;
...
...
src/views/preview/subactions.jsx
View file @
e229d704
...
...
@@ -12,7 +12,7 @@ const {connect} = require('react-redux');
const
{
useState
}
=
require
(
'
react
'
);
const
projectShape
=
require
(
'
./projectshape.jsx
'
).
projectShape
;
import
{
selectIsMuted
,
selectNewStudiosLaunched
}
from
'
../../redux/session.js
'
;
import
{
selectIsMuted
}
from
'
../../redux/session.js
'
;
import
StudioMuteEditMessage
from
'
../studio/studio-mute-edit-message.jsx
'
;
require
(
'
./subactions.scss
'
);
...
...
@@ -159,6 +159,6 @@ Subactions.propTypes = {
module
.
exports
=
connect
(
state
=>
({
showAddToStudioMuteError
:
select
NewStudiosLaunched
(
state
)
&&
select
IsMuted
(
state
)
showAddToStudioMuteError
:
selectIsMuted
(
state
)
})
)(
Subactions
);
src/views/studio/studio-member-tile.jsx
View file @
e229d704
...
...
@@ -13,7 +13,6 @@ import {
selectCanRemoveCurator
,
selectCanRemoveManager
,
selectCanPromoteCurators
,
selectCanTransfer
}
from
'
../../redux/studio-permissions
'
;
import
{
selectStudioTransferLaunched
}
from
'
../../redux/session.js
'
;
import
{
Errors
,
promoteCurator
,
...
...
@@ -29,7 +28,7 @@ import removeIcon from './icons/remove-icon.svg';
import
promoteIcon
from
'
./icons/curator-icon.svg
'
;
const
StudioMemberTile
=
({
canRemove
,
canPromote
,
onRemove
,
canTransferHost
,
onPromote
,
studioTransferLaunched
,
canRemove
,
canPromote
,
onRemove
,
canTransferHost
,
onPromote
,
isCreator
,
hasReachedManagerLimit
,
// mapState props
username
,
image
// own props
})
=>
{
...
...
@@ -54,10 +53,9 @@ const StudioMemberTile = ({
>
{
username
}
</
a
>
{
isCreator
&&
<
div
className=
"studio-member-role"
>
{
studioTransferLaunched
?
<
FormattedMessage
id=
"studio.hostRole"
/>
:
<
FormattedMessage
id=
"studio.creatorRole"
/>
}
</
div
>
}
<
FormattedMessage
id=
"studio.hostRole"
/>
</
div
>
}
</
div
>
{
(
canRemove
||
canPromote
||
canTransferHost
)
&&
<
OverflowMenu
>
...
...
@@ -154,18 +152,15 @@ StudioMemberTile.propTypes = {
username
:
PropTypes
.
string
,
image
:
PropTypes
.
string
,
isCreator
:
PropTypes
.
bool
,
hasReachedManagerLimit
:
PropTypes
.
bool
,
studioTransferLaunched
:
PropTypes
.
bool
hasReachedManagerLimit
:
PropTypes
.
bool
};
const
ManagerTile
=
connect
(
(
state
,
ownProps
)
=>
({
canRemove
:
selectCanRemoveManager
(
state
,
ownProps
.
id
),
canPromote
:
false
,
canTransferHost
:
selectCanTransfer
(
state
,
ownProps
.
id
)
&&
selectStudioTransferLaunched
(
state
),
isCreator
:
state
.
studio
.
host
===
ownProps
.
id
,
studioTransferLaunched
:
selectStudioTransferLaunched
(
state
)
canTransferHost
:
selectCanTransfer
(
state
,
ownProps
.
id
),
isCreator
:
state
.
studio
.
owner
===
ownProps
.
id
}),
{
onRemove
:
removeManager
...
...
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