Commit ad3f50ac authored by seotts's avatar seotts

Revert "Revert "Merge pull request #5573 from seotts/muted-add-proj-via-proj-page""

This reverts commit 5b7127a2.

# Conflicts:
#	src/views/preview/subactions.jsx
parent 60b98908
......@@ -147,6 +147,8 @@ 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.selectHasFetchedSession = state => state.session.status === module.exports.Status.FETCHED;
......
......@@ -46,5 +46,6 @@
"project.cloudVariables": "Cloud Variables",
"project.cloudDataLink": "See Data",
"project.usernameBlockAlert": "This project can detect who is using it, through the \"username\" block. To hide your identity, sign out before using the project.",
"project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful."
"project.inappropriateUpdate": "Hmm...the bad word detector thinks there is a problem with your text. Please change it and remember to be respectful.",
"project.mutedAddToStudio": "You will be able to add to studios again {inDuration}."
}
......@@ -160,7 +160,6 @@ $stage-width: 480px;
margin-top: $arrow-border-width;
border: 1px solid $active-gray;
border-radius: 5px;
background-color: $ui-orange;
padding: 1rem;
max-width: 18.75rem;
min-height: 1rem;
......@@ -185,7 +184,6 @@ $stage-width: 480px;
border-left: 1px solid $active-gray;
border-radius: 5px;
background-color: $ui-orange;
width: $arrow-border-width;
height: $arrow-border-width;
......
......@@ -109,3 +109,10 @@
}
}
}
.studio-button-error {
top: auto;
transform: none;
width: 100%;
margin-left: 0;
}
......@@ -9,12 +9,15 @@ import {selectMuteStatus} from '../../redux/session';
import {formatRelativeTime} from '../../lib/format-time.js';
const StudioMuteEditMessage = ({
className,
messageId,
muteExpiresAtMs
}) => (
<ValidationMessage
className={className}
mode="info"
message={<FormattedMessage
id="studio.mutedEdit"
id={messageId}
values={{
inDuration: formatRelativeTime(muteExpiresAtMs, window._locale)
}}
......@@ -24,9 +27,15 @@ const StudioMuteEditMessage = ({
StudioMuteEditMessage.propTypes = {
className: PropTypes.string,
messageId: PropTypes.string,
muteExpiresAtMs: PropTypes.number
};
StudioMuteEditMessage.defaultProps = {
messageId: 'studio.mutedEdit'
};
export default connect(
state => ({
muteExpiresAtMs: (selectMuteStatus(state).muteExpiresAt * 1000 || 0)
......
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