mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Merge pull request #1562 from LLK/release/2.2.25
[Master] Release 2.2.25
This commit is contained in:
commit
ea1b4248e4
12 changed files with 139 additions and 70 deletions
|
@ -70,5 +70,5 @@
|
|||
"tr": "Türkçe",
|
||||
"uk": "Українська",
|
||||
"zh-cn": "简体中文",
|
||||
"zh-tw": "正體中文"
|
||||
"zh-tw": "繁體中文"
|
||||
}
|
||||
|
|
|
@ -66,6 +66,11 @@
|
|||
|
||||
input[type="radio"] {
|
||||
margin-right: 1rem;
|
||||
|
||||
&:focus {
|
||||
transition: all .5s ease;
|
||||
border: 1px solid $ui-blue;
|
||||
}
|
||||
}
|
||||
|
||||
.demographics-step-input-other {
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
"registration.classroomApiGeneralError": "Sorry, we could not find the registration information for this class",
|
||||
"registration.generalError": "Sorry, an unexpected error occurred.",
|
||||
"registration.classroomInviteExistingStudentStepDescription": "you have been invited to join the class:",
|
||||
"registration.classroomInviteNewStudentStepDescription": "has invited you to join the class:",
|
||||
"registration.classroomInviteNewStudentStepDescription": "Your teacher has invited you to join a class:",
|
||||
"registration.confirmYourEmail": "Confirm Your Email",
|
||||
"registration.confirmYourEmailDescription": "If you haven't already, please click the link in the confirmation email sent to:",
|
||||
"registration.createUsername": "Create a Username",
|
||||
|
|
|
@ -71,10 +71,11 @@ var Jar = {
|
|||
});
|
||||
},
|
||||
set: function (name, value, opts) {
|
||||
opts = opts || {};
|
||||
defaults(opts, {
|
||||
expires: new Date(new Date().setYear(new Date().getFullYear() + 1)),
|
||||
path: '/'
|
||||
expires: new Date(new Date().setYear(new Date().getFullYear() + 1))
|
||||
});
|
||||
opts.path = '/';
|
||||
var obj = cookie.serialize(name, value, opts);
|
||||
document.cookie = obj;
|
||||
},
|
||||
|
|
|
@ -21,67 +21,67 @@ var Credits = React.createClass({
|
|||
<img src="//cdn.scratch.mit.edu/get_image/user/2755634_170x170.png" alt="Christan Avatar" />
|
||||
<span className="name">Christan Balch</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3581881_170x170.png" alt="Carl Avatar" />
|
||||
<span className="name">Carl Bowman</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/900283_170x170.png" alt="Champika Avatar" />
|
||||
<span className="name">Champika Fernando</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/24137617_170x170.png" alt="Mark Avatar" />
|
||||
<span className="name">Mark Ferrell</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1494_170x170.png" alt="Chris Avatar" />
|
||||
<span className="name">Chris Garrity</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/10866958_170x170.png" alt="Colby Avatar" />
|
||||
<span className="name">Colby Gutierrez-Kraybill</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/21986973_170x170.png" alt="Paul Avatar" />
|
||||
<span className="name">Paul Kaplan</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/527836_170x170.png" alt="DD Avatar" />
|
||||
<span className="name">DD Liu</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3714374_170x170.png" alt="Shruti Avatar" />
|
||||
<span className="name">Shruti Mohnot</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/246290_170x170.png" alt="Sarah Avatar" />
|
||||
<span className="name">Sarah Otts</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2286560_170x170.png" alt="Carmelo Avatar" />
|
||||
<span className="name">Carmelo Presicce</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/167_170x170.png" alt="Mitchel Avatar" />
|
||||
<span className="name">Mitchel Resnick</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/159_170x170.png" alt="ericr Avatar" />
|
||||
<span className="name">Eric Rosenbaum</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/169_170x170.png" alt="Natalie Avatar" />
|
||||
<span className="name">Natalie Rusk</span>
|
||||
|
@ -101,27 +101,27 @@ var Credits = React.createClass({
|
|||
<img src="//cdn.scratch.mit.edu/get_image/user/1709047_170x170.png" alt="Andrew Avatar" />
|
||||
<span className="name">Andrew Sliwinski</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/18417774_170x170.png" alt="Tracy Avatar" />
|
||||
<span className="name">Tracy Tang</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/4373707_170x170.png" alt="Matthew Avatar" />
|
||||
<span className="name">Matthew Taylor</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2678986_170x170.png" alt="Moran Avatar" />
|
||||
<span className="name">Moran Tsur</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/3532363_170x170.png" alt="Chris Avatar" />
|
||||
<span className="name">Chris Willis-Ford</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/2796185_170x170.png" alt="Julia Avatar" />
|
||||
<span className="name">Julia Zimmerman</span>
|
||||
|
@ -135,47 +135,47 @@ var Credits = React.createClass({
|
|||
<img src="//cdn.scratch.mit.edu/get_image/user/2496866_170x170.png" alt="Jolie Avatar" />
|
||||
<span className="name">Jolie Castellucci</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/24164779_170x170.png" alt="Ellen Avatar" />
|
||||
<span className="name">Ellen Daoust</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/1048810_170x170.png" alt="Linda Avatar" />
|
||||
<span className="name">Linda Fernsel</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/49156_170x170.png" alt="Mark Avatar" />
|
||||
<span className="name">Mark Goff</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/36977_170x170.png" alt="Connor Avatar" />
|
||||
<span className="name">Connor Hudson</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/14110644_170x170.png" alt="Lily Avatar" />
|
||||
<span className="name">Lily Kim</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/13639421_170x170.png" alt="Tauntaun Avatar" />
|
||||
<span className="name">Tauntaun Kim</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/373646_170x170.png" alt="Dalton Avatar" />
|
||||
<span className="name">Dalton Miner</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/17618638_170x170.png" alt="Hanako Avatar" />
|
||||
<span className="name">Hanako Tjia</span>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<img src="//cdn.scratch.mit.edu/get_image/user/159139_170x170.png" alt="Franchette Avatar" />
|
||||
<span className="name">Franchette Viloria</span>
|
||||
|
@ -188,7 +188,39 @@ var Credits = React.createClass({
|
|||
</ul>
|
||||
|
||||
<h2><FormattedMessage id='credits.previousTitle' /></h2>
|
||||
<p><FormattedMessage id='credits.previousBody' /></p>
|
||||
<p><FormattedMessage id='credits.previousBody' />
|
||||
|
||||
Ben Berg,
|
||||
Amos Blanton,
|
||||
Karen Brennan,
|
||||
Juanita Buitrago,
|
||||
Leo Burd,
|
||||
Gaia Carini,
|
||||
Kasia Chmielinski,
|
||||
Michelle Chung,
|
||||
Shane Clements,
|
||||
Hannah Cole,
|
||||
Sayamindu Dasgupta,
|
||||
Margarita Dekoli,
|
||||
Evelyn Eastmond,
|
||||
Dave Feinberg,
|
||||
Chris Graves,
|
||||
Megan Haddadi,
|
||||
Christina Huang,
|
||||
Tony Hwang,
|
||||
Abdulrahman Idlbi,
|
||||
Randy Jou,
|
||||
Saskia Leggett,
|
||||
Tim Mickel,
|
||||
Amon Millner,
|
||||
Ricarose Roque,
|
||||
Andrea Saxman,
|
||||
Jay Silver,
|
||||
Tammy Stern,
|
||||
Lis Sylvan,
|
||||
Claudia Urrea,
|
||||
Oren Zuckerman
|
||||
</p>
|
||||
|
||||
<h2><FormattedMessage id='credits.partnersTitle' /></h2>
|
||||
<p><FormattedMessage id='credits.partnersBody' /></p>
|
||||
|
@ -197,7 +229,23 @@ var Credits = React.createClass({
|
|||
<p><FormattedHTMLMessage id='credits.researchersBody' /></p>
|
||||
|
||||
<h2><FormattedMessage id='credits.acknowledgementsTitle' /></h2>
|
||||
<p><FormattedHTMLMessage id='credits.acknowledgementsContributors' /></p>
|
||||
<p>
|
||||
<FormattedHTMLMessage id='credits.acknowledgementsContributors' />
|
||||
|
||||
Susan Abend, Robbie Berg, Lauren Bessen, Keith Braadfladt, Susan Carillo,
|
||||
Will Denton, Nathan Dinsmore, Catherine Feldman, Jodi Finch, Ioana Fineberg,
|
||||
JT Galla, Rachel Garber, Chris Garrity, Cassy Gibbs, Brian Harvey,
|
||||
Roland Hebert, Tracy Ho, Benjamin Howe, Kapaya Katongo, Evan Karatzas,
|
||||
Christine Kim, Joren Lauwers, Mike Lee, Jeff Lieberman, Mark Loughridge,
|
||||
Kelly Liu, Anthony Lu, Danny Lutz, David Malan, Wayne Marshall,
|
||||
John McIntosh, Paul Medlock-Walton, Dongfang (Tian) Mi, Ximena Miranda,
|
||||
Jens Moenig, Evan Moore, Geetha Narayanan, Kate Nazemi, Liddy Nevile,
|
||||
Wing Ngan, Derek O'Connell, Tim Radvan, Karen Randall, Ian Reynolds,
|
||||
Miriam Ruiz, Chinua Shaw, Ed Shems, Cynthia Solomon, Daniel Strimpel,
|
||||
Kilmer Sweazy, John Henry Thompson, Ubong Ukoh, Vladimir Vuksan, Han Xu.
|
||||
|
||||
<FormattedHTMLMessage id='credits.acknowledgementsTranslators' />
|
||||
</p>
|
||||
<p><FormattedMessage id='credits.acknowledgementsCommunity' /></p>
|
||||
<p><FormattedMessage id='credits.acknowledgementsInfluencers' /></p>
|
||||
<h2><FormattedMessage id='credits.supportersTitle' /></h2>
|
||||
|
@ -212,7 +260,7 @@ var Credits = React.createClass({
|
|||
<a href="http://www.fundacaolemann.org.br/lemann-foundation/"> Lemann Foundation</a>,
|
||||
<a href="https://www.macfound.org/"> MacArthur Foundation</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<p><FormattedMessage id='credits.supportersServicesHeader' /></p>
|
||||
<p>
|
||||
<a href="http://www.advancedinstaller.com/"> Advanced Installer</a>,
|
||||
|
@ -233,9 +281,9 @@ var Credits = React.createClass({
|
|||
<a href="https://getsentry.com/welcome/"> Sentry</a>,
|
||||
<a href="http://www.git-tower.com/"> Tower</a>,
|
||||
<a href="https://www.transifex.com/"> Transifex</a>,
|
||||
and <a href="https://travis-ci.org/"> Travis-CI</a>.
|
||||
<a href="https://travis-ci.org/"> Travis-CI</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<p><FormattedMessage id='credits.supportersOpenHeader' /></p>
|
||||
<p>
|
||||
<a href="https://www.djangoproject.com/"> Django</a>,
|
||||
|
@ -258,7 +306,7 @@ var Credits = React.createClass({
|
|||
<a href="http://saltstack.com/"> SaltStack</a>,
|
||||
<a href="https://github.com/etsy/statsd/"> StatsD</a>,
|
||||
<a href="http://www.ubuntu.com/"> Ubuntu</a>,
|
||||
and <a href="https://www.varnish-cache.org/"> Varnish</a>.
|
||||
<a href="https://www.varnish-cache.org/"> Varnish</a>.
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
line-height: 1.5rem;
|
||||
|
||||
a {
|
||||
white-space: normal;
|
||||
word-wrap: break-word; /* Overrides: https://github.com/LLK/scratch-www/blob/develop/src/main.scss#L43-L47 */
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,14 @@
|
|||
"credits.developers": "Scratch is designed and developed by the Lifelong Kindergarten Group at MIT Media Lab:",
|
||||
"credits.moderators": "The team of Scratch moderators manages, supports, and improves the Scratch online community:",
|
||||
"credits.previousTitle": "Previous MIT Scratch Team Members",
|
||||
"credits.previousBody": "Many important contributions have been made by previous Scratch Team members, including John Maloney (who led software development for the first decade of Scratch), Andrés Monroy-Hernández (who led the development of the first Scratch community website), Ben Berg, Amos Blanton, Karen Brennan, Juanita Buitrago, Leo Burd, Gaia Carini, Kasia Chmielinski, Michelle Chung, Shane Clements, Hannah Cole, Sayamindu Dasgupta, Margarita Dekoli, Evelyn Eastmond, Dave Feinberg, Chris Graves, Megan Haddadi, Christina Huang, Tony Hwang, Abdulrahman Idlbi, Randy Jou, Saskia Leggett, Tim Mickel, Amon Millner, Ricarose Roque, Andrea Saxman, Jay Silver, Tammy Stern, Lis Sylvan, Claudia Urrea, and Oren Zuckerman",
|
||||
"credits.previousBody": "Many important contributions have been made by previous Scratch Team members, including John Maloney (who led software development for the first decade of Scratch) and Andrés Monroy-Hernández (who led the development of the first Scratch community website). Other contributors include:",
|
||||
"credits.partnersTitle": "Design and Development Partners",
|
||||
"credits.partnersBody": "Paula Bontá and Brian Silverman, Playful Invention Company (who started contributing to the design of Scratch even before it was called Scratch).",
|
||||
"credits.researchersTitle": "Scratch Researchers",
|
||||
"credits.researchersBody": "<a href=\"https://scratch.mit.edu/info/research/\">Research on Scratch</a> is being conducted by members of the MIT Scratch Team and researchers at other universities, including Yasmin Kafai (who collaborated on the <a href=\"http://www.nsf.gov/awardsearch/showAward?AWD_ID=0325828\">initial NSF Scratch grant</a>) at the University of Pennsylvania Graduate School of Education, Karen Brennan (who leads the <a href=\"http://scratched.gse.harvard.edu/\">ScratchEd project</a>) at the Harvard Graduate School of Education, Benjamin Mako Hill at the University of Washington, Andrés Monroy Hernández at Microsoft Research, Mimi Ito and Crystle Martin at the University of California, Irvine, Quinn Burke at College of Charleston, Deborah Fields at Utah State University, and Kylie Peppler at Indiana University.",
|
||||
"credits.acknowledgementsTitle": "Acknowledgements",
|
||||
"credits.acknowledgementsContributors": "The following people have also contributed to the development and support of Scratch over the years: Susan Abend, Robbie Berg, Lauren Bessen, Keith Braadfladt, Susan Carillo, Will Denton, Nathan Dinsmore, Catherine Feldman, Jodi Finch, Ioana Fineberg, JT Galla, Rachel Garber, Chris Garrity, Cassy Gibbs, Brian Harvey, Roland Hebert, Tracy Ho, Benjamin Howe, Kapaya Katongo, Evan Karatzas, Christine Kim, Joren Lauwers, Mike Lee, Jeff Lieberman, Mark Loughridge, Kelly Liu, Anthony Lu, Danny Lutz, David Malan, Wayne Marshall, John McIntosh, Paul Medlock-Walton, Dongfang (Tian) Mi, Ximena Miranda, Jens Moenig, Evan Moore, Geetha Narayanan, Kate Nazemi, Liddy Nevile, Wing Ngan, Derek O'Connell, Tim Radvan, Karen Randall, Ian Reynolds, Miriam Ruiz, Chinua Shaw, Ed Shems, Cynthia Solomon, Daniel Strimpel, Kilmer Sweazy, John Henry Thompson, Ubong Ukoh, Vladimir Vuksan, Han Xu, and the many volunteer <a href=\"http://wiki.scratch.mit.edu/wiki/Translators\">Scratch Translators</a> from around the world.",
|
||||
"credits.acknowledgementsContributors": "The following people have also contributed to the development and support of Scratch over the years:",
|
||||
"credits.acknowledgementsTranslators": "With the help of <a href=\"http://wiki.scratch.mit.edu/wiki/Translators\">Scratch Translators</a> around the world, Scratch is available in many languages.",
|
||||
"credits.acknowledgementsCommunity": "We greatly appreciate all of the contributions by members of the worldwide Scratch community, who have shaped the direction of Scratch by sharing their projects, comments, and ideas.",
|
||||
"credits.acknowledgementsInfluencers": "The ideas of Seymour Papert and Alan Kay have deeply inspired and influenced our work on Scratch.",
|
||||
"credits.supportersTitle": "Supporting Organizations",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"developers.scratchBlocksIntro": "Scratch Blocks is a new development project for the next generation of graphical programming blocks, based on a collaboration between Google and MIT’s Scratch Team — building on Google’s <a href=\"https://developers.google.com/blockly/\">Blockly technology</a> and informed by the Scratch Team’s expertise in developing creative learning tools for young people. Scratch Blocks will provide a framework for building programming blocks in both vertical (text-based) and horizontal (icon-based) formats. You can access the code (currently as a developer-preview) and documentation <a href=\"https://github.com/llk/scratch-blocks\">here</a>.",
|
||||
"developers.scratchBlocksBody": "This first release includes code for Scratch’s Horizontal Grammar. Looking ahead, we plan to release additional code including but not limited to the Vertical Grammar (currently used by Scratch), a new Rendering Engine to support sprites and graphic effects, and a new Audio Engine to support creation with sound and music.",
|
||||
"developers.wwwTitle": "Scratch WWW",
|
||||
"developers.wwwIntro": "Scratch-www is a standalone web client for the Scratch Community, built using React and Redux. Access the code and documentation <a href=\"https://github.com/LLK/scratch-www\">here</a>.",
|
||||
"developers.wwwIntro": "Scratch-www is a standalone web client for the Scratch Community, built using React and Redux. Access the code and documentation through Github <a href=\"https://github.com/LLK/scratch-www\">here</a>.",
|
||||
"developers.principlesIntro": "We created Scratch to empower young people to think creatively, reason systematically, and work collaboratively. We are guided by a set of <b>Learning Principles</b> and <b>Design Principles</b> that we hope you will follow as you develop new tools and technologies with Scratch Blocks.",
|
||||
"developers.learningPrinciplesTitle": "Learning Principles",
|
||||
"developers.learningPrinciplesProjectsBody": "People learn best when they are actively working on projects — generating new ideas, designing prototypes, making improvements and creating final products.",
|
||||
|
|
|
@ -116,11 +116,25 @@ var Messages = React.createClass({
|
|||
)
|
||||
);
|
||||
},
|
||||
filterMessages: function (messages, typesAllowed) {
|
||||
filterMessages: function (messages, typesAllowed, unreadCount) {
|
||||
var filteredMessages = [];
|
||||
for (var i in messages) {
|
||||
if (typesAllowed.indexOf(messages[i].type) > -1) {
|
||||
filteredMessages.push(messages[i]);
|
||||
if (typesAllowed.length > 0) {
|
||||
for (var i in messages) {
|
||||
// check to see if the position of the message in the list is earlier
|
||||
// than the unread count. If it is, then the message is totally unread.
|
||||
messages[i].unread = false;
|
||||
if (i < unreadCount) messages[i].unread = true;
|
||||
|
||||
if (typesAllowed.indexOf(messages[i].type) > -1) {
|
||||
filteredMessages.push(messages[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
filteredMessages = messages;
|
||||
for (var j = 0; j < unreadCount; j++) {
|
||||
if (typeof filteredMessages[j] !== 'undefined') {
|
||||
filteredMessages[j].unread = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return filteredMessages;
|
||||
|
@ -131,10 +145,19 @@ var Messages = React.createClass({
|
|||
loadMore = false;
|
||||
}
|
||||
|
||||
var messages = this.props.messages;
|
||||
if (this.state.filterValues.length > 0) {
|
||||
messages = this.filterMessages(messages, this.state.filterValues);
|
||||
var adminMessagesLength = this.props.adminMessages.length;
|
||||
if (Object.keys(this.props.invite).length > 0) {
|
||||
adminMessagesLength = adminMessagesLength + 1;
|
||||
}
|
||||
var numNewSocialMessages = this.props.numNewMessages - adminMessagesLength;
|
||||
if (numNewSocialMessages < 0) {
|
||||
numNewSocialMessages = 0;
|
||||
}
|
||||
var messages = this.filterMessages(
|
||||
this.props.messages,
|
||||
this.state.filterValues,
|
||||
numNewSocialMessages
|
||||
);
|
||||
|
||||
return(
|
||||
<MessagesPresentation
|
||||
|
@ -143,7 +166,8 @@ var Messages = React.createClass({
|
|||
messages={messages}
|
||||
adminMessages={this.props.adminMessages}
|
||||
scratcherInvite={this.props.invite}
|
||||
numNewMessages={this.props.numNewMessages}
|
||||
numNewMessages={numNewSocialMessages}
|
||||
adminMessagesLength={adminMessagesLength}
|
||||
handleFilterClick={this.handleFilterClick}
|
||||
handleAdminDismiss={this.handleMessageDismiss}
|
||||
loadMore={loadMore}
|
||||
|
|
|
@ -16,7 +16,7 @@ var ForumPostMessage = React.createClass({
|
|||
var topicLink = '/discuss/topic/' + this.props.topicId + '/unread/';
|
||||
|
||||
var classes = classNames(
|
||||
'mod-studio-activity',
|
||||
'mod-forum-activity',
|
||||
this.props.className
|
||||
);
|
||||
return (
|
||||
|
|
|
@ -12,7 +12,7 @@ var StudioActivityMessage = React.createClass({
|
|||
datetimeCreated: React.PropTypes.string.isRequired
|
||||
},
|
||||
render: function () {
|
||||
var studioLink = '/studios/' + this.props.studioId;
|
||||
var studioLink = '/studios/' + this.props.studioId + '/activity';
|
||||
|
||||
var classes = classNames(
|
||||
'mod-studio-activity',
|
||||
|
|
|
@ -42,8 +42,8 @@ var SocialMessagesList = React.createClass({
|
|||
numNewMessages: 0
|
||||
};
|
||||
},
|
||||
getComponentForMessage: function (message, unread) {
|
||||
var className = (unread) ? 'mod-unread' : '';
|
||||
getComponentForMessage: function (message) {
|
||||
var className = (message.unread === true) ? 'mod-unread' : '';
|
||||
var key = message.type + '_' + message.id;
|
||||
|
||||
switch (message.type) {
|
||||
|
@ -140,14 +140,10 @@ var SocialMessagesList = React.createClass({
|
|||
/>;
|
||||
}
|
||||
},
|
||||
renderSocialMessages: function (messages, unreadCount) {
|
||||
renderSocialMessages: function (messages) {
|
||||
var messageList = [];
|
||||
for (var i in messages) {
|
||||
if (i <= unreadCount) {
|
||||
messageList.push(this.getComponentForMessage(messages[i], true));
|
||||
} else {
|
||||
messageList.push(this.getComponentForMessage(messages[i], false));
|
||||
}
|
||||
messageList.push(this.getComponentForMessage(messages[i]));
|
||||
}
|
||||
return messageList;
|
||||
},
|
||||
|
@ -195,7 +191,7 @@ var SocialMessagesList = React.createClass({
|
|||
</h4>
|
||||
</div>,
|
||||
<ul className="messages-social-list" key="messages-social-list">
|
||||
{this.renderSocialMessages(this.props.messages, (this.props.numNewMessages - 1))}
|
||||
{this.renderSocialMessages(this.props.messages)}
|
||||
</ul>,
|
||||
this.renderLoadMore(this.props.loadMore)
|
||||
] : []}
|
||||
|
@ -213,6 +209,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
|||
adminMessages: React.PropTypes.array.isRequired,
|
||||
scratcherInvite: React.PropTypes.object.isRequired,
|
||||
numNewMessages: React.PropTypes.number,
|
||||
adminMessagesLength: React.PropTypes.number,
|
||||
handleFilterClick: React.PropTypes.func.isRequired,
|
||||
handleAdminDismiss: React.PropTypes.func.isRequired,
|
||||
loadMore: React.PropTypes.bool.isRequired,
|
||||
|
@ -222,19 +219,11 @@ var MessagesPresentation = injectIntl(React.createClass({
|
|||
getDefaultProps: function () {
|
||||
return {
|
||||
numNewMessages: 0,
|
||||
adminMessagesLength: 0,
|
||||
filterOpen: false
|
||||
};
|
||||
},
|
||||
render: function () {
|
||||
var adminMessageLength = this.props.adminMessages.length;
|
||||
if (Object.keys(this.props.scratcherInvite).length > 0) {
|
||||
adminMessageLength = adminMessageLength + 1;
|
||||
}
|
||||
var numNewSocialMessages = this.props.numNewMessages - adminMessageLength;
|
||||
if (numNewSocialMessages < 0) {
|
||||
numNewSocialMessages = 0;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="messages">
|
||||
<TitleBanner className="mod-messages">
|
||||
|
@ -282,7 +271,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
|||
<h4 className="messages-header">
|
||||
<FormattedMessage id='messages.scratchTeamTitle' />
|
||||
<div className="messages-header-unread">
|
||||
<FormattedNumber value={adminMessageLength} />
|
||||
<FormattedNumber value={this.props.adminMessagesLength} />
|
||||
</div>
|
||||
</h4>
|
||||
</div>
|
||||
|
@ -322,7 +311,7 @@ var MessagesPresentation = injectIntl(React.createClass({
|
|||
<SocialMessagesList
|
||||
loadStatus={this.props.requestStatus.messages}
|
||||
messages={this.props.messages}
|
||||
numNewMessages={numNewSocialMessages}
|
||||
numNewMessages={this.props.numNewMessages}
|
||||
loadMore={this.props.loadMore}
|
||||
loadMoreMethod={this.props.loadMoreMethod}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue