mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 15:47:53 -05:00
Merge pull request #7742 from scratchfoundation/far-lint-fixes
far lint fixes
This commit is contained in:
commit
2d11733ac2
2 changed files with 18 additions and 6 deletions
|
@ -86,7 +86,7 @@ const handleSessionResponse = (dispatch, body) => {
|
||||||
body.user.banned &&
|
body.user.banned &&
|
||||||
banGoodListPaths.every(goodPath => window.location.pathname.indexOf(goodPath) === -1)
|
banGoodListPaths.every(goodPath => window.location.pathname.indexOf(goodPath) === -1)
|
||||||
) {
|
) {
|
||||||
if(body.user.banned_status === 'far_banned'){
|
if (body.user.banned_status === 'far_banned'){
|
||||||
window.location = '/accounts/bad-username/';
|
window.location = '/accounts/bad-username/';
|
||||||
} else {
|
} else {
|
||||||
window.location = '/accounts/banned-response/';
|
window.location = '/accounts/banned-response/';
|
||||||
|
@ -158,7 +158,7 @@ module.exports.selectIsLoggedIn = state => !!get(state, ['session', 'session', '
|
||||||
module.exports.selectUsername = state => get(state, ['session', 'session', 'user', 'username'], null);
|
module.exports.selectUsername = state => get(state, ['session', 'session', 'user', 'username'], null);
|
||||||
module.exports.selectToken = state => get(state, ['session', 'session', 'user', 'token'], null);
|
module.exports.selectToken = state => get(state, ['session', 'session', 'user', 'token'], null);
|
||||||
module.exports.selectIsAdmin = state => get(state, ['session', 'session', 'permissions', 'admin'], false);
|
module.exports.selectIsAdmin = state => get(state, ['session', 'session', 'permissions', 'admin'], false);
|
||||||
module.exports.selectBannedUser = state => get(state, ['session', 'session', 'user'], false);
|
module.exports.selectUser = state => get(state, ['session', 'session', 'user'], false);
|
||||||
module.exports.selectIsSocial = state => get(state, ['session', 'session', 'permissions', 'social'], false);
|
module.exports.selectIsSocial = state => get(state, ['session', 'session', 'permissions', 'social'], false);
|
||||||
module.exports.selectIsEducator = state => get(state, ['session', 'session', 'permissions', 'educator'], false);
|
module.exports.selectIsEducator = state => get(state, ['session', 'session', 'permissions', 'educator'], false);
|
||||||
module.exports.selectProjectCommentsGloballyEnabled = state =>
|
module.exports.selectProjectCommentsGloballyEnabled = state =>
|
||||||
|
|
|
@ -2,7 +2,7 @@ const injectIntl = require('react-intl').injectIntl;
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const FormattedMessage = require('react-intl').FormattedMessage;
|
const FormattedMessage = require('react-intl').FormattedMessage;
|
||||||
import {connect} from 'react-redux';
|
import {connect} from 'react-redux';
|
||||||
import {selectBannedUser, selectHasFetchedSession} from '../../redux/session';
|
import {selectUser, selectHasFetchedSession} from '../../redux/session';
|
||||||
const messageActions = require('../../redux/messages.js');
|
const messageActions = require('../../redux/messages.js');
|
||||||
const JoinFlowStep = require('../../components/join-flow/join-flow-step.jsx');
|
const JoinFlowStep = require('../../components/join-flow/join-flow-step.jsx');
|
||||||
const FormikInput = require('../../components/formik-forms/formik-input.jsx');
|
const FormikInput = require('../../components/formik-forms/formik-input.jsx');
|
||||||
|
@ -105,7 +105,13 @@ const BannedSplash = ({hasSession, user, adminMessages, getAdminMessages}) => {
|
||||||
<p><FormattedMessage id="renameAccount.scratchIsForKids" /></p>
|
<p><FormattedMessage id="renameAccount.scratchIsForKids" /></p>
|
||||||
<p><FormattedMessage
|
<p><FormattedMessage
|
||||||
id="renameAccount.rememberToFollow"
|
id="renameAccount.rememberToFollow"
|
||||||
values={{communityGuidelinesLink: (<a href="/community_guidelines"><FormattedMessage id="renameAccount.CommunityGuidelines" /></a>)}}
|
values={{
|
||||||
|
communityGuidelinesLink: (
|
||||||
|
<a href="/community_guidelines">
|
||||||
|
<FormattedMessage id="renameAccount.CommunityGuidelines" />
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}}
|
||||||
/></p>
|
/></p>
|
||||||
</div>)
|
</div>)
|
||||||
}
|
}
|
||||||
|
@ -138,7 +144,13 @@ const BannedSplash = ({hasSession, user, adminMessages, getAdminMessages}) => {
|
||||||
<JoinFlowStep
|
<JoinFlowStep
|
||||||
description={<FormattedMessage
|
description={<FormattedMessage
|
||||||
id="renameAccount.makeSure"
|
id="renameAccount.makeSure"
|
||||||
values={{communityGuidelinesLink: (<a href="/community_guidelines"><FormattedMessage id="renameAccount.scratchsCommunityGuidelines" /></a>)}}
|
values={{
|
||||||
|
communityGuidelinesLink: (
|
||||||
|
<a href="/community_guidelines">
|
||||||
|
<FormattedMessage id="renameAccount.scratchsCommunityGuidelines" />
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}}
|
||||||
/>}
|
/>}
|
||||||
innerClassName="change-username-inner"
|
innerClassName="change-username-inner"
|
||||||
outerClassName="change-username-outer"
|
outerClassName="change-username-outer"
|
||||||
|
@ -253,7 +265,7 @@ BannedSplash.propTypes = {
|
||||||
|
|
||||||
const ConnectedBannedSplash = connect(
|
const ConnectedBannedSplash = connect(
|
||||||
state => ({
|
state => ({
|
||||||
user: selectBannedUser(state),
|
user: selectUser(state),
|
||||||
hasSession: selectHasFetchedSession(state),
|
hasSession: selectHasFetchedSession(state),
|
||||||
adminMessages: state.messages.messages &&
|
adminMessages: state.messages.messages &&
|
||||||
state.messages.messages.admin &&
|
state.messages.messages.admin &&
|
||||||
|
|
Loading…
Reference in a new issue