mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
feat: uepr-12: viusalise community guidelines modal on home screen after registration
This commit is contained in:
parent
bdec4169eb
commit
731ca7a7b2
8 changed files with 95 additions and 143 deletions
|
@ -1,7 +1,7 @@
|
||||||
import React, {useCallback, useState, useEffect} from 'react';
|
import React, {useCallback, useState, useEffect} from 'react';
|
||||||
import {CommunityGuidelines, communityGuidelines} from './community-guidelines.jsx';
|
import {CommunityGuidelines, communityGuidelines} from './community-guidelines.jsx';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import {injectIntl} from 'react-intl';
|
import {FormattedMessage, injectIntl} from 'react-intl';
|
||||||
const ReactModal = require('react-modal');
|
const ReactModal = require('react-modal');
|
||||||
|
|
||||||
const CommunityGuidelinesModal = props => {
|
const CommunityGuidelinesModal = props => {
|
||||||
|
@ -17,7 +17,7 @@ const CommunityGuidelinesModal = props => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ReactModal
|
<ReactModal
|
||||||
isOpen
|
isOpen={props.isOpen}
|
||||||
style={{
|
style={{
|
||||||
content: {
|
content: {
|
||||||
inset: 0,
|
inset: 0,
|
||||||
|
@ -35,7 +35,9 @@ const CommunityGuidelinesModal = props => {
|
||||||
userId={props.userId}
|
userId={props.userId}
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
onNextPage={currentPage < communityGuidelines.length - 1 ? onNextPage : onComplete}
|
onNextPage={currentPage < communityGuidelines.length - 1 ? onNextPage : onComplete}
|
||||||
nextButtonText={currentPage === communityGuidelines.length - 1 ? 'I Understand' : null}
|
nextButtonText={currentPage === communityGuidelines.length - 1 ?
|
||||||
|
<FormattedMessage id={'communityGuidelines.buttons.finish'} /> :
|
||||||
|
null}
|
||||||
onBackPage={currentPage > 0 ? onBackPage : null}
|
onBackPage={currentPage > 0 ? onBackPage : null}
|
||||||
/>
|
/>
|
||||||
</ReactModal>);
|
</ReactModal>);
|
||||||
|
@ -47,4 +49,4 @@ CommunityGuidelinesModal.propTypes = {
|
||||||
isOpen: PropTypes.bool
|
isOpen: PropTypes.bool
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IntlCommunityGuidelinesWrapper = injectIntl(CommunityGuidelinesModal);
|
export const IntlCommunityGuidelinesModal = injectIntl(CommunityGuidelinesModal);
|
|
@ -8,54 +8,54 @@ import PropTypes from 'prop-types';
|
||||||
|
|
||||||
export const communityGuidelines = [
|
export const communityGuidelines = [
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.respectSection',
|
section: 'communityGuidelines.guidelines.respectSection',
|
||||||
header: 'becomeAScratcher.guidelines.respectHeader',
|
header: 'communityGuidelines.guidelines.respectHeader',
|
||||||
body: 'becomeAScratcher.guidelines.respectBody',
|
body: 'communityGuidelines.guidelines.respectBody',
|
||||||
image: 'respect-illustration.svg',
|
image: 'respect-illustration.svg',
|
||||||
imageLeft: true
|
imageLeft: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.safeSection',
|
section: 'communityGuidelines.guidelines.safeSection',
|
||||||
header: 'becomeAScratcher.guidelines.safeHeader',
|
header: 'communityGuidelines.guidelines.safeHeader',
|
||||||
body: 'becomeAScratcher.guidelines.safeBody',
|
body: 'communityGuidelines.guidelines.safeBody',
|
||||||
image: 'safe-illustration.svg'
|
image: 'safe-illustration.svg'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.feedbackSection',
|
section: 'communityGuidelines.guidelines.feedbackSection',
|
||||||
header: 'becomeAScratcher.guidelines.feedbackHeader',
|
header: 'communityGuidelines.guidelines.feedbackHeader',
|
||||||
body: 'becomeAScratcher.guidelines.feedbackBody',
|
body: 'communityGuidelines.guidelines.feedbackBody',
|
||||||
image: 'feedback-illustration.svg',
|
image: 'feedback-illustration.svg',
|
||||||
imageLeft: true
|
imageLeft: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.remix1Section',
|
section: 'communityGuidelines.guidelines.remix1Section',
|
||||||
header: 'becomeAScratcher.guidelines.remix1Header',
|
header: 'communityGuidelines.guidelines.remix1Header',
|
||||||
body: 'becomeAScratcher.guidelines.remix1Body',
|
body: 'communityGuidelines.guidelines.remix1Body',
|
||||||
image: 'remix-illustration-1.svg'
|
image: 'remix-illustration-1.svg'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.remix2Section',
|
section: 'communityGuidelines.guidelines.remix2Section',
|
||||||
header: 'becomeAScratcher.guidelines.remix2Header',
|
header: 'communityGuidelines.guidelines.remix2Header',
|
||||||
body: 'becomeAScratcher.guidelines.remix2Body',
|
body: 'communityGuidelines.guidelines.remix2Body',
|
||||||
image: 'remix-illustration-2.svg'
|
image: 'remix-illustration-2.svg'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.remix3Section',
|
section: 'communityGuidelines.guidelines.remix3Section',
|
||||||
header: 'becomeAScratcher.guidelines.remix3Header',
|
header: 'communityGuidelines.guidelines.remix3Header',
|
||||||
body: 'becomeAScratcher.guidelines.remix3Body',
|
body: 'communityGuidelines.guidelines.remix3Body',
|
||||||
image: 'remix-illustration-3.svg'
|
image: 'remix-illustration-3.svg'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.honestSection',
|
section: 'communityGuidelines.guidelines.honestSection',
|
||||||
header: 'becomeAScratcher.guidelines.honestHeader',
|
header: 'communityGuidelines.guidelines.honestHeader',
|
||||||
body: 'becomeAScratcher.guidelines.honestBody',
|
body: 'communityGuidelines.guidelines.honestBody',
|
||||||
image: 'honest-illustration.svg',
|
image: 'honest-illustration.svg',
|
||||||
imageLeft: true
|
imageLeft: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
section: 'becomeAScratcher.guidelines.friendlySection',
|
section: 'communityGuidelines.guidelines.friendlySection',
|
||||||
header: 'becomeAScratcher.guidelines.friendlyHeader',
|
header: 'communityGuidelines.guidelines.friendlyHeader',
|
||||||
body: 'becomeAScratcher.guidelines.friendlyBody',
|
body: 'communityGuidelines.guidelines.friendlyBody',
|
||||||
image: 'friendly-illustration.svg'
|
image: 'friendly-illustration.svg'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -45,7 +45,7 @@ const OnboardingNavigation = ({
|
||||||
/>
|
/>
|
||||||
<span className="navText">
|
<span className="navText">
|
||||||
{<FormattedMessage
|
{<FormattedMessage
|
||||||
id={'becomeAScratcher.buttons.back'}
|
id={'communityGuidelines.buttons.back'}
|
||||||
/>}
|
/>}
|
||||||
</span>
|
</span>
|
||||||
</Button> }
|
</Button> }
|
||||||
|
@ -55,7 +55,7 @@ const OnboardingNavigation = ({
|
||||||
</div>}
|
</div>}
|
||||||
<Button onClick={onNextPage}>
|
<Button onClick={onNextPage}>
|
||||||
<span className="navText">
|
<span className="navText">
|
||||||
{nextButtonText || <FormattedMessage id={'becomeAScratcher.buttons.next'} />}
|
{nextButtonText || <FormattedMessage id={'communityGuidelines.buttons.next'} />}
|
||||||
</span>
|
</span>
|
||||||
<img
|
<img
|
||||||
className="right-arrow"
|
className="right-arrow"
|
||||||
|
@ -72,7 +72,7 @@ OnboardingNavigation.propTypes = {
|
||||||
totalDots: PropTypes.number,
|
totalDots: PropTypes.number,
|
||||||
onNextPage: PropTypes.func,
|
onNextPage: PropTypes.func,
|
||||||
onBackPage: PropTypes.func,
|
onBackPage: PropTypes.func,
|
||||||
nextButtonText: PropTypes.string
|
nextButtonText: PropTypes.node
|
||||||
};
|
};
|
||||||
|
|
||||||
export default OnboardingNavigation;
|
export default OnboardingNavigation;
|
||||||
|
|
|
@ -481,60 +481,31 @@
|
||||||
"renameAccount.goToProfile": "Go to your profile",
|
"renameAccount.goToProfile": "Go to your profile",
|
||||||
"renameAccount.pastNotifications": "Here are your past admin notifications",
|
"renameAccount.pastNotifications": "Here are your past admin notifications",
|
||||||
|
|
||||||
"becomeAScratcher.buttons.back": "Back",
|
"communityGuidelines.buttons.back": "Back",
|
||||||
"becomeAScratcher.buttons.next": "Next",
|
"communityGuidelines.buttons.next": "Next",
|
||||||
"becomeAScratcher.buttons.communityGuidelines": "Community Guidelines",
|
"communityGuidelines.buttons.finish": "I Understand",
|
||||||
"becomeAScratcher.buttons.getStarted": "Get Started",
|
"communityGuidelines.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect",
|
||||||
"becomeAScratcher.buttons.finishLater": "Finish Later",
|
"communityGuidelines.guidelines.respectHeader": "Scratchers treat everyone with respect.",
|
||||||
"becomeAScratcher.buttons.goBack": "Go Back",
|
"communityGuidelines.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
||||||
"becomeAScratcher.buttons.iAgree": "I Agree",
|
"communityGuidelines.guidelines.safeSection": "Become a Scratcher - Be safe",
|
||||||
"becomeAScratcher.buttons.takeMeBack": "Take me back to Scratch",
|
"communityGuidelines.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.",
|
||||||
"becomeAScratcher.buttons.backToProfile": "Back to Profile Page",
|
"communityGuidelines.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
||||||
"becomeAScratcher.buttons.finishLater": "Finish Later",
|
"communityGuidelines.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback",
|
||||||
"becomeAScratcher.congratulations.header": "Congratulations, {username}! You have shown that you are ready to become a Scratcher.",
|
"communityGuidelines.guidelines.feedbackHeader": "Scratchers give helpful feedback.",
|
||||||
"becomeAScratcher.congratulations.body": "Scratch is a friendly and welcoming community for everyone, where people create, share, and learn together. We welcome people of all ages, races, ethnicities, religions, abilities, sexual orientations, and gender identities.",
|
"communityGuidelines.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
||||||
"becomeAScratcher.toBeAScratcher.header": "What does it mean to be a Scratcher?",
|
"communityGuidelines.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture",
|
||||||
"becomeAScratcher.toBeAScratcher.body": "You might notice on your profile page that you are currently a “New Scratcher”. Now that you have spent some time on Scratch, we invite you to become a “Scratcher”.",
|
"communityGuidelines.guidelines.remix1Header": "Scratchers embrace remix culture.",
|
||||||
"becomeAScratcher.toBeAScratcher.definition": "Scratchers have a bit more experience on Scratch and are excited to both contribute to the community and to make it a supportive and welcoming space for others.",
|
"communityGuidelines.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
||||||
"becomeAScratcher.toBeAScratcher.canDo": "Here are some things Scratchers do:",
|
"communityGuidelines.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture",
|
||||||
"becomeAScratcher.toBeAScratcher.createStudios": "Create studios",
|
"communityGuidelines.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
||||||
"becomeAScratcher.toBeAScratcher.helpOut": "Help out in the community",
|
"communityGuidelines.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
||||||
"becomeAScratcher.toBeAScratcher.communityGuidelines": "Next, we will take you through the community guidelines and explain what these are.",
|
"communityGuidelines.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture",
|
||||||
"becomeAScratcher.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect",
|
"communityGuidelines.guidelines.remix3Header": "Remixing means sharing with others.",
|
||||||
"becomeAScratcher.guidelines.respectHeader": "Scratchers treat everyone with respect.",
|
"communityGuidelines.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
||||||
"becomeAScratcher.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
"communityGuidelines.guidelines.honestSection": "Become a Scratcher - Be honest",
|
||||||
"becomeAScratcher.guidelines.safeSection": "Become a Scratcher - Be safe",
|
"communityGuidelines.guidelines.honestHeader": "Scratchers are honest.",
|
||||||
"becomeAScratcher.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.",
|
"communityGuidelines.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
||||||
"becomeAScratcher.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
"communityGuidelines.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly",
|
||||||
"becomeAScratcher.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback",
|
"communityGuidelines.guidelines.friendlyHeader": "Scratchers help keep the site friendly.",
|
||||||
"becomeAScratcher.guidelines.feedbackHeader": "Scratchers give helpful feedback.",
|
"communityGuidelines.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it."
|
||||||
"becomeAScratcher.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
|
||||||
"becomeAScratcher.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix1Header": "Scratchers embrace remix culture.",
|
|
||||||
"becomeAScratcher.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
|
||||||
"becomeAScratcher.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
|
||||||
"becomeAScratcher.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
|
||||||
"becomeAScratcher.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix3Header": "Remixing means sharing with others.",
|
|
||||||
"becomeAScratcher.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
|
||||||
"becomeAScratcher.guidelines.honestSection": "Become a Scratcher - Be honest",
|
|
||||||
"becomeAScratcher.guidelines.honestHeader": "Scratchers are honest.",
|
|
||||||
"becomeAScratcher.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
|
||||||
"becomeAScratcher.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly",
|
|
||||||
"becomeAScratcher.guidelines.friendlyHeader": "Scratchers help keep the site friendly.",
|
|
||||||
"becomeAScratcher.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it.",
|
|
||||||
"becomeAScratcher.invitation.header": "{username}, we invite you to become a Scratcher.",
|
|
||||||
"becomeAScratcher.invitation.body": "Scratch is a friendly and welcoming community for everyone. If you agree to be respectful, be safe, give helpful feedback, embrace remix culture, be honest, and help keep the site friendly, click “I agree!”",
|
|
||||||
"becomeAScratcher.invitation.finishLater": "You get to decide if you want to become a Scratcher. If you do not want to be a Scratcher yet, just click “Finish Later” above.",
|
|
||||||
"registration.success.error": "Sorry, an unexpected error occurred.",
|
|
||||||
"becomeAScratcher.success.header": "Hooray! You are now officially a Scratcher.",
|
|
||||||
"becomeAScratcher.success.body": "Here are some links that might be helpful for you.",
|
|
||||||
"becomeAScratcher.success.communityGuidelines": "Community Guidelines",
|
|
||||||
"becomeAScratcher.success.createAProject": "Create a Project",
|
|
||||||
"becomeAScratcher.noInvitation.header": "Whoops! Looks like you haven’t received an invitation to become a Scratcher yet.",
|
|
||||||
"becomeAScratcher.noInvitation.body": "To become a Scratcher, you must be active on Scratch for a while, share several projects, and comment constructively in the community. After a few weeks, you will receive a notification inviting you to become a Scratcher. Scratch on!",
|
|
||||||
"becomeAScratcher.finishLater.header": "No worries, take your time!",
|
|
||||||
"becomeAScratcher.finishLater.body": "By leaving this page, you will not finish the process to become a Scratcher and will stay as a New Scratcher. If you change your mind later, you can always come back via your profile page.",
|
|
||||||
"becomeAScratcher.finishLater.clickBecomeAScratcher": "Just click on “★ Become a Scratcher!” below your username."
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,9 @@ module.exports.getInitialState = () => ({
|
||||||
loginError: null,
|
loginError: null,
|
||||||
loginOpen: false,
|
loginOpen: false,
|
||||||
registrationOpen: false,
|
registrationOpen: false,
|
||||||
shouldReviewCommunityGuidelines: false,
|
// This is set shortly before changing the window.location (hence refreshing the page)
|
||||||
|
// We need something more durable than redux state in that case -> so we use `localStorage`
|
||||||
|
shouldReviewCommunityGuidelines: localStorage.getItem('shouldReviewCommunityGuidelines') === 'true',
|
||||||
searchTerm: ''
|
searchTerm: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,8 +62,10 @@ module.exports.navigationReducer = (state, action) => {
|
||||||
}
|
}
|
||||||
return defaults({registrationOpen: true}, state);
|
return defaults({registrationOpen: true}, state);
|
||||||
case Types.HANDLE_REGISTRATION_COMPLETED:
|
case Types.HANDLE_REGISTRATION_COMPLETED:
|
||||||
|
localStorage.setItem('shouldReviewCommunityGuidelines', 'true');
|
||||||
return defaults({shouldReviewCommunityGuidelines: true}, state);
|
return defaults({shouldReviewCommunityGuidelines: true}, state);
|
||||||
case Types.REVIEW_COMMUNITY_GUIDELINES:
|
case Types.REVIEW_COMMUNITY_GUIDELINES:
|
||||||
|
localStorage.setItem('shouldReviewCommunityGuidelines', 'false');
|
||||||
return defaults({shouldReviewCommunityGuidelines: false}, state);
|
return defaults({shouldReviewCommunityGuidelines: false}, state);
|
||||||
default:
|
default:
|
||||||
return state;
|
return state;
|
||||||
|
|
|
@ -29,6 +29,7 @@ const confettiPaths = [
|
||||||
new Path2D('M10.9967 45.1305C5.99892 36.9346 5.59074 25.9968 9.99448 17.3259C14.5575 8.00641 22.2367 3.87569 25.3229 2.53264C27.178 1.67111 29.1327 0.999586 31.2366 0.504948L33.3008 0.0594462C34.8174 -0.25175 36.3273 0.68839 36.6558 2.18868C36.9877 3.69225 36.022 5.17289 34.4988 5.50047L32.491 5.93286C30.8218 6.32595 29.2223 6.87628 27.6625 7.6035C25.6349 8.4814 18.9281 11.8783 15.0586 19.786C12.1217 25.5612 11.2456 34.7431 15.8683 42.3199C20.0564 49.6183 28.6315 54.0929 36.7654 53.3395C44.4578 52.7859 51.5164 47.6659 53.992 40.8851C56.5042 34.5072 54.835 27.9688 52.0772 24.2869C48.7553 19.75 44.6204 18.3545 42.9976 17.9647C42.7554 17.8926 37.074 16.186 32.0563 18.6985C29.8959 19.7336 27.1017 22.0627 25.605 25.5612C23.9889 29.1743 24.407 33.8193 26.5973 36.9051C28.8008 40.2136 32.9556 42.0873 36.5297 41.4518C40.0872 40.8917 42.4932 38.2449 43.064 35.9191C43.7343 33.4197 42.7056 31.3068 41.9025 30.5468C40.5386 29.2005 39.3605 29.1776 39.3107 29.1743C38.7532 29.1579 38.4777 29.2005 38.3118 29.2267C37.6746 29.4593 36.772 29.9703 36.5065 30.5075C36.46 30.596 36.3406 30.8384 36.5696 31.4444C37.1171 32.8825 36.3771 34.4908 34.9202 35.0313C33.47 35.5751 31.8373 34.8446 31.2864 33.4033C30.3804 31.0186 30.8815 29.1514 31.4623 28.0049C32.9789 25.0207 36.4999 23.9397 36.8981 23.825C37.0806 23.7693 37.2731 23.7366 37.4623 23.7202C37.8505 23.6612 38.5342 23.5695 39.46 23.6055C41.5806 23.6317 43.9965 24.7389 45.8483 26.5701C48.0352 28.6338 49.7476 32.7809 48.533 37.2883C47.3483 42.1135 42.7952 46.1034 37.4822 46.9387C31.7676 47.9575 25.3329 45.1403 21.9347 40.0334C18.6593 35.431 18.032 28.696 20.4281 23.3533C23.0564 17.2014 28.0773 14.4171 29.5508 13.7095C36.6359 10.1717 44.2089 12.5073 44.5275 12.6056C46.5651 13.0871 52.2299 14.9838 56.6336 21.0013C60.0186 25.5284 62.763 33.9831 59.2752 42.8342C56.0894 51.5575 47.0197 58.1843 37.2399 58.8886C36.4733 58.9607 35.6968 59 34.9236 59C25.4325 59 15.8186 53.5295 10.9967 45.1305Z')
|
new Path2D('M10.9967 45.1305C5.99892 36.9346 5.59074 25.9968 9.99448 17.3259C14.5575 8.00641 22.2367 3.87569 25.3229 2.53264C27.178 1.67111 29.1327 0.999586 31.2366 0.504948L33.3008 0.0594462C34.8174 -0.25175 36.3273 0.68839 36.6558 2.18868C36.9877 3.69225 36.022 5.17289 34.4988 5.50047L32.491 5.93286C30.8218 6.32595 29.2223 6.87628 27.6625 7.6035C25.6349 8.4814 18.9281 11.8783 15.0586 19.786C12.1217 25.5612 11.2456 34.7431 15.8683 42.3199C20.0564 49.6183 28.6315 54.0929 36.7654 53.3395C44.4578 52.7859 51.5164 47.6659 53.992 40.8851C56.5042 34.5072 54.835 27.9688 52.0772 24.2869C48.7553 19.75 44.6204 18.3545 42.9976 17.9647C42.7554 17.8926 37.074 16.186 32.0563 18.6985C29.8959 19.7336 27.1017 22.0627 25.605 25.5612C23.9889 29.1743 24.407 33.8193 26.5973 36.9051C28.8008 40.2136 32.9556 42.0873 36.5297 41.4518C40.0872 40.8917 42.4932 38.2449 43.064 35.9191C43.7343 33.4197 42.7056 31.3068 41.9025 30.5468C40.5386 29.2005 39.3605 29.1776 39.3107 29.1743C38.7532 29.1579 38.4777 29.2005 38.3118 29.2267C37.6746 29.4593 36.772 29.9703 36.5065 30.5075C36.46 30.596 36.3406 30.8384 36.5696 31.4444C37.1171 32.8825 36.3771 34.4908 34.9202 35.0313C33.47 35.5751 31.8373 34.8446 31.2864 33.4033C30.3804 31.0186 30.8815 29.1514 31.4623 28.0049C32.9789 25.0207 36.4999 23.9397 36.8981 23.825C37.0806 23.7693 37.2731 23.7366 37.4623 23.7202C37.8505 23.6612 38.5342 23.5695 39.46 23.6055C41.5806 23.6317 43.9965 24.7389 45.8483 26.5701C48.0352 28.6338 49.7476 32.7809 48.533 37.2883C47.3483 42.1135 42.7952 46.1034 37.4822 46.9387C31.7676 47.9575 25.3329 45.1403 21.9347 40.0334C18.6593 35.431 18.032 28.696 20.4281 23.3533C23.0564 17.2014 28.0773 14.4171 29.5508 13.7095C36.6359 10.1717 44.2089 12.5073 44.5275 12.6056C46.5651 13.0871 52.2299 14.9838 56.6336 21.0013C60.0186 25.5284 62.763 33.9831 59.2752 42.8342C56.0894 51.5575 47.0197 58.1843 37.2399 58.8886C36.4733 58.9607 35.6968 59 34.9236 59C25.4325 59 15.8186 53.5295 10.9967 45.1305Z')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
const OnboardingHeader = ({user, section, secondary}) => {
|
const OnboardingHeader = ({user, section, secondary}) => {
|
||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
||||||
return (
|
return (
|
||||||
|
@ -77,7 +78,8 @@ const OnboardingHeader = ({user, section, secondary}) => {
|
||||||
</Modal>
|
</Modal>
|
||||||
<span>
|
<span>
|
||||||
<span className="section">
|
<span className="section">
|
||||||
{/* TODO: Ask whether this was omitted on purpose: {section ? section : null} */}
|
{/* TODO: The section prop was never actually visualised here (previously the prop name differed from the one passed).
|
||||||
|
Should it be visualised, or should it be removed from the guidelines entirely? */}
|
||||||
{null}
|
{null}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -177,25 +179,25 @@ const BecomeAScratcher = ({user, invitedScratcher, scratcher, sessionStatus}) =>
|
||||||
return (<NotAvailable />);
|
return (<NotAvailable />);
|
||||||
}
|
}
|
||||||
|
|
||||||
// // New scratcher who is not invited
|
// New scratcher who is not invited
|
||||||
// if (!invitedScratcher && !scratcher){
|
if (!invitedScratcher && !scratcher){
|
||||||
// return (<div className="no-invitation">
|
return (<div className="no-invitation">
|
||||||
// <img
|
<img
|
||||||
// className="profile-page-image"
|
className="profile-page-image"
|
||||||
// src="/images/onboarding/invitation-illustration.svg"
|
src="/images/onboarding/invitation-illustration.svg"
|
||||||
// />
|
/>
|
||||||
// <h2>
|
<h2>
|
||||||
// <FormattedMessage
|
<FormattedMessage
|
||||||
// id={'becomeAScratcher.noInvitation.header'}
|
id={'becomeAScratcher.noInvitation.header'}
|
||||||
// />
|
/>
|
||||||
// </h2>
|
</h2>
|
||||||
// <div>
|
<div>
|
||||||
// <FormattedMessage
|
<FormattedMessage
|
||||||
// id={'becomeAScratcher.noInvitation.body'}
|
id={'becomeAScratcher.noInvitation.body'}
|
||||||
// />
|
/>
|
||||||
// </div>
|
</div>
|
||||||
// </div>);
|
</div>);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Invited Scratcher
|
// Invited Scratcher
|
||||||
if (currentPage === 0){
|
if (currentPage === 0){
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
"becomeAScratcher.buttons.iAgree": "I Agree",
|
"becomeAScratcher.buttons.iAgree": "I Agree",
|
||||||
"becomeAScratcher.buttons.takeMeBack": "Take me back to Scratch",
|
"becomeAScratcher.buttons.takeMeBack": "Take me back to Scratch",
|
||||||
"becomeAScratcher.buttons.backToProfile": "Back to Profile Page",
|
"becomeAScratcher.buttons.backToProfile": "Back to Profile Page",
|
||||||
"becomeAScratcher.buttons.finishLater": "Finish Later",
|
|
||||||
"becomeAScratcher.congratulations.header": "Congratulations, {username}! You have shown that you are ready to become a Scratcher.",
|
"becomeAScratcher.congratulations.header": "Congratulations, {username}! You have shown that you are ready to become a Scratcher.",
|
||||||
"becomeAScratcher.congratulations.body": "Scratch is a friendly and welcoming community for everyone, where people create, share, and learn together. We welcome people of all ages, races, ethnicities, religions, abilities, sexual orientations, and gender identities.",
|
"becomeAScratcher.congratulations.body": "Scratch is a friendly and welcoming community for everyone, where people create, share, and learn together. We welcome people of all ages, races, ethnicities, religions, abilities, sexual orientations, and gender identities.",
|
||||||
"becomeAScratcher.toBeAScratcher.header": "What does it mean to be a Scratcher?",
|
"becomeAScratcher.toBeAScratcher.header": "What does it mean to be a Scratcher?",
|
||||||
|
@ -18,30 +17,6 @@
|
||||||
"becomeAScratcher.toBeAScratcher.createStudios": "Create studios",
|
"becomeAScratcher.toBeAScratcher.createStudios": "Create studios",
|
||||||
"becomeAScratcher.toBeAScratcher.helpOut": "Help out in the community",
|
"becomeAScratcher.toBeAScratcher.helpOut": "Help out in the community",
|
||||||
"becomeAScratcher.toBeAScratcher.communityGuidelines": "Next, we will take you through the community guidelines and explain what these are.",
|
"becomeAScratcher.toBeAScratcher.communityGuidelines": "Next, we will take you through the community guidelines and explain what these are.",
|
||||||
"becomeAScratcher.guidelines.respectSection": "Become a Scratcher - Treat everyone with respect",
|
|
||||||
"becomeAScratcher.guidelines.respectHeader": "Scratchers treat everyone with respect.",
|
|
||||||
"becomeAScratcher.guidelines.respectBody": "Everyone on Scratch is encouraged to share things that excite them and are important to them—we hope that you find ways to celebrate your own identity on Scratch, and allow others to do the same.",
|
|
||||||
"becomeAScratcher.guidelines.safeSection": "Become a Scratcher - Be safe",
|
|
||||||
"becomeAScratcher.guidelines.safeHeader": "Scratchers are safe: we keep personal and contact information private.",
|
|
||||||
"becomeAScratcher.guidelines.safeBody": "This includes not sharing real last names, phone numbers, addresses, hometowns, school names, email addresses, usernames or links to social media sites, video chatting applications, or websites with private chat functionality.",
|
|
||||||
"becomeAScratcher.guidelines.feedbackSection": "Become a Scratcher - Give helpful feedback",
|
|
||||||
"becomeAScratcher.guidelines.feedbackHeader": "Scratchers give helpful feedback.",
|
|
||||||
"becomeAScratcher.guidelines.feedbackBody": "When commenting on a project, remember to say something you like about it, offer suggestions, and be kind, not critical.",
|
|
||||||
"becomeAScratcher.guidelines.remix1Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix1Header": "Scratchers embrace remix culture.",
|
|
||||||
"becomeAScratcher.guidelines.remix1Body": "Remixing is when you build upon someone else’s projects, code, ideas, images, or anything else they share on Scratch to make your own unique creation.",
|
|
||||||
"becomeAScratcher.guidelines.remix2Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix2Header": "Remixing is a great way to collaborate and connect with other Scratchers.",
|
|
||||||
"becomeAScratcher.guidelines.remix2Body": "You are encouraged to use anything you find on Scratch in your own creations, as long as you provide credit to everyone whose work you used and make a meaningful change to it. ",
|
|
||||||
"becomeAScratcher.guidelines.remix3Section": "Become a Scratcher - Embrace remix culture",
|
|
||||||
"becomeAScratcher.guidelines.remix3Header": "Remixing means sharing with others.",
|
|
||||||
"becomeAScratcher.guidelines.remix3Body": "When you share something on Scratch, you are giving permission to all Scratchers to use your work in their creations, too.",
|
|
||||||
"becomeAScratcher.guidelines.honestSection": "Become a Scratcher - Be honest",
|
|
||||||
"becomeAScratcher.guidelines.honestHeader": "Scratchers are honest.",
|
|
||||||
"becomeAScratcher.guidelines.honestBody": "It’s important to be honest and authentic when interacting with others on Scratch, and remember that there is a person behind every Scratch account.",
|
|
||||||
"becomeAScratcher.guidelines.friendlySection": "Become a Scratcher - Keep the site friendly",
|
|
||||||
"becomeAScratcher.guidelines.friendlyHeader": "Scratchers help keep the site friendly.",
|
|
||||||
"becomeAScratcher.guidelines.friendlyBody": "It’s important to keep your creations and conversations friendly and appropriate for all ages. If you think something on Scratch is mean, insulting, too violent, or otherwise disruptive to the community, click “Report” to let us know about it.",
|
|
||||||
"becomeAScratcher.invitation.header": "{username}, we invite you to become a Scratcher.",
|
"becomeAScratcher.invitation.header": "{username}, we invite you to become a Scratcher.",
|
||||||
"becomeAScratcher.invitation.body": "Scratch is a friendly and welcoming community for everyone. If you agree to be respectful, be safe, give helpful feedback, embrace remix culture, be honest, and help keep the site friendly, click “I agree!”",
|
"becomeAScratcher.invitation.body": "Scratch is a friendly and welcoming community for everyone. If you agree to be respectful, be safe, give helpful feedback, embrace remix culture, be honest, and help keep the site friendly, click “I agree!”",
|
||||||
"becomeAScratcher.invitation.finishLater": "You get to decide if you want to become a Scratcher. If you do not want to be a Scratcher yet, just click “Finish Later” above.",
|
"becomeAScratcher.invitation.finishLater": "You get to decide if you want to become a Scratcher. If you do not want to be a Scratcher yet, just click “Finish Later” above.",
|
||||||
|
|
|
@ -12,10 +12,10 @@ const navigationActions = require('../../redux/navigation.js');
|
||||||
|
|
||||||
const Page = require('../../components/page/www/page.jsx');
|
const Page = require('../../components/page/www/page.jsx');
|
||||||
const SplashPresentation = require('./presentation.jsx');
|
const SplashPresentation = require('./presentation.jsx');
|
||||||
const {injectIntl, intlShape} = require('react-intl');
|
const {injectIntl} = require('react-intl');
|
||||||
const {
|
const {
|
||||||
IntlCommunityGuidelinesWrapper
|
IntlCommunityGuidelinesModal
|
||||||
} = require('../../components/community-guidelines/community-guidelines-wrapper.jsx');
|
} = require('../../components/community-guidelines/community-guidelines-modal.jsx');
|
||||||
|
|
||||||
const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end time for now
|
const SCRATCH_WEEK_START_TIME = 1621224000000; // 2021-05-17 00:00:00 -- No end time for now
|
||||||
// const HOC_START_TIME = 1638144000000; // 2021-11-29 00:00:00 GMT in ms
|
// const HOC_START_TIME = 1638144000000; // 2021-11-29 00:00:00 GMT in ms
|
||||||
|
@ -202,14 +202,12 @@ class Splash extends React.Component {
|
||||||
|
|
||||||
const shouldReviewCommunityGuidelines = this.props.shouldReviewCommunityGuidelines;
|
const shouldReviewCommunityGuidelines = this.props.shouldReviewCommunityGuidelines;
|
||||||
|
|
||||||
if (shouldReviewCommunityGuidelines && this.props.user.id) {
|
return (<>
|
||||||
return (<IntlCommunityGuidelinesWrapper
|
<IntlCommunityGuidelinesModal
|
||||||
|
isOpen={shouldReviewCommunityGuidelines && this.props.user.id}
|
||||||
userId={`${this.props.user.id}`}
|
userId={`${this.props.user.id}`}
|
||||||
onComplete={this.handleCommunityGuidelinesReview}
|
onComplete={this.handleCommunityGuidelinesReview}
|
||||||
/>);
|
/>
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<SplashPresentation
|
<SplashPresentation
|
||||||
activity={this.props.activity}
|
activity={this.props.activity}
|
||||||
adminPanelOpen={this.state.adminPanelOpen}
|
adminPanelOpen={this.state.adminPanelOpen}
|
||||||
|
@ -235,7 +233,7 @@ class Splash extends React.Component {
|
||||||
onDismiss={this.handleDismiss}
|
onDismiss={this.handleDismiss}
|
||||||
onOpenAdminPanel={this.handleOpenAdminPanel}
|
onOpenAdminPanel={this.handleOpenAdminPanel}
|
||||||
onRefreshHomepageCache={this.handleRefreshHomepageCache}
|
onRefreshHomepageCache={this.handleRefreshHomepageCache}
|
||||||
/>
|
/></>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue