mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
long and short shared messages; clarified logic around which banner to show
This commit is contained in:
parent
3af745eede
commit
a6a5ef7941
3 changed files with 25 additions and 13 deletions
|
@ -9,8 +9,8 @@ $navigation-height: 50px;
|
|||
min-height: 3.75rem;
|
||||
overflow: hidden;
|
||||
color: $ui-orange;
|
||||
font-weight: bold;
|
||||
font-size: .875rem;
|
||||
font-weight: bold;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
"project.comments.turnOff": "Turn off commenting",
|
||||
"project.comments.turnedOff": "Sorry, comment posting has been turned off for this project.",
|
||||
"project.share.notShared": "This project is not shared — so only you can see it. Click share to let everyone see it!",
|
||||
"project.share.shared": "Congratulations on sharing your project! Other people can now try it out, give comments, and remix it.",
|
||||
"project.share.sharedLong": "Congratulations on sharing your project! Other people can now try it out, give comments, and remix it.",
|
||||
"project.share.sharedShort": "Your project is now shared.",
|
||||
"project.share.shareButton": "Share",
|
||||
"project.seeInsideButton": "See inside",
|
||||
"project.remixButton": "Remix",
|
||||
|
|
|
@ -135,17 +135,28 @@ const PreviewPresentation = ({
|
|||
message={embedCensorMessage(visibilityInfo.censorMessage)}
|
||||
/>);
|
||||
}
|
||||
} else if (canShare && !isShared) {
|
||||
} else if (canShare) {
|
||||
if (isShared) {
|
||||
if (justShared) {
|
||||
if (isNewScratcher) {
|
||||
banner = (<Banner
|
||||
className="banner-success"
|
||||
message={<FormattedMessage id="project.share.sharedLong" />}
|
||||
/>);
|
||||
} else {
|
||||
banner = (<Banner
|
||||
className="banner-success"
|
||||
message={<FormattedMessage id="project.share.sharedShort" />}
|
||||
/>);
|
||||
}
|
||||
} // if was shared a while ago, don't show any share banner
|
||||
} else {
|
||||
banner = (<Banner
|
||||
actionMessage={<FormattedMessage id="project.share.shareButton" />}
|
||||
message={<FormattedMessage id="project.share.notShared" />}
|
||||
onAction={onShare}
|
||||
/>);
|
||||
} else if (isShared && isNewScratcher) {
|
||||
banner = (<Banner
|
||||
className="banner-success"
|
||||
message={<FormattedMessage id="project.share.shared" />}
|
||||
/>);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue