mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Set template cue to dismiss welcome panel
This commit is contained in:
parent
58d3ed4ecb
commit
af415e1bf3
2 changed files with 11 additions and 2 deletions
|
@ -7,5 +7,6 @@
|
|||
"/login_retry/",
|
||||
"/media/",
|
||||
"/session/",
|
||||
"/site-api",
|
||||
"/static/"
|
||||
]
|
||||
|
|
|
@ -88,8 +88,16 @@ var Splash = injectIntl(React.createClass({
|
|||
if (!err) this.setState({projectCount: body.count});
|
||||
}.bind(this));
|
||||
},
|
||||
handleDismiss: function (flag) {
|
||||
// TODO: Call flag setting xhr
|
||||
handleDismiss: function (cue) {
|
||||
this.api({
|
||||
host: '',
|
||||
uri: '/site-api/users/set-template-cue/',
|
||||
method: 'post',
|
||||
useCsrf: true,
|
||||
json: {cue: cue, value: false}
|
||||
}, function (err) {
|
||||
if (!err) window.refreshSession();
|
||||
});
|
||||
},
|
||||
renderHomepageRows: function () {
|
||||
var formatMessage = this.props.intl.formatMessage;
|
||||
|
|
Loading…
Reference in a new issue