Merge branch 'staging' into ooPassword
This commit is contained in:
@@ -103,7 +103,7 @@ define([
|
|||||||
])*/
|
])*/
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
h('div.cp-version-footer', "CryptPad v3.5.0 (Falkland-wolf)")
|
h('div.cp-version-footer', "CryptPad v3.6.0 (GoldenFrog)")
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
& {
|
& {
|
||||||
// Share modal
|
// Share modal
|
||||||
.msg.cp-inline-radio-group {
|
.msg.cp-inline-radio-group {
|
||||||
|
overflow: unset !important;
|
||||||
.radio-group {
|
.radio-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
&:not(.large) {
|
||||||
|
.cp-usergrid-grid {
|
||||||
|
margin: -3px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
&.cp-usergrid-empty {
|
&.cp-usergrid-empty {
|
||||||
.cp-usergrid-grid, .cp-usergrid-filter {
|
.cp-usergrid-grid, .cp-usergrid-filter {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -42,17 +48,12 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin-bottom: 6px;
|
margin: 3px;
|
||||||
margin-right: 6px;
|
|
||||||
cursor: default;
|
cursor: default;
|
||||||
transition: order 0.5s, background-color 0.5s;
|
transition: order 0.5s, background-color 0.5s;
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
.tools_unselectable();
|
.tools_unselectable();
|
||||||
|
|
||||||
&:nth-child(6n) {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.cp-selected {
|
&.cp-selected {
|
||||||
background-color: @colortheme_alertify-primary;
|
background-color: @colortheme_alertify-primary;
|
||||||
color: @colortheme_alertify-primary-text;
|
color: @colortheme_alertify-primary-text;
|
||||||
@@ -79,6 +80,7 @@
|
|||||||
width: 140px;
|
width: 140px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
flex-flow: row;
|
flex-flow: row;
|
||||||
|
margin: 0;
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
&:nth-child(3n) {
|
&:nth-child(3n) {
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptpad",
|
"name": "cryptpad",
|
||||||
"version": "3.5.0",
|
"version": "3.6.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptpad",
|
"name": "cryptpad",
|
||||||
"description": "realtime collaborative visual editor with zero knowlege server",
|
"description": "realtime collaborative visual editor with zero knowlege server",
|
||||||
"version": "3.5.0",
|
"version": "3.6.0",
|
||||||
"license": "AGPL-3.0+",
|
"license": "AGPL-3.0+",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -595,54 +595,38 @@ define([
|
|||||||
}, opts);
|
}, opts);
|
||||||
|
|
||||||
var input = h('input.cp-password-input', attributes);
|
var input = h('input.cp-password-input', attributes);
|
||||||
//var reveal = UI.createCheckbox('cp-password-reveal', Messages.password_show);
|
|
||||||
var eye = h('span.fa.fa-eye.cp-password-reveal');
|
var eye = h('span.fa.fa-eye.cp-password-reveal');
|
||||||
|
|
||||||
/*
|
var $eye = $(eye);
|
||||||
$(reveal).find('input').on('change', function () {
|
var $input = $(input);
|
||||||
if($(this).is(':checked')) {
|
|
||||||
$(input).prop('type', 'text');
|
|
||||||
$(input).focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$(input).prop('type', 'password');
|
|
||||||
$(input).focus();
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (displayEye) {
|
if (displayEye) {
|
||||||
$(eye).mousedown(function () {
|
$eye.mousedown(function () {
|
||||||
$(input).prop('type', 'text');
|
$input.prop('type', 'text');
|
||||||
$(input).focus();
|
$input.focus();
|
||||||
}).mouseup(function(){
|
}).mouseup(function(){
|
||||||
$(input).prop('type', 'password');
|
$input.prop('type', 'password');
|
||||||
$(input).focus();
|
$input.focus();
|
||||||
}).mouseout(function(){
|
}).mouseout(function(){
|
||||||
$(input).prop('type', 'password');
|
$input.prop('type', 'password');
|
||||||
$(input).focus();
|
$input.focus();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$(eye).click(function () {
|
$eye.click(function () {
|
||||||
if ($(this).hasClass('fa-eye')) {
|
if ($eye.hasClass('fa-eye')) {
|
||||||
$(input).prop('type', 'text');
|
$input.prop('type', 'text');
|
||||||
$(input).focus();
|
$input.focus();
|
||||||
$(this).removeClass('fa-eye').addClass('fa-eye-slash');
|
$eye.removeClass('fa-eye').addClass('fa-eye-slash');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(input).prop('type', 'password');
|
$input.prop('type', 'password');
|
||||||
$(input).focus();
|
$input.focus();
|
||||||
$(this).removeClass('fa-eye-slash').addClass('fa-eye');
|
$eye.removeClass('fa-eye-slash').addClass('fa-eye');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/*if (displayEye) {
|
|
||||||
$(reveal).hide();
|
|
||||||
} else {
|
|
||||||
$(eye).hide();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
return h('span.cp-password-container', [
|
return h('span.cp-password-container', [
|
||||||
input,
|
input,
|
||||||
//reveal,
|
|
||||||
eye
|
eye
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
@@ -685,12 +669,6 @@ define([
|
|||||||
|
|
||||||
var LOADING = 'cp-loading';
|
var LOADING = 'cp-loading';
|
||||||
|
|
||||||
/*var getRandomTip = function () {
|
|
||||||
if (!Messages.tips || !Object.keys(Messages.tips).length) { return ''; }
|
|
||||||
var keys = Object.keys(Messages.tips);
|
|
||||||
var rdm = Math.floor(Math.random() * keys.length);
|
|
||||||
return Messages.tips[keys[rdm]];
|
|
||||||
};*/
|
|
||||||
var loading = {
|
var loading = {
|
||||||
error: false,
|
error: false,
|
||||||
driveState: 0,
|
driveState: 0,
|
||||||
@@ -700,7 +678,7 @@ define([
|
|||||||
config = config || {};
|
config = config || {};
|
||||||
var loadingText = config.loadingText;
|
var loadingText = config.loadingText;
|
||||||
var todo = function () {
|
var todo = function () {
|
||||||
var $loading = $('#' + LOADING); //.show();
|
var $loading = $('#' + LOADING);
|
||||||
$loading.css('display', '');
|
$loading.css('display', '');
|
||||||
$loading.removeClass('cp-loading-hidden');
|
$loading.removeClass('cp-loading-hidden');
|
||||||
$('.cp-loading-spinner-container').show();
|
$('.cp-loading-spinner-container').show();
|
||||||
@@ -963,19 +941,21 @@ define([
|
|||||||
$.extend(markOpts, opts.mark || {});
|
$.extend(markOpts, opts.mark || {});
|
||||||
|
|
||||||
var input = h('input', inputOpts);
|
var input = h('input', inputOpts);
|
||||||
|
var $input = $(input);
|
||||||
var mark = h('span.cp-checkmark-mark', markOpts);
|
var mark = h('span.cp-checkmark-mark', markOpts);
|
||||||
|
var $mark = $(mark);
|
||||||
var label = h('span.cp-checkmark-label', labelTxt);
|
var label = h('span.cp-checkmark-label', labelTxt);
|
||||||
|
|
||||||
$(mark).keydown(function (e) {
|
$mark.keydown(function (e) {
|
||||||
if (e.which === 32) {
|
if (e.which === 32) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(input).prop('checked', !$(input).is(':checked'));
|
$input.prop('checked', !$input.is(':checked'));
|
||||||
$(input).change();
|
$input.change();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(input).change(function () { $(mark).focus(); });
|
$input.change(function () { $mark.focus(); });
|
||||||
|
|
||||||
return h('label.cp-checkmark', labelOpts, [
|
return h('label.cp-checkmark', labelOpts, [
|
||||||
input,
|
input,
|
||||||
@@ -1049,28 +1029,30 @@ define([
|
|||||||
setHTML(h('div.cp-corner-footer'), footer)
|
setHTML(h('div.cp-corner-footer'), footer)
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
var $popup = $(popup);
|
||||||
|
|
||||||
$(minimize).click(function () {
|
$(minimize).click(function () {
|
||||||
$(popup).addClass('cp-minimized');
|
$popup.addClass('cp-minimized');
|
||||||
});
|
});
|
||||||
$(maximize).click(function () {
|
$(maximize).click(function () {
|
||||||
$(popup).removeClass('cp-minimized');
|
$popup.removeClass('cp-minimized');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (opts.hidden) {
|
if (opts.hidden) {
|
||||||
$(popup).addClass('cp-minimized');
|
$popup.addClass('cp-minimized');
|
||||||
}
|
}
|
||||||
if (opts.big) {
|
if (opts.big) {
|
||||||
$(popup).addClass('cp-corner-big');
|
$popup.addClass('cp-corner-big');
|
||||||
}
|
}
|
||||||
|
|
||||||
var hide = function () {
|
var hide = function () {
|
||||||
$(popup).hide();
|
$popup.hide();
|
||||||
};
|
};
|
||||||
var show = function () {
|
var show = function () {
|
||||||
$(popup).show();
|
$popup.show();
|
||||||
};
|
};
|
||||||
var deletePopup = function () {
|
var deletePopup = function () {
|
||||||
$(popup).remove();
|
$popup.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
$('body').append(popup);
|
$('body').append(popup);
|
||||||
|
|||||||
@@ -685,8 +685,6 @@ define([
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX problem with the hardcoded ": " here
|
|
||||||
// possibly duplicate translation keys
|
|
||||||
if (data.tags && Array.isArray(data.tags)) {
|
if (data.tags && Array.isArray(data.tags)) {
|
||||||
$d.append(h('div.cp-app-prop', [Messages.fm_prop_tagsList, h('br'), h('span.cp-app-prop-content', data.tags.join(', '))]));
|
$d.append(h('div.cp-app-prop', [Messages.fm_prop_tagsList, h('br'), h('span.cp-app-prop-content', data.tags.join(', '))]));
|
||||||
}
|
}
|
||||||
@@ -792,8 +790,8 @@ define([
|
|||||||
placeholder: Messages.share_filterFriend
|
placeholder: Messages.share_filterFriend
|
||||||
});
|
});
|
||||||
|
|
||||||
var div = h('div.cp-usergrid-container' + noOthers, [
|
var div = h('div.cp-usergrid-container' + noOthers + (config.large?'.large':''), [
|
||||||
h('label', label),
|
label ? h('label', label) : undefined,
|
||||||
h('div.cp-usergrid-filter', (config.noFilter || config.noSelect) ? undefined : [
|
h('div.cp-usergrid-filter', (config.noFilter || config.noSelect) ? undefined : [
|
||||||
inputFilter,
|
inputFilter,
|
||||||
buttonSelect,
|
buttonSelect,
|
||||||
@@ -1080,7 +1078,7 @@ define([
|
|||||||
var linkButtons = [
|
var linkButtons = [
|
||||||
makeCancelButton(),
|
makeCancelButton(),
|
||||||
!config.sharedFolder && {
|
!config.sharedFolder && {
|
||||||
className: 'secondary', // XXX style this diferently than cancel
|
className: 'secondary',
|
||||||
name: Messages.share_linkOpen,
|
name: Messages.share_linkOpen,
|
||||||
onClick: function () {
|
onClick: function () {
|
||||||
saveValue();
|
saveValue();
|
||||||
@@ -1174,11 +1172,12 @@ define([
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
var embed = h('div.cp-share-modal', embedContent);
|
var embed = h('div.cp-share-modal', embedContent);
|
||||||
|
var $embed = $(embed);
|
||||||
|
|
||||||
// update values for link preview when radio btns change
|
// update values for link preview when radio btns change
|
||||||
$(embed).find('#cp-embed-link-preview').val(getEmbedValue());
|
$embed.find('#cp-embed-link-preview').val(getEmbedValue());
|
||||||
$rights.find('input[type="radio"]').on('change', function () {
|
$rights.find('input[type="radio"]').on('change', function () {
|
||||||
$(embed).find('#cp-embed-link-preview').val(getEmbedValue());
|
$embed.find('#cp-embed-link-preview').val(getEmbedValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
var frameEmbed = UI.dialog.customModal(embed, {
|
var frameEmbed = UI.dialog.customModal(embed, {
|
||||||
@@ -1211,7 +1210,6 @@ define([
|
|||||||
var modal = UI.dialog.tabs(tabs);
|
var modal = UI.dialog.tabs(tabs);
|
||||||
$(modal).find('.alertify-tabs-titles').after(rights);
|
$(modal).find('.alertify-tabs-titles').after(rights);
|
||||||
|
|
||||||
// XXX
|
|
||||||
// disable edit share options if you don't have edit rights
|
// disable edit share options if you don't have edit rights
|
||||||
if (!hashes.editHash) {
|
if (!hashes.editHash) {
|
||||||
$rights.find('#cp-share-editable-false').attr('checked', true);
|
$rights.find('#cp-share-editable-false').attr('checked', true);
|
||||||
@@ -1374,7 +1372,6 @@ define([
|
|||||||
return modal;
|
return modal;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
UIElements.createInviteTeamModal = function (config) {
|
UIElements.createInviteTeamModal = function (config) {
|
||||||
var common = config.common;
|
var common = config.common;
|
||||||
var hasFriends = Object.keys(config.friends || {}).length !== 0;
|
var hasFriends = Object.keys(config.friends || {}).length !== 0;
|
||||||
@@ -3531,15 +3528,16 @@ define([
|
|||||||
if (isError) { error = setHTML(h('p.cp-password-error'), Messages.password_error); }
|
if (isError) { error = setHTML(h('p.cp-password-error'), Messages.password_error); }
|
||||||
var info = h('p.cp-password-info', Messages.password_info);
|
var info = h('p.cp-password-info', Messages.password_info);
|
||||||
var password = UI.passwordInput({placeholder: Messages.password_placeholder});
|
var password = UI.passwordInput({placeholder: Messages.password_placeholder});
|
||||||
|
var $password = $(password);
|
||||||
var button = h('button', Messages.password_submit);
|
var button = h('button', Messages.password_submit);
|
||||||
cfg = cfg || {};
|
cfg = cfg || {};
|
||||||
|
|
||||||
if (cfg.value && !isError) {
|
if (cfg.value && !isError) {
|
||||||
$(password).find('.cp-password-input').val(cfg.value);
|
$password.find('.cp-password-input').val(cfg.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
var submit = function () {
|
var submit = function () {
|
||||||
var value = $(password).find('.cp-password-input').val();
|
var value = $password.find('.cp-password-input').val();
|
||||||
UI.addLoadingScreen();
|
UI.addLoadingScreen();
|
||||||
common.getSframeChannel().query('Q_PAD_PASSWORD_VALUE', value, function (err, data) {
|
common.getSframeChannel().query('Q_PAD_PASSWORD_VALUE', value, function (err, data) {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -3547,7 +3545,7 @@ define([
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
$(password).find('.cp-password-input').on('keydown', function (e) { if (e.which === 13) { submit(); } });
|
$password.find('.cp-password-input').on('keydown', function (e) { if (e.which === 13) { submit(); } });
|
||||||
$(button).on('click', function () { submit(); });
|
$(button).on('click', function () { submit(); });
|
||||||
|
|
||||||
|
|
||||||
@@ -3561,7 +3559,7 @@ define([
|
|||||||
]);
|
]);
|
||||||
UI.errorLoadingScreen(block);
|
UI.errorLoadingScreen(block);
|
||||||
|
|
||||||
$(password).find('.cp-password-input').focus();
|
$password.find('.cp-password-input').focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
var crowdfundingState = false;
|
var crowdfundingState = false;
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ define([
|
|||||||
if (fd.rtChannel) {
|
if (fd.rtChannel) {
|
||||||
removeOwnedChannel(fd.rtChannel, function () {});
|
removeOwnedChannel(fd.rtChannel, function () {});
|
||||||
}
|
}
|
||||||
// XXX fd.lastVersion to delete the encrypted cp?
|
|
||||||
}
|
}
|
||||||
if (fd.lastVersion) { toClean.push(Hash.hrefToHexChannelId(fd.lastVersion)); }
|
if (fd.lastVersion) { toClean.push(Hash.hrefToHexChannelId(fd.lastVersion)); }
|
||||||
if (fd.rtChannel) { toClean.push(fd.rtChannel); }
|
if (fd.rtChannel) { toClean.push(fd.rtChannel); }
|
||||||
|
|||||||
Reference in New Issue
Block a user