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

This reverts commit 5b7127a271.

# Conflicts:
#	src/views/preview/subactions.jsx
This commit is contained in:
seotts 2021-06-17 17:19:51 -04:00
parent 60b98908e0
commit ad3f50ac10
5 changed files with 21 additions and 4 deletions

View file

@ -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;

View file

@ -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}."
}

View file

@ -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;

View file

@ -109,3 +109,10 @@
}
}
}
.studio-button-error {
top: auto;
transform: none;
width: 100%;
margin-left: 0;
}

View file

@ -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)