mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -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/",
|
"/login_retry/",
|
||||||
"/media/",
|
"/media/",
|
||||||
"/session/",
|
"/session/",
|
||||||
|
"/site-api",
|
||||||
"/static/"
|
"/static/"
|
||||||
]
|
]
|
||||||
|
|
|
@ -88,8 +88,16 @@ var Splash = injectIntl(React.createClass({
|
||||||
if (!err) this.setState({projectCount: body.count});
|
if (!err) this.setState({projectCount: body.count});
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
handleDismiss: function (flag) {
|
handleDismiss: function (cue) {
|
||||||
// TODO: Call flag setting xhr
|
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 () {
|
renderHomepageRows: function () {
|
||||||
var formatMessage = this.props.intl.formatMessage;
|
var formatMessage = this.props.intl.formatMessage;
|
||||||
|
|
Loading…
Reference in a new issue