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