mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
added default censored messages
This commit is contained in:
parent
ecad945ead
commit
d70bbe20c9
3 changed files with 36 additions and 6 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
$navigation-height: 50px;
|
||||
|
||||
.banner-outer {
|
||||
.banner-outer{
|
||||
display: flex;
|
||||
background-color: $ui-orange-25percent;
|
||||
width: 100%;
|
||||
|
@ -25,18 +25,18 @@ $navigation-height: 50px;
|
|||
}
|
||||
|
||||
.banner-inner {
|
||||
padding-top: .325rem;
|
||||
padding-bottom: .325rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.banner-text {
|
||||
padding: .5rem 0;
|
||||
.banner-text{
|
||||
padding: .625rem 0;
|
||||
}
|
||||
|
||||
.banner-button {
|
||||
margin-top: .75rem;
|
||||
margin-bottom: .75rem;
|
||||
border-radius: .25rem;
|
||||
background-color: $ui-orange;
|
||||
padding-top: .6875rem;
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
"project.notesAndCreditsLabel": "Notes and Credits",
|
||||
"project.credit": "Thanks to {userLink} for the original project {projectLink}.",
|
||||
"project.deletedBanner": "Note: This project is in the trash folder",
|
||||
"project.defaultCensoredMessage": "This project was removed by the Scratch Team because it was disrespectful, inappropriate for all ages, or otherwise breaks the Scratch community guidelines.",
|
||||
"project.tempCensoredMessage": "Please read the {communityGuidelinesLink} and be sure to edit the project to make sure it's respectful before resharing it.",
|
||||
"project.permCensoredMessage": "It cannot be reshared at any time in the future.",
|
||||
"project.communityGuidelines": "community guidelines",
|
||||
"project.moderationInfoLabel": "Moderation Info",
|
||||
"project.numScripts": "{number} scripts",
|
||||
"project.numSprites": "{number} sprites",
|
||||
|
|
|
@ -144,9 +144,35 @@ const PreviewPresentation = ({
|
|||
message={<FormattedMessage id="project.deletedBanner" />}
|
||||
/>);
|
||||
} else if (visibilityInfo.censored) {
|
||||
let censoredMessage;
|
||||
if (visibilityInfo.message) { // if message is present, set innerHTML with it
|
||||
censoredMessage = embedCensorMessage(visibilityInfo.message);
|
||||
} else { // if message is blank or missing, use default
|
||||
censoredMessage = (
|
||||
<React.Fragment>
|
||||
<FormattedMessage id="project.defaultCensoredMessage" />
|
||||
<br />
|
||||
<br />
|
||||
{visibilityInfo.reshareable ? (
|
||||
<FormattedMessage
|
||||
id="project.tempCensoredMessage"
|
||||
values={{
|
||||
communityGuidelinesLink: (
|
||||
<a href="/community_guidelines/">
|
||||
<FormattedMessage id="project.communityGuidelines" />
|
||||
</a>
|
||||
)
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage id="project.permCensoredMessage" />
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
banner = (<Banner
|
||||
className="banner-danger"
|
||||
message={embedCensorMessage(visibilityInfo.message)}
|
||||
message={censoredMessage}
|
||||
/>);
|
||||
} else if (justRemixed) {
|
||||
banner = (
|
||||
|
|
Loading…
Reference in a new issue