Display error message when using an invalid invitation link

pull/1/head
yflory 5 years ago
parent de5feeda13
commit 0dc4a1d890

@ -1167,8 +1167,7 @@ define([
// Get preview content. // Get preview content.
var sframeChan = common.getSframeChannel(); var sframeChan = common.getSframeChannel();
sframeChan.query('Q_ANON_GET_PREVIEW_CONTENT', { seeds: seeds }, waitFor(function (err, json) { sframeChan.query('Q_ANON_GET_PREVIEW_CONTENT', { seeds: seeds }, waitFor(function (err, json) {
if (json && json.error) { if (json && (json.error || !Object.keys(json).length)) {
// err === DELETED: different message?
$(errorBlock).text(Messages.team_inviteInvalidLinkError).show(); $(errorBlock).text(Messages.team_inviteInvalidLinkError).show();
waitFor.abort(); waitFor.abort();
$div.empty(); $div.empty();
@ -1193,7 +1192,7 @@ define([
// If you're not logged in, display the login buttons // If you're not logged in, display the login buttons
var anonLogin, anonRegister; var anonLogin, anonRegister;
$div.append(h('p', Messages.team_invitePleaseLogin || 'Please log in or register to accept this invitation...')); $div.append(h('p', Messages.team_invitePleaseLogin));
$div.append(h('div', [ $div.append(h('div', [
anonLogin = h('button.btn.btn-primary', Messages.login_login), anonLogin = h('button.btn.btn-primary', Messages.login_login),
anonRegister = h('button.btn.btn-secondary', Messages.login_register), anonRegister = h('button.btn.btn-secondary', Messages.login_register),

Loading…
Cancel
Save