Show the first person in the realm an invite banner if they are alone.

Previously we unconditionally showed the "get the desktop app"
banner. Now, if the first user declines to invite people as part of
their onboarding workflow, show the invite banner instead.

(imported from commit f7892fef17c923154a700149b8f5be99e9c03fa0)
This commit is contained in:
Jessica McKellar
2014-01-09 16:53:18 -05:00
parent 2543aea3b8
commit 33bcd1977a
2 changed files with 21 additions and 5 deletions

View File

@@ -265,7 +265,14 @@ function finale() {
callback();
});
deferred_work = [];
var alert_contents = "<i class='icon-vector-desktop alert-icon'></i> Have you heard: the <a href='/apps' target='_blank'>Zulip desktop app</a> is awesome and you should get it!";
var alert_contents;
if (page_params.prompt_for_invites) {
alert_contents = "<i class='icon-vector-heart alert-icon'></i>It's lonely in here! <a href='#invite-user' data-toggle='modal'>Invite some coworkers</a>.";
} else {
alert_contents = "<i class='icon-vector-desktop alert-icon'></i> Have you heard: the <a href='/apps' target='_blank'>Zulip desktop app</a> is awesome and you should get it!";
}
show_app_alert(alert_contents);
}