mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge branch 'develop' of github.com:llk/scratch-www into bugfix/199
This commit is contained in:
commit
f247761390
7 changed files with 25 additions and 8 deletions
|
@ -15,7 +15,8 @@ env:
|
|||
- EB_APP=scratch-www
|
||||
- EB_AWS_BUCKET_NAME=elasticbeanstalk-us-east-1-307680192167
|
||||
- SKIP_CLEANUP=true
|
||||
- BUILD_ARCHIVE=$TRAVIS_BUILD_ID.zip
|
||||
- ELASTIC_BEANSTALK_LABEL=${TRAVIS_COMMIT:0:5}
|
||||
- BUILD_ARCHIVE=$ELASTIC_BEANSTALK_LABEL.zip
|
||||
before_deploy:
|
||||
- zip -qr $BUILD_ARCHIVE .
|
||||
deploy:
|
||||
|
|
4
en.json
4
en.json
|
@ -14,6 +14,7 @@
|
|||
"general.forParents": "For Parents",
|
||||
"general.forEducators": "For Educators",
|
||||
"general.guidelines": "Community Guidelines",
|
||||
"general.help": "Help",
|
||||
"general.jobs": "Jobs",
|
||||
"general.joinScratch": "Join Scratch",
|
||||
"general.legal": "Legal",
|
||||
|
@ -27,11 +28,13 @@
|
|||
"general.scratchEd": "ScratchEd",
|
||||
"general.scratchFoundation": "Scratch Foundation",
|
||||
"general.scratchJr": "ScratchJr",
|
||||
"general.search": "Search",
|
||||
"general.signIn": "Sign in",
|
||||
"general.statistics": "Statistics",
|
||||
"general.support": "Support",
|
||||
"general.termsOfUse": "Terms of Use",
|
||||
"general.username": "Username",
|
||||
"general.viewAll": "View All",
|
||||
"general.whatsHappening": "What's Happening?",
|
||||
"general.wiki": "Scratch Wiki",
|
||||
"footer.about": "About Scratch",
|
||||
|
@ -47,6 +50,7 @@
|
|||
"intro.tryItOut": "TRY IT OUT",
|
||||
"login.forgotPassword": "Forgot Password?",
|
||||
"navigation.signOut": "Sign out",
|
||||
"news.scratchNews": "Scratch News",
|
||||
"parents.FaqAgeRangeA": "While Scratch is primarily designed for 8 to 16 year olds, it is also used by people of all ages, including younger children with their parents.",
|
||||
"parents.FaqAgeRangeQ": "What is the age range for Scratch?",
|
||||
"parents.FaqResourcesQ": "What resources are available for learning Scratch?",
|
||||
|
|
|
@ -10,8 +10,8 @@ module.exports = {
|
|||
'and animations.',
|
||||
|
||||
// Open graph
|
||||
og_image: 'https://scratch.mit.edu/images/og_image.jpg',
|
||||
og_image_type: 'image/jpeg',
|
||||
og_image: 'https://scratch.mit.edu/images/scratch-og.png',
|
||||
og_image_type: 'image/png',
|
||||
og_image_width: 986,
|
||||
og_image_height: 860,
|
||||
|
||||
|
|
|
@ -28,6 +28,10 @@ var defaultMessages = defineMessages({
|
|||
myStuff: {
|
||||
id: 'general.myStuff',
|
||||
defaultMessage: 'My Stuff'
|
||||
},
|
||||
search: {
|
||||
id: 'general.search',
|
||||
defaultMessage: 'Search'
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -68,7 +72,10 @@ var Navigation = React.createClass({
|
|||
} else {
|
||||
// clear message count check, and set to default id.
|
||||
clearInterval(this.state.messageCountIntervalId);
|
||||
this.setState({'messageCountIntervalId': -1});
|
||||
this.setState({
|
||||
'unreadMessageCount': 0,
|
||||
'messageCountIntervalId': -1
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -76,7 +83,10 @@ var Navigation = React.createClass({
|
|||
// clear message interval if it exists
|
||||
if (this.state.messageCountIntervalId != -1) {
|
||||
clearInterval(this.state.messageCountIntervalId);
|
||||
this.setState({'messageCountIntervalId': -1});
|
||||
this.setState({
|
||||
'unreadMessageCount': 0,
|
||||
'messageCountIntervalId': -1
|
||||
});
|
||||
}
|
||||
},
|
||||
getProfileUrl: function () {
|
||||
|
@ -88,9 +98,10 @@ var Navigation = React.createClass({
|
|||
method: 'get',
|
||||
uri: '/proxy/users/' + this.state.session.user.username + '/activity/count'
|
||||
}, function (err, body) {
|
||||
if (err) return this.setState({'unreadMessageCount': 0});
|
||||
if (body) {
|
||||
var count = parseInt(body.msg_count, this.state.unreadMessageCount);
|
||||
this.setState({'unreadMessageCount': count});
|
||||
return this.setState({'unreadMessageCount': count});
|
||||
}
|
||||
}.bind(this));
|
||||
},
|
||||
|
@ -222,7 +233,7 @@ var Navigation = React.createClass({
|
|||
<li className="search">
|
||||
<form action="/search/google_results" method="get">
|
||||
<Input type="submit" value="" />
|
||||
<Input type="text" placeholder="Search" name="q" />
|
||||
<Input type="text" placeholder={formatMessage(defaultMessages.search)} name="q" />
|
||||
<Input type="hidden" name="date" value="anytime" />
|
||||
<Input type="hidden" name="sort_by" value="datetime_shared" />
|
||||
</form>
|
||||
|
|
|
@ -118,6 +118,7 @@ var Splash = injectIntl(React.createClass({
|
|||
},
|
||||
refreshHomepageCache: function () {
|
||||
this.api({
|
||||
host: '',
|
||||
uri: '/scratch_admin/homepage/clear-cache/',
|
||||
method: 'post',
|
||||
useCsrf: true
|
||||
|
@ -375,7 +376,7 @@ var Splash = injectIntl(React.createClass({
|
|||
<span>Refresh row data:</span>
|
||||
<Button onClick={this.refreshHomepageCache}
|
||||
className={homepageCacheState.status}
|
||||
diabled={homepageCacheState.disabled}>
|
||||
disabled={homepageCacheState.disabled}>
|
||||
<span>{homepageCacheState.content}</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 212 KiB |
BIN
static/images/scratch-og.png
Normal file
BIN
static/images/scratch-og.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in a new issue