remove XXX notes which have been addressed
This commit is contained in:
parent
ea7d254d2f
commit
ceb7fc4f66
@ -1639,30 +1639,30 @@ define([
|
|||||||
// Invite from link
|
// Invite from link
|
||||||
var dismissButton = h('span.fa.fa-times');
|
var dismissButton = h('span.fa.fa-times');
|
||||||
var linkContent = h('div.cp-share-modal', [
|
var linkContent = h('div.cp-share-modal', [
|
||||||
h('p', Messages.team_inviteLinkTitle ), // XXX
|
h('p', Messages.team_inviteLinkTitle ),
|
||||||
linkError = h('div.alert.alert-danger.cp-teams-invite-alert', {style : 'display: none;'}),
|
linkError = h('div.alert.alert-danger.cp-teams-invite-alert', {style : 'display: none;'}),
|
||||||
linkForm = h('div.cp-teams-invite-form', [
|
linkForm = h('div.cp-teams-invite-form', [
|
||||||
linkName = h('input', {
|
linkName = h('input', {
|
||||||
placeholder: Messages.team_inviteLinkTempName // XXX
|
placeholder: Messages.team_inviteLinkTempName
|
||||||
}),
|
}),
|
||||||
h('br'),
|
h('br'),
|
||||||
h('div.cp-teams-invite-block', [
|
h('div.cp-teams-invite-block', [
|
||||||
h('span', Messages.team_inviteLinkSetPassword), // XXX
|
h('span', Messages.team_inviteLinkSetPassword),
|
||||||
h('a.cp-teams-help.fa.fa-question-circle', {
|
h('a.cp-teams-help.fa.fa-question-circle', {
|
||||||
href: origin + '/faq.html#security-pad_password',
|
href: origin + '/faq.html#security-pad_password',
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
'data-tippy-placement': "right"
|
'data-tippy-placement': "right"
|
||||||
})
|
})
|
||||||
]), // XXX
|
]),
|
||||||
linkPassword = UI.passwordInput({
|
linkPassword = UI.passwordInput({
|
||||||
id: 'cp-teams-invite-password',
|
id: 'cp-teams-invite-password',
|
||||||
placeholder: Messages.login_password // XXX
|
placeholder: Messages.login_password
|
||||||
}),
|
}),
|
||||||
h('div.cp-teams-invite-block',
|
h('div.cp-teams-invite-block',
|
||||||
h('span', Messages.team_inviteLinkNote) // XXX
|
h('span', Messages.team_inviteLinkNote)
|
||||||
),
|
),
|
||||||
linkMessage = h('textarea.cp-teams-invite-message', { // XXX ansuz hitting enter submits...
|
linkMessage = h('textarea.cp-teams-invite-message', {
|
||||||
placeholder: Messages.team_inviteLinkNoteMsg, // XXX
|
placeholder: Messages.team_inviteLinkNoteMsg,
|
||||||
rows: 3
|
rows: 3
|
||||||
})
|
})
|
||||||
]),
|
]),
|
||||||
@ -1670,7 +1670,7 @@ define([
|
|||||||
style: 'display: none;'
|
style: 'display: none;'
|
||||||
}, [
|
}, [
|
||||||
h('i.fa.fa-spinner.fa-spin'),
|
h('i.fa.fa-spinner.fa-spin'),
|
||||||
linkSpinText = h('span', Messages.team_inviteLinkLoading) // XXX
|
linkSpinText = h('span', Messages.team_inviteLinkLoading)
|
||||||
]),
|
]),
|
||||||
linkResult = h('div', {
|
linkResult = h('div', {
|
||||||
style: 'display: none;'
|
style: 'display: none;'
|
||||||
@ -1682,7 +1682,7 @@ define([
|
|||||||
}, [
|
}, [
|
||||||
h('span.cp-inline-alert-text', Messages.team_inviteLinkWarning),
|
h('span.cp-inline-alert-text', Messages.team_inviteLinkWarning),
|
||||||
dismissButton
|
dismissButton
|
||||||
]) // XXX
|
])
|
||||||
]);
|
]);
|
||||||
$(linkMessage).keydown(function (e) {
|
$(linkMessage).keydown(function (e) {
|
||||||
if (e.which === 13) {
|
if (e.which === 13) {
|
||||||
@ -1711,7 +1711,7 @@ define([
|
|||||||
var hashData = Hash.parseTypeHash('invite', hash);
|
var hashData = Hash.parseTypeHash('invite', hash);
|
||||||
href = origin + '/teams/#' + hash;
|
href = origin + '/teams/#' + hash;
|
||||||
if (!name || !name.trim()) {
|
if (!name || !name.trim()) {
|
||||||
$(linkError).text(Messages.team_inviteLinkErrorName).show(); // XXX
|
$(linkError).text(Messages.team_inviteLinkErrorName).show();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1763,14 +1763,14 @@ define([
|
|||||||
keys: [27]
|
keys: [27]
|
||||||
}, {
|
}, {
|
||||||
className: 'primary cp-teams-invite-create',
|
className: 'primary cp-teams-invite-create',
|
||||||
name: Messages.team_inviteLinkCreate, // XXX
|
name: Messages.team_inviteLinkCreate,
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
return process();
|
return process();
|
||||||
},
|
},
|
||||||
keys: []
|
keys: []
|
||||||
}, {
|
}, {
|
||||||
className: 'primary cp-teams-invite-copy',
|
className: 'primary cp-teams-invite-copy',
|
||||||
name: Messages.team_inviteLinkCopy, // XXX
|
name: Messages.team_inviteLinkCopy,
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
if (!href) { return; }
|
if (!href) { return; }
|
||||||
var success = Clipboard.copy(href);
|
var success = Clipboard.copy(href);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
(function () {
|
(function () {
|
||||||
var factory = function (Hash, Util, Crypt, Nacl, Scrypt/*, Cred, nThen */) {
|
var factory = function (Util, Nacl, Scrypt) {
|
||||||
var Invite = {};
|
var Invite = {};
|
||||||
|
|
||||||
Invite.deriveSeeds = function (safeSeed) {
|
Invite.deriveSeeds = function (safeSeed) {
|
||||||
@ -38,21 +38,17 @@ var factory = function (Hash, Util, Crypt, Nacl, Scrypt/*, Cred, nThen */) {
|
|||||||
};
|
};
|
||||||
if (typeof(module) !== 'undefined' && module.exports) {
|
if (typeof(module) !== 'undefined' && module.exports) {
|
||||||
module.exports = factory(
|
module.exports = factory(
|
||||||
require("../common-hash"),
|
|
||||||
require("../common-util"),
|
require("../common-util"),
|
||||||
require("../cryptget"), // XXX npm cryptget?
|
|
||||||
require("tweetnacl/nacl-fast"),
|
require("tweetnacl/nacl-fast"),
|
||||||
require("scrypt-async")
|
require("scrypt-async")
|
||||||
);
|
);
|
||||||
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
|
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
|
||||||
define([
|
define([
|
||||||
'/common/common-hash.js',
|
|
||||||
'/common/common-util.js',
|
'/common/common-util.js',
|
||||||
'/common/cryptget.js',
|
|
||||||
'/bower_components/tweetnacl/nacl-fast.min.js',
|
'/bower_components/tweetnacl/nacl-fast.min.js',
|
||||||
'/bower_components/scrypt-async/scrypt-async.min.js',
|
'/bower_components/scrypt-async/scrypt-async.min.js',
|
||||||
], function (Hash, Util, Crypt /*, Nacl, Scrypt */) {
|
], function (Util) {
|
||||||
return factory(Hash, Util, Crypt, window.nacl, window.scrypt);
|
return factory(Util, window.nacl, window.scrypt);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|||||||
@ -1076,7 +1076,7 @@ define([
|
|||||||
var $div = $(div);
|
var $div = $(div);
|
||||||
var errorBlock;
|
var errorBlock;
|
||||||
var c = [
|
var c = [
|
||||||
h('h2', Messages.team_inviteTitle || 'Team invitation'), // XXX
|
h('h2', Messages.team_inviteTitle),
|
||||||
errorBlock = h('div.alert.alert-danger',
|
errorBlock = h('div.alert.alert-danger',
|
||||||
wrongPassword ? undefined : {style: 'display: none;'},
|
wrongPassword ? undefined : {style: 'display: none;'},
|
||||||
wrongPassword ? Messages.drive_sfPasswordError : undefined),
|
wrongPassword ? Messages.drive_sfPasswordError : undefined),
|
||||||
@ -1089,7 +1089,7 @@ define([
|
|||||||
var declineButton = h('button.btn.btn-danger', {
|
var declineButton = h('button.btn.btn-danger', {
|
||||||
style: 'display: none;'
|
style: 'display: none;'
|
||||||
}, Messages.friendRequest_decline);
|
}, Messages.friendRequest_decline);
|
||||||
var acceptButton = h('button.btn.btn-primary', Messages.team_inviteJoin || 'JOIN TEAM'); // XXX
|
var acceptButton = h('button.btn.btn-primary', Messages.team_inviteJoin);
|
||||||
var inviteDiv = h('div', [
|
var inviteDiv = h('div', [
|
||||||
h('nav', [
|
h('nav', [
|
||||||
declineButton,
|
declineButton,
|
||||||
@ -1112,7 +1112,7 @@ define([
|
|||||||
nThen(function (waitFor) {
|
nThen(function (waitFor) {
|
||||||
$inviteDiv.append(h('div', [
|
$inviteDiv.append(h('div', [
|
||||||
h('i.fa.fa-spin.fa-spinner'),
|
h('i.fa.fa-spin.fa-spinner'),
|
||||||
spinnerText = h('span', Messages.team_invitePasswordLoading || 'Scrypt...') // XXX
|
spinnerText = h('span', Messages.team_invitePasswordLoading || 'Scrypt...')
|
||||||
]));
|
]));
|
||||||
$spinner = $(spinnerText);
|
$spinner = $(spinnerText);
|
||||||
setTimeout(waitFor(), 150);
|
setTimeout(waitFor(), 150);
|
||||||
@ -1122,7 +1122,7 @@ define([
|
|||||||
bytes64 = bytes;
|
bytes64 = bytes;
|
||||||
}));
|
}));
|
||||||
}).nThen(function (waitFor) {
|
}).nThen(function (waitFor) {
|
||||||
$spinner.text(Messages.team_inviteGetData || 'get team data'); // XXX
|
$spinner.text(Messages.team_inviteGetData);
|
||||||
APP.module.execCommand('ACCEPT_LINK_INVITATION', {
|
APP.module.execCommand('ACCEPT_LINK_INVITATION', {
|
||||||
bytes64: bytes64,
|
bytes64: bytes64,
|
||||||
hash: hash,
|
hash: hash,
|
||||||
@ -1172,23 +1172,21 @@ define([
|
|||||||
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) {
|
||||||
// XXX APP.module is not ready yet?
|
|
||||||
// err === DELETED: different message?
|
// err === DELETED: different message?
|
||||||
$(errorBlock).text(Messages.error + json.error).show(); // XXX
|
$(errorBlock).text(Messages.error + json.error).show(); // XXX
|
||||||
waitFor.abort();
|
waitFor.abort();
|
||||||
$div.empty();
|
$div.empty();
|
||||||
return;
|
return;
|
||||||
// XXX handle errors
|
|
||||||
}
|
}
|
||||||
$div.empty();
|
$div.empty();
|
||||||
$div.append(h('div.cp-teams-invite-from', [
|
$div.append(h('div.cp-teams-invite-from', [
|
||||||
Messages.team_inviteFrom || 'From:', // XXX
|
Messages.team_inviteFrom || 'From:',
|
||||||
displayUser(common, json.author)
|
displayUser(common, json.author)
|
||||||
]));
|
]));
|
||||||
$div.append(UI.setHTML(h('p.cp-teams-invite-to'),
|
$div.append(UI.setHTML(h('p.cp-teams-invite-to'),
|
||||||
Messages._getKey('team_inviteFromMsg',
|
Messages._getKey('team_inviteFromMsg',
|
||||||
[Util.fixHTML(json.author.displayName),
|
[Util.fixHTML(json.author.displayName),
|
||||||
Util.fixHTML(json.teamName)]))); // XXX
|
Util.fixHTML(json.teamName)])));
|
||||||
if (json.message) {
|
if (json.message) {
|
||||||
$div.append(h('div.cp-teams-invite-message', json.message));
|
$div.append(h('div.cp-teams-invite-message', json.message));
|
||||||
}
|
}
|
||||||
@ -1199,7 +1197,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...')); // XXX
|
$div.append(h('p', Messages.team_invitePleaseLogin || 'Please log in or register to accept this invitation...'));
|
||||||
$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),
|
||||||
@ -1229,7 +1227,7 @@ define([
|
|||||||
process(val);
|
process(val);
|
||||||
});
|
});
|
||||||
$inviteDiv.prepend(h('div.cp-teams-invite-password', [
|
$inviteDiv.prepend(h('div.cp-teams-invite-password', [
|
||||||
h('p', Messages.team_inviteEnterPassword || 'Please enter the invitation password to continue...'), // XXX
|
h('p', Messages.team_inviteEnterPassword),
|
||||||
pwInput
|
pwInput
|
||||||
]));
|
]));
|
||||||
waitFor.abort();
|
waitFor.abort();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user