mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
added autocensor-specific banner message
This commit is contained in:
parent
ddf6793362
commit
971b3dc2d1
3 changed files with 37 additions and 22 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
$navigation-height: 50px;
|
||||
|
||||
.banner-outer{
|
||||
.banner-outer {
|
||||
display: flex;
|
||||
background-color: $ui-orange-25percent;
|
||||
width: 100%;
|
||||
|
@ -32,7 +32,7 @@ $navigation-height: 50px;
|
|||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.banner-text{
|
||||
.banner-text {
|
||||
padding: .625rem 0;
|
||||
max-width: 50rem;
|
||||
line-height: 1.25rem;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
"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.communityCensoredMessage": "Your project has been temporarily un-shared because multiple people reported it as inappropriate.",
|
||||
"project.willReviewCensoredMessage": "The Scratch Team will review the project based on the {communityGuidelinesLink}, and either restore the project or confirm the censorship.",
|
||||
"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",
|
||||
|
|
|
@ -148,27 +148,40 @@ const PreviewPresentation = ({
|
|||
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>
|
||||
const communityGuidelinesLink = (
|
||||
<a href="/community_guidelines/">
|
||||
<FormattedMessage id="project.communityGuidelines" />
|
||||
</a>
|
||||
);
|
||||
if (visibilityInfo.censoredByCommunity) {
|
||||
censoredMessage = (
|
||||
<React.Fragment>
|
||||
<FormattedMessage id="project.communityCensoredMessage" />
|
||||
<br />
|
||||
<br />
|
||||
<FormattedMessage
|
||||
id="project.willReviewCensoredMessage"
|
||||
values={{communityGuidelinesLink: communityGuidelinesLink}}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
censoredMessage = (
|
||||
<React.Fragment>
|
||||
<FormattedMessage id="project.defaultCensoredMessage" />
|
||||
<br />
|
||||
<br />
|
||||
{visibilityInfo.reshareable ? (
|
||||
<FormattedMessage
|
||||
id="project.tempCensoredMessage"
|
||||
values={{communityGuidelinesLink: communityGuidelinesLink}}
|
||||
/>
|
||||
) : (
|
||||
<FormattedMessage id="project.permCensoredMessage" />
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
banner = (<Banner
|
||||
className="banner-danger"
|
||||
|
|
Loading…
Reference in a new issue