mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Main reasons:
* Shouldn't be hardcoding welcome bot
* compose_actions.cancel() was not closing the compose box, for some
reason. It was working fine before commit a few up from here ("tutorial:
Remove rest of tutorial."), but I think possibly due to the fact that one
had to click a button to exit the tutorial (that could be wrong, it was
hard to pinpoint why it was working before that commit and not after.)
This code should be going away anyway once #5816 is resolved.
33 lines
648 B
JavaScript
33 lines
648 B
JavaScript
var tutorial = (function () {
|
|
|
|
var exports = {};
|
|
|
|
function set_tutorial_status(status, callback) {
|
|
return channel.post({
|
|
url: '/json/tutorial_status',
|
|
data: {status: JSON.stringify(status)},
|
|
success: callback,
|
|
});
|
|
}
|
|
|
|
function finale() {
|
|
set_tutorial_status("finished");
|
|
narrow.by('is', 'private', {select_first_unread: true, trigger: 'sidebar'});
|
|
}
|
|
|
|
exports.start = function () {
|
|
finale();
|
|
};
|
|
|
|
exports.initialize = function () {
|
|
if (page_params.needs_tutorial) {
|
|
exports.start();
|
|
}
|
|
};
|
|
|
|
return exports;
|
|
}());
|
|
if (typeof module !== 'undefined') {
|
|
module.exports = tutorial;
|
|
}
|